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

    Firewall rule interface vs source network

    Scheduled Pinned Locked Moved Firewalling
    5 Posts 3 Posters 397 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.
    • K
      Krisbe
      last edited by

      Hi

      When you add a firewall rule on a specific interface, you can select 'any' or other networks as the 'source'. What is the benefit of selecting for eg. a rule on the 'LAN' interface the 'LAN net' as the source instead of just 'any'?

      a28e653b-bcc6-4090-ac99-95c74cf9ecbe-image.png

      Thanks

      johnpozJ V 2 Replies Last reply Reply Quote 0
      • johnpozJ
        johnpoz LAYER 8 Global Moderator @Krisbe
        last edited by johnpoz

        @Krisbe any would only make sense if the interface was being used as transit network.. In a normal network there would never be any source traffic into the lan interface from anything other than lan net..

        Even if was being used as transit it would be better to use cidr block like say 10.0.0/22 or something if you had multiple downstream networks that fell into that /22, or even an alias with whatever your downstream networks are.

        edit:
        Any would make much more sense on say your WAN, not really for lan side interfaces. Where you don't know what the source would be and you want to all for say a port forward.

        To expand on that - in reality your wan interface is actually a "transit" network - your connection to your isp that is a transit to get to and from the internet at large.

        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

        K 1 Reply Last reply Reply Quote 0
        • V
          viragomann @Krisbe
          last edited by

          @Krisbe
          If you limit the source to the interface subnet no connected device can act as a router.
          E.g. if a device has established a VPN to a remote network and is configured as a router, 'any' would allow remote resources to access anything on your site.
          Apart from this you can also limit a rule to a source single IP.

          1 Reply Last reply Reply Quote 0
          • K
            Krisbe @johnpoz
            last edited by

            @johnpoz said in Firewall rule interface vs source network:

            In a normal network there would never be any source traffic into the lan interface from anything other than lan net..

            Indeed. But for simple office setups, you have eg. VLANs for staff, IOT and guests. Why would you set the rules on eg. the 'staff' VLAN that has the source 'staff net' instead of just 'any', because that VLAN is just dedicated to the staff VLAN, there can be no other source.

            @viragomann said in Firewall rule interface vs source network:

            If you limit the source to the interface subnet no connected device can act as a router.

            Good point.

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

              @Krisbe said in Firewall rule interface vs source network:

              there can be no other source.

              exactly.. Rules should be as explicit as possible - why would you set any where there can only be staff, so set to staff net

              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
              • First post
                Last post
              Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.