How to add DNS to OpenVPN client setup

  • I am configuring an OpenVPN client and would like to configure my own DNS to add and to the OpenVPN Client configuration.  This is because the DNS of my OpenVPN Service sometimes dies.  I tried to add dhcp-option DNS, however, I see a message that says:

    Options error: option 'dhcp-option' cannot be used in this context ([PUSH-OPTIONS])

    Is there a way to add a DNS to the OpenVPN client configuration?

  • Please explain how you add dhcp-option DNS and to the OpenVPN Client configuration in pfSense.

    Where do you see this message

    Options error: option 'dhcp-option' cannot be used in this context ([PUSH-OPTIONS])

  • Of course…

    I added the options under advanced client configuration... see image

    The errors I saw were in the OpenVPN client log, although I must have changed something and do not see them anymore.  However, the DNS leak test still shows only a single DNS server.

    ![Screen Shot 2017-05-17 at 8.16.02 PM.png](/public/imported_attachments/1/Screen Shot 2017-05-17 at 8.16.02 PM.png)
    ![Screen Shot 2017-05-17 at 8.16.02 PM.png_thumb](/public/imported_attachments/1/Screen Shot 2017-05-17 at 8.16.02 PM.png_thumb)

  • I could well be wrong but I think you need to have it like this:

    push "fast-io";push "auth-nocache";push "dhcp-option DNS"

    and so on.

  • I am sorry but I do not follow how changing openvpn client in pfSense is expected to affect the dnsleaktest results running on another computer. How are they connected?

  • I guest want to have multiple DNS setups when I am using VPN, so when the provider's DNS is not working, I can still have DNS going through and  The DNSLeak page is just used to test to see which DNS endpoints are being used.

  • What dns servers are used on the web browser computer and are they setup by dhcp?

  • The DNS servers given out to the clients VIA DHCP are all pointing to the firewall (

Log in to reply