How to used iptable block port by Mac Address
iptables -A INPUT -i eth0 -p udp --dport 5060 -j ACCEPT
iptables -A INPUT -i eth0 -p tcp --dport 22 -j ACCEPT
iptables -A INPUT -i eth0 -p tcp --dport 80 -j ACCEPT
iptables -A INPUT -i eth0 -p tcp --dport 443 -j ACCEPT
iptables -A INPUT -i eth0 -p tcp --dport 1883 -j ACCEPT
iptables -A INPUT -p tcp --destination-port 7777 -m mac --mac-source 28:D2:44:2A:EF:AD -j ACCEPT
iptables -A INPUT -i eth0 -m state --state NEW,INVALID -j DROP
----------------------------------------------------------
Allow UDP 5060, TCP 22,80,443,7777(By Mac Address)
Red Command is deny all connection, only Allow port can access.
沒有留言:
張貼留言