Page 1 of 1

How to use two DNS-servers in ovpn config file(openvpn-connect-client)

Posted: Mon Jul 12, 2021 4:52 pm
by clouddevelopment
When using in my ovpn(imported)-config file, with a single

Code: Select all

dhcp-option DNS <dns_server_ip_address>
it works for first DNS. But vpn-adapter gets a second DNS from something else. So i'm ending up with a second, unwanted DNS(falback)-address in my VPN-adapter-connection.

How do I overwrite the second(fallback) dns server in the vpn-adapter, when connecting with imported ovpn config file?

Code: Select all

dhcp-option DNS <dns_server_ip_address> <dns_server_ip_address>
and

Code: Select all

dhcp-option DNS <dns_server_ip_address> DNS <dns_server_ip_address>
both don't work

Please advice, thank you.

Re: How to use two DNS-servers in ovpn config file(openvpn-connect-client)

Posted: Tue Jul 13, 2021 6:54 pm
by openvpn_inc
Hello clouddevelopment,

Normally you repeat the parameter:
dhcp-option DNS 1.2.3.4
dhcp-option DNS 5.6.7.8

Kind regards,
Johan

Re: How to use two DNS-servers in ovpn config file(openvpn-connect-client)

Posted: Thu Aug 05, 2021 1:15 pm
by xiss_gm
You're lucky. The Windows 3.3.1 OpenVPN Connect client doesn't work for OpenVPN 2.5 servers - doesn't push DNS to the TAP adapter properly. I have to hard code DNS.