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

    Running DNS Responder for LAN, and DNS Firewall for guest network

    DHCP and DNS
    5
    9
    979
    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
      earl
      last edited by

      Perhaps someone else might find this useful. I have been retrofitting my network with pfSense and wanted to use the DNS Responder for my private network, and keep DNS Responder away from the guest network so that guest hosts cannot see private names advertised for the private network.

      With DNS Responder running, I think the pfSense server is advertised as the Name Server even on DHCP leases obtained in the guest network. I restricted the DNS Responder to only listen on the private network, leaving the guest network with no working DNS service.

      The solution that I have right now is to run the DNS Forwarder, but only have it listen to port 51 on localhost only. Then on the guest network interface, I set up a NAT port forward from the port 53 on the guest network interface to port 51 on localhost.

      This seems to work ok.

      Are there any other configurations that might work in this scenario?

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

        Hi,

        Just a question : why hiding device names - and thus IP address ?
        With some basic firewall rules they can't access your LAN anyway.

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

        1 Reply Last reply Reply Quote 0
        • jahonixJ
          jahonix
          last edited by

          The way to block guest access to your LAN is by security (rules). Security by obscurity (hiding your hosts) is never a good or even safe way to do it.

          1 Reply Last reply Reply Quote 0
          • E
            earl
            last edited by

            Thanks for your suggestions. My configuration includes firewall rules to keep the guest network traffic off the private network.

            I'm thinking that if the DNS Responder is listening on both networks, and responsive to both. I was seeking to improve that isolation. Keeping the DNS Responder off the guest network provides a some improvement by reducing the attack surface (ie guests cannot attack DNS Responder). Furthermore I do not wish to publish any private information on the guest network.

            The DNS Resolver options "General DNS Resolver Options"/"Network Interfaces" already provides a way to keep the resolver off the guest network interface, though I do wonder if it just does not listen on that interface or whether it listens, receives, then discards. Even if the latter though, some firewall rules can enforce this.

            What I would prefer is for the upstream DNS server by provided to the guest network hosts directly (via DHCP), obviating the need for pfSense to serve any DNS requests (whether it be on the DNS Responder or DNS Forwarder) at all from the guest network.

            On the DHCP server page there is: "Leave blank to use the system default DNS servers: this interface's IP if DNS Forwarder or Resolver is enabled, otherwise the servers configured on the System / General Setup page."

            I want to enable the DNS Resolver so that I can use it on the private network. This has the side effect of advertising the pfSense IP address as the DNS server on the guest network.

            Is there a way to have the DHCP server propagate the upstream DNS server (which was in turn obtained by DHCP) to the guest network in this case?

            1 Reply Last reply Reply Quote 0
            • DerelictD
              Derelict LAYER 8 Netgate
              last edited by

              Yeah. Enter the DNS servers in the DHCP server for the guest network.

              Then block access to the local DNS servers using guest network interface rules.

              Chattanooga, Tennessee, USA
              A comprehensive network diagram is worth 10,000 words and 15 conference calls.
              DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
              Do Not Chat For Help! NO_WAN_EGRESS(TM)

              1 Reply Last reply Reply Quote 0
              • E
                earl
                last edited by

                @Derelict:

                Enter the DNS servers in the DHCP server for the guest network.

                The IP address of the upstream DNS server is only known when the DHCP lease is obtained on the WAN network.

                Is there a way to indicate that this address should be used when naming the DNS server for the guest network?

                1 Reply Last reply Reply Quote 0
                • DerelictD
                  Derelict LAYER 8 Netgate
                  last edited by

                  Then set up your own DNS servers or tell them to use one of the many free DNS servers whose addresses never change.

                  Google
                  8.8.8.8
                  8.8.4.4

                  Level3
                  4.2.2.1
                  4.2.2.2
                  4.2.2.3
                  4.2.2.4
                  4.2.2.5
                  4.2.2.6

                  OpenDNS
                  208.67.222.222
                  208.67.220.220

                  Quad9
                  9.9.9.9
                  149.112.112.112
                  2620:fe::fe
                  2620:fe::9

                  Chattanooga, Tennessee, USA
                  A comprehensive network diagram is worth 10,000 words and 15 conference calls.
                  DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
                  Do Not Chat For Help! NO_WAN_EGRESS(TM)

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

                    "The IP address of the upstream DNS server is only known when the DHCP lease is obtained on the WAN network."

                    Huh… Your saying ISP changes the IPs of their name servers?  Or they hand out a pool of them so that you might get A and B today, but if you get new IP tmrw you get C and D, then maybe next week you are back to A and B?  Or B and D?  Or does the IP they hand out change per netblock your on from the ISP and you can not query their other servers when on a different netblock?

                    Seem odd that a ISP would change the IPs of the dns they run for their clients.. Having a hard time understanding a use case for doing such a thing?  Or is it you just don't know what your ISP dns IPs are?

                    Either way Derelict listed many of the most popular dns you could use for your guest clients.

                    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.7.2, 24.11

                    1 Reply Last reply Reply Quote 0
                    • DerelictD
                      Derelict LAYER 8 Netgate
                      last edited by

                      Yeah. You might get the ISP DNS server dynamically but I would bet if you CALLED THEM AND ASKED they could give you a list of addresses to use.

                      Chattanooga, Tennessee, USA
                      A comprehensive network diagram is worth 10,000 words and 15 conference calls.
                      DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
                      Do Not Chat For Help! NO_WAN_EGRESS(TM)

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