Hey gang!
I'm trying to set custom DNS entries in my openvpn config file, but looks like it always gets overwritten by 8.8.8.8 regardless of where or how I set my custom DNS entries.
I have a pi-hole set up at home, and am using a TP-LINK AX-6000 router as my DNS server.
I see my dhcp-option DNS lines in the log, but then shortly after, i see 2 entries pushed for dhcp-option DNS 10.8.0.1 and 8.8.8.8
These two entries are of course overwriting my custom DNS values, so any DNS leak testing fails.
Anyone has experience with this, or faced a similar issue with their own setup and know if a solution?
Custom DNS settings in config file (w/ TP-LINK AX6000 router as VPN server)
-
- OpenVpn Newbie
- Posts: 2
- Joined: Thu Jun 24, 2021 10:35 pm
-
- OpenVPN Expert
- Posts: 685
- Joined: Tue May 01, 2012 9:30 pm
Re: Custom DNS settings in config file (w/ TP-LINK AX6000 router as VPN server)
if you want to set your dns server just add this into your openvpn config so it will work for you
dhcp-option DNS 10.8.10.1
dhcp-option DNS 10.8.10.1
-
- OpenVpn Newbie
- Posts: 2
- Joined: Thu Jun 24, 2021 10:35 pm
Re: Custom DNS settings in config file (w/ TP-LINK AX6000 router as VPN server)
Did you mean 10.8.0.1? Is so, I tried that option, yes (well, with a different IP address in my router's main subnet).
The challenge is that entry gets overwritten by the 10.8.0.1 and 8.8.8.8 when connecting.
For example, I'm using
dhcp-option DNS 192.168.2.25, but that entry always gets wiped out.
The challenge is that entry gets overwritten by the 10.8.0.1 and 8.8.8.8 when connecting.
For example, I'm using
dhcp-option DNS 192.168.2.25, but that entry always gets wiped out.
-
- OpenVPN Expert
- Posts: 685
- Joined: Tue May 01, 2012 9:30 pm
Re: Custom DNS settings in config file (w/ TP-LINK AX6000 router as VPN server)
so if you want your openvpn client set 192.168.2.25 just add this line into your openvpn server
push " dhcp-option DNS 192.168.2.25 "
commend all other push option so it will work for you.
push " dhcp-option DNS 192.168.2.25 "
commend all other push option so it will work for you.