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

Understanding the Source "LAN net"

Scheduled Pinned Locked Moved Firewalling
6 Posts 5 Posters 8.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.
  • J
    Jeremy11one
    last edited by Oct 14, 2014, 8:41 PM Oct 14, 2014, 7:05 PM

    Consider this firewall rule on the LAN interface:
    Allow
    Source: Any
    Destination: Any

    I am wondering if there is any difference between that and this rule on the same LAN interface:
    Allow
    Source: LAN net
    Destination: Any

    This question may lead to the answer:
    If pfSense's LAN net is 192.168.1.0/24 but that subnet also connects to 192.168.2.0/24 through a different router, would hosts on the 192.168.2.0 subnet be allowed to send traffic out through pfSense when the Source is "LAN net" or would they be blocked since those hosts are not originating on the LAN net (though they are hitting the pfSense LAN interface)?

    1 Reply Last reply Reply Quote 0
    • K
      KOM
      last edited by Oct 14, 2014, 7:23 PM

      My understanding is that Any is literally any valid address, and LAN net means the specific LAN subnet only.  In your case, LAN net would be 192.168.1.0/24.

      1 Reply Last reply Reply Quote 0
      • M
        mikeisfly
        last edited by Oct 14, 2014, 7:40 PM

        Just to add on to this you could imagine if someone hooked up a router (Not NAT) to your LAN and then tried to pass traffic from their LAN to your LAN. Making the source address LAN subnet would block traffic from the second router. This is obviously easily defeated with NAT.

        1 Reply Last reply Reply Quote 0
        • J
          johnpoz LAYER 8 Global Moderator
          last edited by Oct 14, 2014, 7:41 PM

          "would hosts on the 192.168.2.0 subnet be allowed to send traffic out through pfSense when the Source is "LAN net""

          No - is 192.168.2.0/24 your lan net?? ;)

          The any rules allows any source IP, like your downstream 192.168.2.0/24 network to use the lan segment – but keep in mind your going to have to route that traffic, and you will need to edit the outbound nat rules to allow that to happen.

          Are you sure the lan defaults to ANY as source?  Im pretty sure it defaults to lan net as the default rule on the lan, the protocols are ANY, but the source I am like 99% sure is lan net.  Since you would have to make adjustments to nat outbound and add a route in pfsense for any to be a viable working solution.  You NEVER set gateways on the LAN interfaces in pfsense.

          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
          • J
            Jeremy11one
            last edited by Oct 14, 2014, 8:30 PM

            Excellent answers.  Thank you everyone for your help!

            @johnpoz:

            Are you sure the lan defaults to ANY as source?  Im pretty sure it defaults to lan net as the default rule on the lan,

            I thought it defaults to Any source but since you say you're 99% sure, I'd bet you're right. I'll edit my first post.

            1 Reply Last reply Reply Quote 0
            • D
              Derelict LAYER 8 Netgate
              last edited by Oct 14, 2014, 9:51 PM

              I don't think it is ever wrong to filter and interface such that only traffic that should be coming in is let in, nor is it ever wrong to filter an interface such that only traffic that should be allowed to leave is allowed to leave.  If more ISPs did the latter, DDoS would be a LOT harder.

              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
              1 out of 6
              • First post
                1/6
                Last post
              Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                This community forum collects and processes your personal information.
                consent.not_received