比如:我需要指定mac访问外网IP某端口
#禁止所有设备访问80端口
iptables -I INPUT -p tcp --dport 80 -j DROP
# 增加设备允许访问80端口
iptables -I INPUT -p tcp --dport 80 -m mac --mac-source 你想访问的设备MAC地址 -j ACCEPT 比如:我需要指定mac访问外网IP某端口
#禁止所有设备访问80端口
iptables -I INPUT -p tcp --dport 80 -j DROP
# 增加设备允许访问80端口
iptables -I INPUT -p tcp --dport 80 -m mac --mac-source 你想访问的设备MAC地址 -j ACCEPT
评论 (0)