So I have a OpenDNS + PiHole + DoH(Cloudflare) setup on a digital ocean VPS using the linked PiHole Docs guide. It was all working perfectly until I span down the server and then restarted it from a back-up on a new IP.
Since DIgital Ocean doesn't reserve the IP of the server when you restore from a backup you get a new external and internal IP. Since this I cant ssh into the server and when I access from the console there is no networking. Pings appear to originate from the old IP (according to the CLI prints).
Sometimes just as the server is booting I can ssh into it, but very quickly the connection drops. I have checked the firewall and that is set up correctly.
I have tried editing the following files to update the new IP /etc/openvpn/server.conf
, /etc/pihole/setupVars.conf
, /etc/dhcpcd.conf
and /etc/dnsmasq.d/50-cloudflared.conf
because I actually used this turorial.
I have a suspicion I have missed a config file for either PiHole or Cloudflare somewhere.
I have tried restarting between all these steps and I have tried disabling the Cloudflare service, neither worked
Many thanks.
Update:
So in the end, all I needed to do was update only /etc/dhcpcd.conf
with the new ip address and gateway (found in settings>networking in DigitalOcean) then & run sudo service dhcpcd restart
and sudo shutdown -r now
and it was all working happily. I didn't even need to run pihole -r
(I think this is because I have a dynamic domain name set up!)
Worryingly /etc/pihole/setupVars.conf
still shows the old IPV4_ADDRESS
but as I am having no issues atm I am holding back on changing anything.