Usually, on this kind of hardware, I would expect that the switch-part be operated by a dedicated hardware component (i.e. the embedded Linux would not see 8 independent interfaces and it would not take care of the bridging). Therefore, ebtables/iptables would have no effect on it.
But the whole point to put your machines on the same switch and on the same network segment (192.168.0.x) is to allow them to communicate with each other.
First, can't you assign a different network to each machine? That is: 192.168.port.0/24 for each port (or even 192.168.port.0/30). Then, at the IP level, the machines must use the router to communicate with each other, and you could use iptables to prevent that (if the router only sees one port for the whole switch as expected, disallow traffic coming from that port and forwarded to that same port).
This is a minimum but, due to the switch, it's still possible for a machine to communicate with others (e.g. IP address spoofing, other protocols than IP, specially crafted Ethernet frames, etc.). For better isolation (at the switch level), use VLANs to ensure that machines can only see the router at the Ethernet level.
ebtables
. You must ensure that broadcast frames on one port (i.e. VLAN) are not visible from another port. Once this has been confirmed, just useiptables
to prevent standard routing between ports. – xhienne Aug 16 '17 at 08:08ping -b <LAN_broadcast_IP>
) or just listen to ARP requests. – xhienne Aug 27 '17 at 14:14