iptable  -I INPUT -p tcp  -s 192.168.0.0/24   -j ACCEPT/DROP

这是插入一条,特别适用于要阻断某个主机的情况.默认RHEL会有一个RH-FIREWALL-INPUT链加入到了INPUT中.

-I代表插入到第一位置,-A表示追加到最后

 

当进行了很多的配置后,如何将“内存”中的配置保存,以便下次开机时使用呢?service iptables save

 [root@mail ~]# service iptables
Usage: /etc/init.d/iptables {start|stop|restart|condrestart|status|panic|save}

posted on 2011-11-15 19:58  胡彼德  阅读(239)  评论(0编辑  收藏  举报