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

    OpenVpn does not resolve local.lan dns

    Scheduled Pinned Locked Moved OpenVPN
    3 Posts 2 Posters 686 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.
    • J
      juandavidmarin
      last edited by

      Hi, I can reach any machine in the local lan network "192.168.3.0/24" using the default local dns "local.lan", I can do for instance
      nslookup jenkins.local.lan and it returns its ip address, but when I use OpenVPN I can reach any local machine but only with its IP address not with the DNS jenkins.local.lan

      I have done several things for it but anything has worked so far, I am using DNS Resolver having checked this options

      a1de7040-53ec-447b-8ca6-5904f29eb6f6-image.png

      I have got also in the OpenVPN Advanced Client Settings and Advanced Configuration next settings

      323e46c8-2e5c-48af-9476-c0a8cad500c6-image.png

      I would appreciate any support on it, thanks

      V 1 Reply Last reply Reply Quote 0
      • V
        viragomann @juandavidmarin
        last edited by

        @juandavidmarin
        Is the DNS server added to the connection on the client?

        What do you get, when you try to resolve the FQDN on the client?

        The custom options are needless. This settings are already done by the 'DNS domain' and 'DNS server' options.

        J 1 Reply Last reply Reply Quote 0
        • J
          juandavidmarin @viragomann
          last edited by juandavidmarin

          Hi @viragomann thanks for your support on this.

          I could get it working, I just removed Custom options

          push "dhcp-option DNS 192.168.3.1";
          push "dhcp-option DOMAIN local.lan";
          

          I saved changes and restarted the whole pfsense, it just started working after that restart, I mean the machines which are using OpenVPN can reach the machines which are in the LAN network by dns instead of IP addresses, my suspicion pfsense needed to be restarted and there was not any need by adding the Custom options, after that I wanted to double check this in other to have repeatable steps and what I could find out is that those enabled options in Dns Resolver such as DHCP Registration, Static DHCP, OpenVPN Clients as DNS Default Domain and Dns Server 1 in OpenVPN server settings are mandatory options in order to get it working, I know there could be a lot of ways to do this, I am just sharing with you how I could do it in this way

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