Pi Hole running fine, DNS server not showing pi hole IP. VPN also not working


#1

Please follow the below template, it will help us to help you!

Expected Behaviour:

After installing pi-hole on a pi zero v1.3, ipconfig for my desktop should show default gateway = IP address of pi zero.

Actual Behaviour:

however it is still showing it to be that of the router. all features of pi hole are running. it is blocking ads fine.
i had put a second DNS server of google as back up initially.
additionally, I installed piVPN on the same pi-zero.
when i connected my iphone to the vpn with default config, it worked, however no adblocking happened on the phone from cellular data.
when i changed the config file of vpn to point to pi-zero IP, vpn didn’t work.

ipconfig log:
Windows IP Configuration

Ethernet adapter Ethernet:

Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :

Wireless LAN adapter Local Area Connection* 2:

Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :

Ethernet adapter Ethernet 2:

Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :

Wireless LAN adapter Wi-Fi:

Connection-specific DNS Suffix . :
Link-local IPv6 Address . . . . . : y::y:y:y:y
IPv4 Address. . . . . . . . . . . : x.x.x.x
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : x.x.x.x (this shows as router IP, no pi-hole IP)

Tunnel adapter Local Area Connection* 11:

Connection-specific DNS Suffix . :
IPv6 Address. . . . . . . . . . . : x:x:x:x:x:x:x:x
Link-local IPv6 Address . . . . . : x::x:x:x:x
Default Gateway . . . . . . . . . : ::

Debug Token:

zh2udjuah4


#2

No. The gateway should still be the router

Pi-hole is a DNS server, not a proxy, hence your traffic should still go the usual path (computer -> router -> Internet).

Then this issue is already solved.

You will have to set the DNS server in the VPN config

You have to do further settings. Please have a look at this article of our extensive Pi-hole VPN wiki:

After following through this it should work fine for you.


#3

Hello,
Thank you very much for the response. I made one mistake in my problem statement:
default gateway = ip of router . this is correct and ok.
when I do ipconfig /all, even the DNS servers is showing to be IP of router and not ip zero.
Wireless LAN adapter Wi-Fi:

Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Realtek RTL8811AU Wireless LAN 802.11ac USB 2.0 Network Adapter
Physical Address. . . . . . . . . :
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
Link-local IPv6 Address . . . . . : fe80::a487:f6e7:c92c:583f%2(Preferred)
IPv4 Address. . . . . . . . . . . : 192.168.1.167(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Lease Obtained. . . . . . . . . . : Sunday, December 31, 2017 3:25:21 PM
Lease Expires . . . . . . . . . . : Wednesday, January 3, 2018 7:56:30 PM
Default Gateway . . . . . . . . . : 192.168.x.x
DHCP Server . . . . . . . . . . . : 192.168.x.x
DHCPv6 IAID . . . . . . . . . . . : 51808273
DHCPv6 Client DUID. . . . . . . . : xxxxxxxx
DNS Servers . . . . . . . . . . . : 192.168.x.x (this was same as IP of router)
NetBIOS over Tcpip. . . . . . . . : Enabled

I am yet to follow all steps for VPN, but i’m wondering if this will affect it. if not, then i’ll disregard this for my computer.

Thanks,
Rajat


#4

Who is doing DHCP in your network, Pi-hole or the router ?


#5

DHCP server is also Router IP, so I guess router is doing the DHCP.
if Pi-hole needs to do it, is there a tutorial available for that?


#6

Can you post screenshots of your router “DHCP server” settings ?
If it lacks an option to push a DNS server (Pi-hole’s IP) to the clients through DHCP, I would recommend to disable the DHCP server on the router and enable the one on Pi-hole as a replacement:

Ps. love your handle by the way :wink:


#7

thank you for continued assistance.
I went to DHCP settings and added pi hole IP in the DNS server field there. the DHCP server didn’t change, but pi hole appeared as additional DNS server in the query .
do i live with this or do i follow the article shared and go to pi hole admin and select it to be the DHCP server?

thank you for comment on handle :slight_smile:, couldn’t believe it was available.


#8

You dont want the clients to get two DNS servers assigned as the router DNS service isn’t Pi-holed and the clients will query both.
From screenshot, this appears to be an Asus router.
Me and this other piholer experienced we cant use our Asus router to assign DNS servers to clients via the routers DHCP because we cant get ride of the second DNS IP (the router).
So we switched DHCP from router to Pi-hole.


#9

Hello,
Thank you for the troubleshooting and advice. I change my DHCP to pi-hole, restarted router and pi-zero, and now everything is showing correctly.
Thank you for the help.