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

    Guest VLAN Firewall Rule Clarification Please

    Scheduled Pinned Locked Moved Firewalling
    5 Posts 5 Posters 507 Views 4 Watching
    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.
    • U Offline
      uplink
      last edited by

      Hey All,

      I'm finally getting around to figuring out the firewall rules for my Guest VLAN network. For this network, all I want is the ability to internet browse, but not talk to any other VLAN on my LAN. So, after looking around on the internet, I found this these rules (see below) and they work great.

      I have an allow rule to talk to the router for DNS (where I have the DNS resolver enabled on port 53) and another rule that only allows non RFC1918 internal IP (internet) destination traffic.

      What I don't understand, is why do I even need the rule to the router for DNS queries? To me this doesn't make sense, since both the router (192.168.100.1) and my PC (192.168.100.2) are in the same VLAN. I thought as long as you're on the same VLAN, traffic doesn't even hit the router (or it's firewall)?

      Obviously, I'm lacking in networking knowledge, so I'm hoping someone could enlighten me ๐Ÿ˜€

      1ab29a4c-d5fd-4a07-adf2-28d3e0ff82ec-image.png

      Bob.DigB V JKnottJ johnpozJ 4 Replies Last reply Reply Quote 0
      • Bob.DigB Offline
        Bob.Dig LAYER 8 @uplink
        last edited by

        @uplink said in Guest VLAN Firewall Rule Clarification Please:

        why do I even need the rule to the router for DNS queries?
        ...
        I thought as long as you're on the same VLAN, traffic doesn't even hit the router (or it's firewall)?

        But you want to talk to (hit) the router, now you do need a rule.

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

          @uplink
          The rule set on the Guest interface filters any traffic entering this interface. If a connected device sends a DNS request to pfSense the packet also enters the guest interface. The none-RFC1918 rule doesn't cover its destination IP, however, hence you need an extra rule for it.

          Packets destined to any other IP within the guest subnet than pfSense won't pass pfSense and hence it cannot block that traffic.

          BTW: for DNS you should also allow TCP (TCP/UDP) protocol.

          1 Reply Last reply Reply Quote 0
          • JKnottJ Online
            JKnott @uplink
            last edited by

            @uplink said in Guest VLAN Firewall Rule Clarification Please:

            I'm finally getting around to figuring out the firewall rules for my Guest VLAN network. For this network, all I want is the ability to internet browse, but not talk to any other VLAN on my LAN. So, after looking around on the internet, I found this these rules (see below) and they work great.

            I have an allow rule to talk to the router for DNS (where I have the DNS resolver enabled on port 53) and another rule that only allows non RFC1918 internal IP (internet) destination traffic.

            What I don't understand, is why do I even need the rule to the router for DNS queries? To me this doesn't make sense, since both the router (192.168.100.1) and my PC (192.168.100.2) are in the same VLAN. I thought as long as you're on the same VLAN, traffic doesn't even hit the router (or it's firewall)?

            Obviously, I'm lacking in networking knowledge, so I'm hoping someone could enlighten me

            Here are my guest rules. They allow only access to the Internet and pinging the guest interface. Since they can't access anything on my network, I configured the DHCP server to point to the Google DNS, instead of my own.

            8dcbb704-e62e-42ef-807d-e54c3eccd7bf-image.png

            PfSense running on Qotom mini PC
            i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
            UniFi AC-Lite access point

            I haven't lost my mind. It's around here...somewhere...

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

              @uplink said in Guest VLAN Firewall Rule Clarification Please:

              To me this doesn't make sense, since both the router (192.168.100.1) and my PC (192.168.100.2) are in the same VLAN. I thought as long as you're on the same VLAN, traffic doesn't even hit the router (or it's firewall)?

              You are correct if device A wants to talk to B in the same network, they don't need to talk to pfsense. But in this case you specifically want to talk to pfsense (for dns). So yeah you need to allow that. Just like if device B in your network was running its own firewall.. You would need to allow A to talk to it, even though no router is involved in the conversation.

              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 25.07.1 | Lab VMs 2.8, 25.07.1

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