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

    Confusion About Firewall Rules?

    Firewalling
    4
    5
    1.4k
    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.
    • F
      FroToast
      last edited by

      Hi,

      I currently have a segregated local network using VLAN and I would like to create rules to restrict certain subnets to only WAN access. The problem is, when I setup a rule using

      (Source subnet) Block (restricted subnet) Protocol: any
      (Moved to the top of the list)

      I end up restricting the mentioned subnet to all locations.

      IE: Cannot access firewall, cannot access any other subnet

      However, if I set the source to ANY, and then simply set the destination to the subnet that I want to block, it works.

      Why is that?

      For context, I have a VLAN for the guys that rent the basement downstairs and a VLAN for everyone else upstairs. I want to block their subnet off from ours (upstairs).

      I would be grateful for your insight,

      Thanks in advance,
      Michael L.

      1 Reply Last reply Reply Quote 0
      • NogBadTheBadN
        NogBadTheBad
        last edited by

        You need to create an alias with all your local subnets in, then create a rule to allow anything out to that host / alias and tick invert match on the destination.

        You don't want the guys downstairs accessing your router so block off ssh & web access to the firewall interfaces.

        Untitled.jpg
        Untitled.jpg_thumb

        Andy

        1 x Netgate SG-4860 - 3 x Linksys LGS308P - 1 x Aruba InstantOn AP22

        1 Reply Last reply Reply Quote 0
        • K
          kholmqvist
          last edited by

          The firewall rules are always matched from top to bottom so you should create a rule that drops traffic from network downstairs to upstairs as the first entry in the VLAN (Downstairs) rule tab. And then create your allow rules below. That would drop all the packages from downstairs to upstairs cause they are matched by the first rule. everything else would be allowed to whatever it's destination is.

          I have added a picture of how it could look.

          ![Screen Shot 2016-11-23 at 14.46.13.png](/public/imported_attachments/1/Screen Shot 2016-11-23 at 14.46.13.png)
          ![Screen Shot 2016-11-23 at 14.46.13.png_thumb](/public/imported_attachments/1/Screen Shot 2016-11-23 at 14.46.13.png_thumb)

          1 Reply Last reply Reply Quote 0
          • F
            FroToast
            last edited by

            Hey,

            Sorry for the late reply.

            Yes, I understand what you're mentioning. That's exactly what I've been doing. Except somehow it just ends up blocking everything entirely.

            In your example, you setup your source as "guest net" and destination as "n_ip_local_subnets". My issue is whenever I setup the interface subnet as the source, It just ends up blocking all traffic and I don't know why.

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

              Pass local assets they need to access
              Block local assets they shouldn't access
              Pass the internet.

              ![Screen Shot 2016-06-18 at 9.34.20 PM.png](/public/imported_attachments/1/Screen Shot 2016-06-18 at 9.34.20 PM.png)
              ![Screen Shot 2016-06-18 at 9.34.20 PM.png_thumb](/public/imported_attachments/1/Screen Shot 2016-06-18 at 9.34.20 PM.png_thumb)

              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.