Openwrt 是一个 GNU/Linux 的发行版, 和其他大多数的发行版一样,Openwrt 的防火墙同样也是基于 iptables。
iptables -L INPUT --line-numbers //列出INPUT 链所有的规则
iptables -D INPUT 4 //删除指定的第4行规则
iptables -R FORWARD 4 -i br0 -p tcp -m multiport --dports 80,3128,8080,8000 -j url_blocking //添加规则到指定的行数(例如第四行 -R )
iptables -R INPUT 2 -p icmp –-icmp-type 8 -s 0/0 -j DROP iptables -R INPUT 3 -p icmp –-icmp-type 0 -s 0/0 -j ACCEPT iptables -R OUTPUT 2 -p icmp –icmp-type 0 -s 192.168.29.1 -j DROP iptables -R OUTPUT 3 -p icmp –icmp-type 8 -s 192.168.29.1 -j ACCEPT iptables -A INPUT -p icmp --icmp-type 8 -s 0/0 -j DROP
iptables -F