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

    DNS Conditional forwarding on 2.3.2-RELEASE-p1 (amd64) DNS resolver

    Scheduled Pinned Locked Moved DHCP and DNS
    6 Posts 2 Posters 2.3k 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.
    • H
      honza
      last edited by

      Hello erverybody,

      I recently installed my first pfsense and I run in a problem I am not able to solve alone. I have a VPN tunnel into my employees network. The tunnel is working fine. For the problem I am decribing is important that I am able to open a nslookup connection to the companies DNS server and resolve names to local IPAdresses.

      I added a conditional forwarder on the WEB GUI for this internal DNS server: Please see attached screenshot.

      Full qualified domain names to the local domain are not resolved. If I perform packet capturing, I can see that my pfsense box is not trying to perfom a lookyp from that internal server 192.168.0.220. In DIAGNOSTICS==>DNS lookup the conditional forwarding server is not listed when I try to perform a lookup for that local domain.

      I investigated a litte and found out, how I can have a look into unbound.conf. What seems strange is that I see no entry for the conditional lookup server. I only see entries for the local doamin listed as "private-domain" and "domain-insecure", but no entry for 192.168.0.220.

      Can anyone help/advise ?

      Thanks and  regards

      Honza
      GUI.png
      GUI.png_thumb

      1 Reply Last reply Reply Quote 0
      • johnpozJ
        johnpoz LAYER 8 Global Moderator
        last edited by

        So if you want the resolver to query a dns server down a vpn tunnel.  You need to make sure you set that interface to be able to be used for queries in unbound..

        So I have a vpn connection to a vps, I set unbound to use be able to use that interface.  I then setup forwarder for myprivatetestdomain.com to use IP on the other end of the tunnel.

        I then do a query for something in that domain, and you can see from my sniff on the vpn interface that It asks that dns server - in my case it sends back refused since I don't have that ns setup for that domain.  But you can clearly see it asked it.  Now if your query is going to return rfc1918 address, then you most likely need to set that as private domain in unbound so that unbound will hand back any rfc1918 IP it gets to the client.

        querydowntunnel.png
        querydowntunnel.png_thumb

        An intelligent man is sometimes forced to be drunk to spend time with his fools
        If you get confused: Listen to the Music Play
        Please don't Chat/PM me for help, unless mod related
        SG-4860 24.11 | Lab VMs 2.8, 24.11

        1 Reply Last reply Reply Quote 0
        • H
          honza
          last edited by

          Thanks for the repley.

          I have set "Outgoing network interfaces" to "ALL".

          But what is strange to me is that I do not see the IPSEC device under "Outgoing network interfaces".

          Is that my problem ?

          Thanks

          1 Reply Last reply Reply Quote 0
          • H
            honza
            last edited by

            Hello,

            I found a solution. I defined a Gateway on my LAN address and added a static route into the remote VPN network.
            Now it works.

            1 Reply Last reply Reply Quote 0
            • johnpozJ
              johnpoz LAYER 8 Global Moderator
              last edited by

              Ipsec is a problem..

              Why would you define a gateway on pfsense lan??  That is sure not how he gets through the ipsec tunnel.

              An intelligent man is sometimes forced to be drunk to spend time with his fools
              If you get confused: Listen to the Music Play
              Please don't Chat/PM me for help, unless mod related
              SG-4860 24.11 | Lab VMs 2.8, 24.11

              1 Reply Last reply Reply Quote 0
              • H
                honza
                last edited by

                Thanks for the repley.

                The Gateway was really the wrong approach.

                The real reason was, that I did not understand before, that "LAN network" does not contain "LAN address". So the FW blocked

                the lockup from pfSenses DNS.

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