Block ip in the same subnet?



  • 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



  • 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.


  • Rebel Alliance Global Moderator

    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.



  • 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.