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

Subnet & Address w/ source and destination of firewall rules

Scheduled Pinned Locked Moved Firewalling
8 Posts 4 Posters 645 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.
  • C Offline
    CatSpecial202
    last edited by CatSpecial202 Jan 11, 2025, 5:43 PM Jan 11, 2025, 5:27 PM

    What is the difference between using these in the source and destination drop down within firewall rules?

    Are there any default Pass and Block rules built into these as well?

    <interface subnet>
    
    <interface address>
    

    What are examples of when you'd want to use both, either, or neither?

    B 1 Reply Last reply Jan 11, 2025, 9:24 PM Reply Quote 0
    • B Online
      bmeeks @CatSpecial202
      last edited by bmeeks Jan 11, 2025, 9:30 PM Jan 11, 2025, 9:24 PM

      @CatSpecial202 said in Subnet & Address w/ source and destination of firewall rules:

      What is the difference between using these in the source and destination drop down within firewall rules?

      Are there any default Pass and Block rules built into these as well?

      <interface subnet>
      
      <interface address>
      

      What are examples of when you'd want to use both, either, or neither?

      <interface subnet> is the network block or subnet the interface resides in. For example, 192.168.0.0/24 (where /24 denotes how many bits comprise the network portion of the address; the remaining bits define the host). That includes all addresses between 192.168.0.1 and 192.168.0.255 (although 255 is the broadcast address and not used for hosts).

      <interface_address> is the explicit single address assigned to the interface in pfSense. For example, 192.168.0.1/32 (where the /32 indicates a specific address in the netblock).

      You might use <interface_address> when prohibiting certain kinds of traffic from reaching the firewall itself. <interface_subnet> might be used when defining the source of inbound traffic on the interface to exclude any host that does not have an IP within that netblock.

      C 1 Reply Last reply Jan 13, 2025, 3:27 AM Reply Quote 1
      • C Offline
        CatSpecial202 @bmeeks
        last edited by Jan 13, 2025, 3:27 AM

        @bmeeks Thank you for the explanation. For each interface, due to the router's "default deny" property, do we need to explicitly allow access to the <interface address> for any rule permitting communication outside its own subnet?

        Additionally, if we want to enable broader access outside our intranet, would we need to allow access to the <WAN address>?

        J 1 Reply Last reply Jan 13, 2025, 3:30 AM Reply Quote 0
        • J Offline
          johnpoz LAYER 8 Global Moderator @CatSpecial202
          last edited by Jan 13, 2025, 3:30 AM

          @CatSpecial202 said in Subnet & Address w/ source and destination of firewall rules:

          would we need to allow access to the <WAN address>?

          No - that would be access to the wan address, not the internet.

          If you allow access to any, which would be the internet - that would give you access to pfsense IP on that network, because its IP would fall under "any" ;)

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

          C 1 Reply Last reply Jan 16, 2025, 2:48 AM Reply Quote 0
          • C Offline
            CatSpecial202 @johnpoz
            last edited by Jan 16, 2025, 2:48 AM

            @johnpoz

            How can I allow an interface access to the internet without using "any" as the destination in the firewall rule?

            I understand that "any" would include all interface addresses, which I want to avoid. Is there a better way to limit the destination to only external internet traffic?

            C 1 Reply Last reply Jan 16, 2025, 2:51 AM Reply Quote 0
            • C Offline
              chpalmer @CatSpecial202
              last edited by Jan 16, 2025, 2:51 AM

              @CatSpecial202 said in Subnet & Address w/ source and destination of firewall rules:

              How can I allow an interface access to the internet without using "any" as the destination in the firewall rule?

              I understand that "any" would include all interface addresses, which I want to avoid. Is there a better way to limit the destination to only external internet traffic?

              On the given interface.. set up block rules for each network you do not want to give access to.. then the last rule is the any rule..

              Rules are parsed from the top to the bottom. If you block a certain location first the any rule will not override that block rule.

              Triggering snowflakes one by one..
              Intel(R) Core(TM) i5-4590T CPU @ 2.00GHz on an M400 WG box.

              C 1 Reply Last reply Jan 16, 2025, 3:33 AM Reply Quote 0
              • C Offline
                CatSpecial202 @chpalmer
                last edited by Jan 16, 2025, 3:33 AM

                @chpalmer but doesnt this take away the whole principle of a "implicit deny"? We should only be having allow rules within each interface?

                C 1 Reply Last reply Jan 16, 2025, 3:41 AM Reply Quote 0
                • C Offline
                  chpalmer @CatSpecial202
                  last edited by chpalmer Jan 16, 2025, 3:44 AM Jan 16, 2025, 3:41 AM

                  @CatSpecial202 No. If you do not have any rules then everything is denied by default. Once you start adding rules then the top rule is parsed first.

                  block
                  block
                  block
                  then "allow all" that does not violate the block rule(s) above it.

                  Anything not expressly stated by the rules above then hit the default deny rule.

                  Triggering snowflakes one by one..
                  Intel(R) Core(TM) i5-4590T CPU @ 2.00GHz on an M400 WG box.

                  1 Reply Last reply Reply Quote 0
                  8 out of 8
                  • First post
                    8/8
                    Last post
                  Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                    This community forum collects and processes your personal information.
                    consent.not_received