Hi - I’m a newbie on this community. Just set up pi-hole with static ip using ubuntu on vitualisation centre. I hve community fibre an have set up the router to point to the pi-hole ip. However, when checking clients ipconfig/all, the dns STILL points to the router ip. WHY?
Did you set the pi-hole as the gateway in your DHCP sever ?
if you mean did I set the IP address of pi-hole in the dns of the router then yes. I set the router as manual dns, added the address of pi-hole as the primary dns, and then adedd 8.8.8.8 as the secondary dns. The router shows 192.168.1.222 as primary dns (pi-hole IP) and 8.8.8.8 as seconday dns. HOWEVER, when checking the clients with ipconfig/all it shows as the router address - 192.168.1.1. Why??
I have not yet set up the pi-hole as the dhcp server - that is still managed by the community fibre router.
The PiHole needs to be the DNS server of your clients, not your router, thats why you put it in the DHCP server (it gives the clients the DNS server)
see step 3 here
First of all, you can set up pi-Hole in Container Station - no need to run it in a full VM. Will take less system resources. I have the YAML code to do this with the latest build if you like..
Second, you are correct in that you set Pi-Hole as the DNS on your router. However, do not use a secondary DNS address. If for whatever reason Pi-Hole is not quickly accessed, your router will pull from the Google DNS. And you’ll get ads, etc.
And yes, as @dolbyman said, make sure that the pi-hole address is set for the DNS in the DHCP server. Technically, if you have only pi-hole are the DNS lookup for the router and you have the router acting as a DNS server you could use the router’s address.
I have now fixed the issue. The issue was that I configured pi-hole and set up the dns server from pi-hole, but my router (community fibre) - although configured to use the pi-hole device for dns, did not allow clients to use the pi-hole for dns - instead in the clients (running ipconfig/all), the address for dns showed the router address, not the pi-hole address for dns. Eventually fixed it by using pi-hole to provide dhcp and disabling the router from giving dhcp. Another issue on the router is that ipv6 seems to be causing an issue - now disabled ipv6 on the router. al running ok using dhcp and dns from pi-hole.