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

    Block ip in the same subnet?

    Scheduled Pinned Locked Moved Firewalling
    4 Posts 4 Posters 5.8k 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.
    • M
      marcioducrato
      last edited by

      I created aliases of type host ex. 192.168.0.2 group1, group2 192.168.0.3 then 192.168.0.5, 192.168.0.6 then created rules with destination group1 group2 source block, most did not work how can I do this? block ip in the same subnet only remembering that there is no possibility to use vlan

      ex. 192.168.0.2 to 192.168.03 block

      1 Reply Last reply Reply Quote 0
      • P
        phil.davis
        last edited by

        If the traffic is between IP addresses in the same subnet (e.g. 192.168.0.2/24 to 192.168.0.3/24) then that traffic is passed by the switch (layer2). The pfSense LAN port is only 1 device on the switch. The switch will only send it packets addressed to the pfSense LAN MAC address and broadcast packets. So it cannot see packets between .2 and .3.
        So there is no way for pfSense to block, or even log, LAN traffic like that.

        As the Greek philosopher Isosceles used to say, "There are 3 sides to every triangle."
        If I helped you, then help someone else - buy someone a gift from the INF catalog http://secure.inf.org/gifts/usd/

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

          the only way to do something like that is if pfsense is bridge between the devices

          192.168.0.2 –- switch --- nic (pfsense bridge) nic --- switch --- 192.168.0.3

          In this case the traffic for the same subnet has to flow through pfsense and you can firewall traffic.

          But normally as phil stated above if your like this

          pfsense -- switch -- multiple pcs

          then no when the pcs take to each other pfsense never sees the traffic.

          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.8, 24.11

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

            As everyone above has stated, when all clients are on a single subnet and switch, it becomes somewhat impossible to block traffic between them.
            However, depending on what OS's you are using, it should be really easy to set up simple firewall rules on the individual machines to allow or disallow traffic on the same subnet.  That would be easy in a small environment.

            For instance, I'm now using a Ubuntu machine and it allows my subnet in/out but it blocks my kids computer by its IP which is static because pfsense has static IPs assigned.  Simple simple for just a few computers.  Or, in the case that you wanted all traffic silently dropped between all computers on the network, thats also easy.  Just turn on the firewall on each computer, set up no rules and they would drop all unsolicited packets.  Windows firewall also allows this.

            Having a firewall on the router is nice, but its not your only line of defence.

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