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

Official client software for OpenVPN Access Server and OpenVPN Cloud.
Post Reply
clouddevelopment
OpenVpn Newbie
Posts: 1
Joined: Mon Jul 12, 2021 4:51 pm

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

Post by clouddevelopment » Mon Jul 12, 2021 4:52 pm

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.

User avatar
openvpn_inc
OpenVPN Inc.
Posts: 1333
Joined: Tue Feb 16, 2021 10:41 am

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

Post by openvpn_inc » Tue Jul 13, 2021 6:54 pm

Hello clouddevelopment,

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

Kind regards,
Johan
Image OpenVPN Inc.
Answers provided by OpenVPN Inc. staff members here are provided on a voluntary best-effort basis, and no rights can be claimed on the basis of answers posted in this public forum. If you wish to get official support from OpenVPN Inc. please use the official support ticket system: https://openvpn.net/support

xiss_gm
OpenVpn Newbie
Posts: 5
Joined: Tue Jul 20, 2021 1:58 pm

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

Post by xiss_gm » Thu Aug 05, 2021 1:15 pm

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.

Post Reply