Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login
    Introducing Netgate Nexus: Multi-Instance Management at Your Fingertips.

    DNS forwarder/DHCP server lockdown needed

    Scheduled Pinned Locked Moved Firewalling
    4 Posts 3 Posters 2.4k 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 Offline
      hepoberman
      last edited by

      I use two pfsense boxes for DHCP (working as peers) and as DNS forwarders (using Carp VIPs as primary and the secondary pfsense box as the secondary dns).

      All the DNS and DHCP requests come from Vlans. The default route for the routers are vlan1. Currently I am allow all traffic (bad)

      I need to allow DHCP and DNS requests from the vlan interfaces but nothing else. (I have a client using a dns forwarder as a gateway to port scan the local network, grr)

      I'm pretty sure the DNS rule should look like;

      (For VLAN 101)

      UDP V101 net any any    destined to UDP 53  ALLOW

      but I'm not real sure how to allow DHCP

      maybe …  UDP 0.0.0.0 67-68    any 67-68

      I think I need only 2 rules in each VLAN's firewall, one for DNS and one for DHCP. Will I also need a rule for VRRP ? Am I overlooking anything ?

      Thanks in advance!

      1 Reply Last reply Reply Quote 0
      • M Offline
        Metu69salemi
        last edited by

        floating rules might help you with this. then you need only two rules, unless you use aliases..
        and dhcp discover user udp destination port 67

        1 Reply Last reply Reply Quote 0
        • C Offline
          cmb
          last edited by

          The minimum required DHCP rules are auto-added so unless you've added some very permissive rules, there's nothing to do there. It's impossible to use a DNS forwarder as a gateway to port scan a network, if you describe what you're seeing, someone may be able to help fix whatever it is you're seeing that you think is that.

          1 Reply Last reply Reply Quote 0
          • H Offline
            hepoberman
            last edited by

            Ok, here's some screen shots of NTOP. This seems to show the VIP (which is the address assigned as the primary DNS server to this network) going sequentially from port 1 up to 1022. This one stayed inside the 104 VLAN in what appears to me to be one of those viruses that finds a gateway and starts probing it/ messing with it.

            Not to pass blame, but to explain the current firewall settings…I didn't set up the DNS forwarders/DHCP servers and it appears the original guy had trouble because he has allow any any in floating rules, lan rules, a few misc pass rules in various vlans, so it appears there was trouble setting everything up and pass rules just kept getting added. Now it is wide open and passes anything.

            There is no NAT set up, so this router cant get clients to the Internet but it seems to be VLAN routing, and allowing itself to be used as a gateway to explore the local side of the network.



            Firewall log from primary DNS forward/DHCP  It looks like I have clients trying to gateway out this box.

            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            Copyright 2026 Rubicon Communications LLC (Netgate). All rights reserved.
            Privacy Policy · Cookie Policy