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

    DNS resolver not working for openvpn

    Scheduled Pinned Locked Moved OpenVPN
    7 Posts 2 Posters 469 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.
    • E
      ewok2
      last edited by

      Hello
      I have activate in the DNS resolver

      DHCP Registration and Static DHCP
      => So I can use a ssh with the hostname instead of the IP adress.

      It works in my LAN but does not works when my laptop is connect to the LAN with a OpenVPN tunnel.
      (The ssh with I adress works)

      Any Idee what I miss to allow the DNS working in the OpenVpn networks?

      GertjanG 1 Reply Last reply Reply Quote 0
      • GertjanG
        Gertjan @ewok2
        last edited by

        @ewok2 said in DNS resolver not working for openvpn:

        It works in my LAN but does not works when my laptop is connect to the LAN with a OpenVPN tunnel.

        When you set up a OpenVPN tunnel network like this :
        e5650203-b8f8-47db-9e3c-7fafaf402039-image.png

        then the VPN server (pfSense) will be 192.168.3.1

        An OpenVPN client will get an IP like 192.168.3.x - Take note that it is the OpenVPN server that will give the OpenVPN client an IP, and isn't DHCP server related.

        Set up your OpenVPN DNS filed like this :

        68362fde-a82f-4e62-99ca-c56c6aeeec48-image.png

        so now the OpenVPN knows where it can get DNS questions answered.

        Nearly done now.

        You have to tell the resolver that it should also listen to this 192.168.3.0/24 network.
        By default, this is the case :

        ad3cc783-4bcd-45ae-ad44-f0216160d682-image.png

        @ewok2 said in DNS resolver not working for openvpn:

        DHCP Registration and Static DHCP

        Static DHCP is great.
        I strongly advise to get a static lease for all your important devices : the ones you have to connect to.
        When done, do the thing that has been discussed on this forum for the last 10 years and so, using a zillion words over hundreds of forum threads : shut down :

        348eff3f-3aae-4661-80a7-30aa6564cee5-image.png

        You'll thank me later ^^

        No "help me" PM's please. Use the forum, the community will thank you.
        Edit : and where are the logs ??

        E 1 Reply Last reply Reply Quote 0
        • E
          ewok2 @Gertjan
          last edited by

          Thanks for help

          @Gertjan said in DNS resolver not working for openvpn:

          VPN server (pfSense) will be 192.168.3.1

          Where is it specify that pfsense wil get the 1rst IP ?

          I also did not specify a default domain name to client...

          Ok I remove also the DHCP registration box ...
          I have static IP and also DHCP "fixed IP" with mac adress check.
          It should be consider as static IP ;-)

          But I still get it not working....
          Maybe is it because, even if I have a resolver that did listen on "All" network interface, I did not have a "VPNS" interface in the list?

          E 1 Reply Last reply Reply Quote 0
          • E
            ewok2 @ewok2
            last edited by

            My OpenVpn Interface that receive the connection is WAN ...

            GertjanG 1 Reply Last reply Reply Quote 0
            • GertjanG
              Gertjan @ewok2
              last edited by

              @ewok2

              Wait. First things first. Your talking about the pfSense OpenVPN server, right ?

              No "help me" PM's please. Use the forum, the community will thank you.
              Edit : and where are the logs ??

              E 1 Reply Last reply Reply Quote 0
              • E
                ewok2 @Gertjan
                last edited by

                @Gertjan Not sure to understand your question?
                I have added in the DNS configuration the IP 192.168.3.1 in the OpenVpn configuration
                (and I was wondering how to know that it was 1 and not 254 or other by curiosity)

                E 1 Reply Last reply Reply Quote 0
                • E
                  ewok2 @ewok2
                  last edited by

                  And Yes mi OpenVPN is an app running on my Pfsense

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post
                  Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.