Pi-hole refusing to set default gateway

Hey, all.

I'm a novice on Linux and on Pi-Hole, so please bear with me.

I've got my pi-hole installed and running, but I changed my router's IP address, so I tried to run
"pihole -r" to re-configure a new IP address for the pi-hole as well as the new gateway address. The pi-hole took the new IP address, but is ignoring the new gateway. I've rebooted multiple times and run "pihole -r" multiple times, but each time I boot the pi-hole has no internet connectivity, and running "ip route show" shows the old default gateway of 192.168.0.1 instead of the new one. I can manually add the gateway in order to connect to the internet, but each time I reboot the pi-hole, the gateway goes back to the old default. I've looked in the config file setupVars.conf, but don't see anything in it referring to a gateway, and when I manually add a gateway to eth0 in /etc/network/interfaces it seems to be ignored.

Any ideas?

I greatly appreciate any help you can offer!

1 Like

EDIT: SOLVED --> Problem was with hardcoded IP data in /etc/dhcpcd.conf

After searching Google and here without success, I posted here. After taking a break, I continued searching, eventually searching through reddit. Another user encountered this problem and found old IP info hardcoded in /etc/dhcpcd.conf. Clearing the old data solved his problem, and solved mine as well. I posted this result so hopefully the next person won't take as long to find the solution as I did, lol. Link to original solution here:

https://www.reddit.com/r/pihole/comments/6iq1hp/pihole_no_longer_connects_to_internet_after/

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.