OpenVPN not using DNS set in options
-
Howdy
I can't seem to get openvpn to use the dns sever ive set for it.
I have openvpn dns set to 10.0.0.1 (which is Pfsense) and the dns on pfsense is set to 10.0.0.222 (which is pihole) the phones still show Ads/
when i set openvpn dns to 10.0.0.222 the Ads don't show but the logs show its used the virtual IP 10.0.2.3 not the real IP 10.0.0.117
which was it correct? or do i have it set up completely wrong?
Thanks
-
DNS Resolver in Forwarding Mode or what are you using?
Is it working for your LAN Clients?
Check the OpenVPN client Log to see what exactly is pushed.-Rico
-
@Rico DNS Resolver. Lan is fine only the 3 which use openvpn seems to be bypasing Pihole. There is nothing in the log which i can see about dns ive set.
-
You should see something like this in your client log
Mon May 11 19:18:59 2020 PUSH: Received control message: 'PUSH_REPLY,...,dhcp-option DNS 172.29.33.101,dhcp-option DNS 172.29.33.102,...'
I push via Client CSO, the Server option DNS Server enable should do the same though.-Rico
-
@Rico said in OpenVPN not using DNS set in options:
You should see something like this in your client log
Mon May 11 19:18:59 2020 PUSH: Received control message: 'PUSH_REPLY,...,dhcp-option DNS 172.29.33.101,dhcp-option DNS 172.29.33.102,...'
I push via Client CSO, the Server option DNS Server enable should do the same though.-Rico
I don't all I see is this when i rejoin with openvpn
May 11 17:33:08 openvpn 76206 10.0.0.107:44694 peer info: IV_GUI_VER=OC30Android May 11 17:33:08 openvpn 76206 10.0.0.107:44694 peer info: IV_VER=3.git::f225fcd0:Release May 11 17:33:08 openvpn 76206 10.0.0.107:44694 peer info: IV_PLAT=android May 11 17:33:08 openvpn 76206 10.0.0.107:44694 peer info: IV_NCP=2 May 11 17:33:08 openvpn 76206 10.0.0.107:44694 peer info: IV_TCPNL=1 May 11 17:33:08 openvpn 76206 10.0.0.107:44694 peer info: IV_PROTO=2 May 11 17:33:08 openvpn 76206 10.0.0.107:44694 [mjj34] Peer Connection Initiated with [AF_INET]10.0.0.107:44694 May 11 17:33:08 openvpn user 'mjj34' authenticated May 11 17:33:09 openvpn 76206 mjj34/10.0.0.107:44694 MULTI_sva: pool returned IPv4=10.0.2.2, IPv6=(Not enabled)
I push via Client CSO, the Server option DNS Server enable should do the same though.
I have no idea what this means sorry. -
-
@Rico Oh yes that is set correct
-
My screenshot is showing the OpenVPN server options...
-Rico
-
@Rico Sorry yes
-
Again, check the CLIENT side log to check what is pushed or not pushed.
-Rico
-
@Rico Yes it is getting pushed
-
DNS traffic to pfSense is allowed with Firewall Rules?
Can you post your Rules via screenshots?-Rico
-
@Rico Thanks here are the rules
-
Fixed the issue if I don't set a dns in the openvpn setting it works fine and still used 10.0.0.1 as a dns thanks for the help!
-
Nope not fixed when its not on wifi as in local it does not use the DNS.