Custom DNS settings in config file (w/ TP-LINK AX6000 router as VPN server)

Official client software for OpenVPN Access Server and OpenVPN Cloud.
Post Reply
Tiède
OpenVpn Newbie
Posts: 2
Joined: Thu Jun 24, 2021 10:35 pm

Custom DNS settings in config file (w/ TP-LINK AX6000 router as VPN server)

Post by Tiède » Thu Jun 24, 2021 10:46 pm

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?

300000
OpenVPN Expert
Posts: 571
Joined: Tue May 01, 2012 9:30 pm

Re: Custom DNS settings in config file (w/ TP-LINK AX6000 router as VPN server)

Post by 300000 » Fri Jun 25, 2021 2:39 pm

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

Tiède
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)

Post by Tiède » Fri Jun 25, 2021 7:55 pm

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.

300000
OpenVPN Expert
Posts: 571
Joined: Tue May 01, 2012 9:30 pm

Re: Custom DNS settings in config file (w/ TP-LINK AX6000 router as VPN server)

Post by 300000 » Mon Jun 28, 2021 4:18 pm

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.

Post Reply