I recently built a Raspberry Pi and installed Pi-hole onto it for my Dad. I did all of the work at my house and then took it down to his to install onto his network. I had an issue with doing this as it was not picking up a new IP address (it took me a while to work out that this was the problem).
Not knowing Linux very well, it took me longer than it would have done with a Windows machine to work out the solution. I spent some time searching online and came up with three commands which are run at the command line (once you’ve connected using SHH; IPv6 was working, but not IPv4 , so I was able to connect to the Pi, but not give the router the IP for use as the DNS Server).
- Show current IP address assignment:
- To release the current IP address:
sudo dhclient -r eth0
- To request a new IP address:
sudo dhclient -1 eth0
The above is basically the equivalent of
ipconfig /renew on Windows.