how to block all tcp and udp and other protocol and only allow layer 2 communication?
sudo ufw disable
sudo ufw default deny
sudo ufw allow XXXX
sudo ufw enable
Does sudo ufw disable block layer 2 by default?
How to block all TCP, UDP and other protocols, so only layer 2 communication is allowed?
How to drop a frame when layer 2 received frame size is greater than 64?
All these will be in dedicated line of ISP.
if using iptable, is below command correct?
iptables -N CHECK1
iptables -A INPUT -p all -m length --length 0
iptables -A CHECK1 -j DROP
or
// drop all
iptables -N CHECK1
iptables -A INPUT -p all
iptables -A CHECK1 -j DROP
update:
iptable -p option do not have layer 2 after googled how to drop frame over size 64?
should we consider size of tpacket_hdr as well? 32+64 = 96 because size of tpacket_hdr = 32
|