Navigation

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

    DNSmasq / resolving between pfSense/DD-WRT over OpenVPN tunnel

    DHCP and DNS
    2
    7
    1454
    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
      JimPhreak last edited by

      I've setup an OpenVPN tunnel between two sites and would like to be able to forward DNS requests across that tunnel.  So that if I ping from a PC at Site1 to a hostname at Site2 it will resolve.  I'd prefer to have it resolve without the FQDN but I'll take what I can get.

      I'm coming from a setup with 2 DD-WRT routers so now that I've upgraded one site to pfSense (2nd site will be upgraded in the next month) I'm a little confused as to how to configure the pfSense side.  This is what the DD-WRT side looks like.

      This picture is Site2.  My OpenVPN server (pfSense) is Site1 which has an address of 192.168.4.1.

      I'm not sure what I need to configure in the DNS Forwarder and if I need to leave DNS Resolver on as well (albeit tied to a different port of course).

      1 Reply Last reply Reply Quote 0
      • P
        phil.davis last edited by

        You get to choose if you want to use DNS Forwarder or DNS Resolver. In either case, just add a domain override to tell it a domain that gets resolved somewhere special (in your intranet) and the IP to which name requests for that domain should be sent.

        1 Reply Last reply Reply Quote 0
        • J
          JimPhreak last edited by

          @phil.davis:

          You get to choose if you want to use DNS Forwarder or DNS Resolver. In either case, just add a domain override to tell it a domain that gets resolved somewhere special (in your intranet) and the IP to which name requests for that domain should be sent.

          That's what I figured.  So I added a domain override for domain2 with an IP address of 192.168.2.1 since that's the IP address of my DD-WRT router which handles DNS requests for Site2.  However doing this still doesn't let me resolve names form Site1 to Site2.

          1 Reply Last reply Reply Quote 0
          • P
            phil.davis last edited by

            The DNS server needs to be able to reply to the request. The request is probably seen as coming from the OpenVPN tunnel end-point address at site1. If something in the path back from site2 does not know how to route to the OpenVPN tunnel IP then it can go wrong.
            With DNS Forwarder you can specify in the domain override which IP to source the requests from - usually LAN IP is good there, the remote DNS server can usually route back to that.
            With DNS Resolver you need to get your intranet routing so that the OpenVPN tunnel IPs are in the routing everywhere.

            1 Reply Last reply Reply Quote 0
            • J
              JimPhreak last edited by

              @phil.davis:

              The DNS server needs to be able to reply to the request. The request is probably seen as coming from the OpenVPN tunnel end-point address at site1. If something in the path back from site2 does not know how to route to the OpenVPN tunnel IP then it can go wrong.
              With DNS Forwarder you can specify in the domain override which IP to source the requests from - usually LAN IP is good there, the remote DNS server can usually route back to that.
              With DNS Resolver you need to get your intranet routing so that the OpenVPN tunnel IPs are in the routing everywhere.

              Is there a best practice for using Forwarder or Resolver with regard to OpenVPN site-to-site connections?  Once I have pfSense on both ends, setting up the routing won't be an issue but since one end is still DD-WRT I'm not really familiar with configuring routing on them.

              1 Reply Last reply Reply Quote 0
              • P
                phil.davis last edited by

                If you do not have full routing paths to/from all of your intranet tunnels… then use DNS Forwarder and specify the local LAN IP address as the Source IP of the Domain Override queries - presumably the remote DNS server will have a good route back to the LAN IP address.

                1 Reply Last reply Reply Quote 0
                • J
                  JimPhreak last edited by

                  @phil.davis:

                  If you do not have full routing paths to/from all of your intranet tunnels… then use DNS Forwarder and specify the local LAN IP address as the Source IP of the Domain Override queries - presumably the remote DNS server will have a good route back to the LAN IP address.

                  I do have routes to all my subnets on both ends of my VPN tunnel.  And what's weird is that if I do a tracert from a host on the 192.168.4.0 network to a host on the 192.168.2.0 network it displays the DNS name of that host.  However if I try to ping by name or do an nslookup it does not work.

                  P.S.  I'm no longer using DD-WRT.  I have pfSense on both ends and I've got a site-to-site OpenVPN tunnel setup between the two.

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post

                  Products

                  • Platform Overview
                  • TNSR
                  • pfSense
                  • Appliances

                  Services

                  • Training
                  • Professional Services

                  Support

                  • Subscription Plans
                  • Contact Support
                  • Product Lifecycle
                  • Documentation

                  News

                  • Media Coverage
                  • Press
                  • Events

                  Resources

                  • Blog
                  • FAQ
                  • Find a Partner
                  • Resource Library
                  • Security Information

                  Company

                  • About Us
                  • Careers
                  • Partners
                  • Contact Us
                  • Legal
                  Our Mission

                  We provide leading-edge network security at a fair price - regardless of organizational size or network sophistication. We believe that an open-source security model offers disruptive pricing along with the agility required to quickly address emerging threats.

                  Subscribe to our Newsletter

                  Product information, software announcements, and special offers. See our newsletter archive to sign up for future newsletters and to read past announcements.

                  © 2021 Rubicon Communications, LLC | Privacy Policy