• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
Netgate Discussion Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login

How to add DNS to OpenVPN client setup

Scheduled Pinned Locked Moved OpenVPN
8 Posts 3 Posters 7.1k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A
    apara
    last edited by May 17, 2017, 9:29 AM

    I am configuring an OpenVPN client and would like to configure my own DNS to add 8.8.8.8 and 8.8.4.4 to the OpenVPN Client configuration.  This is because the DNS of my OpenVPN Service sometimes dies.  I tried to add dhcp-option DNS 8.8.8.8, 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?

    1 Reply Last reply Reply Quote 0
    • G
      gjaltemba
      last edited by May 17, 2017, 12:27 PM

      Please explain how you add dhcp-option DNS 8.8.8.8 and 8.8.4.4 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])

      1 Reply Last reply Reply Quote 0
      • A
        apara
        last edited by May 18, 2017, 3:22 AM May 18, 2017, 3:16 AM

        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)

        1 Reply Last reply Reply Quote 0
        • B
          biggsy
          last edited by May 18, 2017, 3:41 AM

          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 8.8.8.8"
          
          

          and so on.

          1 Reply Last reply Reply Quote 0
          • G
            gjaltemba
            last edited by May 18, 2017, 4:35 PM

            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?

            1 Reply Last reply Reply Quote 0
            • A
              apara
              last edited by May 21, 2017, 4:48 PM

              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 8.8.8.8 and 8.8.4.4.  The DNSLeak page is just used to test to see which DNS endpoints are being used.

              1 Reply Last reply Reply Quote 0
              • G
                gjaltemba
                last edited by May 21, 2017, 5:52 PM

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

                1 Reply Last reply Reply Quote 0
                • A
                  apara
                  last edited by May 23, 2017, 1:19 AM

                  The DNS servers given out to the clients VIA DHCP are all pointing to the firewall (192.168.1.1).

                  1 Reply Last reply Reply Quote 0
                  5 out of 8
                  • First post
                    5/8
                    Last post
                  Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                    This community forum collects and processes your personal information.
                    consent.not_received