No DNS via VPN

Hello,

I am not sure if this is a Pi-Hole or a OpenVPN problem. but since I followed your Tutorial, I try my luck here first.

I installed Pi-Hole and OpenVPN according to this Tutorial:

In my local network everything is working fine. DNS request are resolved by Pi-Hole and no ads anymore :slight_smile:
But If i connect via OpenVPN to my Pi-Hole, DNS requests don't seem to be resolved. I tried it both, with my Android phone and with my vServer. OpenVPN is working: I can ping, both local and internet addresses, but only the IP (eg. ping 8.8.8.8 ). traceroute shows that traffic ist going through the VPN tunnel.

OpenVPN server.conf:

port 1194
proto udp
dev tun
sndbuf 0
rcvbuf 0
ca ca.crt
cert server.crt
key server.key
dh dh.pem
auth SHA512
tls-auth ta.key 0
topology subnet
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
push "redirect-gateway def1 bypass-dhcp"
push "route 10.10.10.0 255.255.255.0"
push "dhcp-option DNS 10.10.10.110"
keepalive 10 120
cipher AES-256-CBC
comp-lzo
user nobody
group nogroup
persist-key
persist-tun
status openvpn-status.log
verb 3
crl-verify crl.pem

OpenVPN client.conf

client
dev tun
proto udp
sndbuf 0
rcvbuf 0
remote mydomain.net 1194
resolv-retry infinite
nobind
persist-key
persist-tun
remote-cert-tls server
auth SHA512
cipher AES-256-CBC
comp-lzo
setenv opt block-outside-dns
key-direction 1
verb 3 

Debug Token: fdsr4t4bst

IF you need additional information, please let me know

Not sure if necessary but if you go to the Pi-hole admin page settings, you can set listening behavior to listen to all interfaces (default is to listen to eth0 only):

image

Thanks for the reply,

but this did not help

Hi NilsonNeo,
Maybe you could try the quick fix that I posted here : PiHole - VPN with iptables - #6 by Clem

I had the exact same issue and it works like a charm now.