What's new

Blocking Ethernet clients from connecting to each other

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Denna

Senior Member
This is for a home network that doesn't share resources.

Is this the easiest way to block Ethernet clients on the same router from connecting to each other ?

1) Configure the WebGUI DHCP address range. For example, 192.168.1.2 - 192.168.1.4.​

2) Create a /<path>/dhcp_cli.sh script file

3) Run chmod +x /<path>/dhcp_cli.sh

4) Fill the dhcp_cli.sh script with the DHCP addresses

ipset -N DHCP_CLI hash:ip

ipset add DHCP_CLI 192.168.1.2
ipset add DHCP_CLI 192.168.1.3
ipset add DHCP_CLI 192.168.1.4
5) Run the /<path>/dhcp_cli.sh script

6) Create iptables rule

iptables -A FORWARD -m set --set DHCP_CLI -src,dst -j DROP​
 
You would require a managed switch to block clients on the same LAN. Or use the firewall on the actual clients themselves. Or alternatively use both a VLAN aware router and a managed switch.

Whenever LAN clients connect to each other it's mostly an ethernet/MAC (layer 2) thing, which a router (Layer 3) is unconcerned with. https://en.wikipedia.org/wiki/OSI_model#Description_of_OSI_layers
 

Similar threads

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top