Linux iptables 防火墙 添加删除 端口

一.  Linux 防火墙的启动和关闭

1.1 启动命令

[root@singledb ~]# service iptables stop

Flushing firewall rules:                                   [  OK  ]

Setting chains to policy ACCEPT: filter nat                [  OK  ]

Unloading iptables modules:                                [  OK  ]

[root@singledb ~]# service iptables start

Applying iptables firewall rules:                          [  OK  ]

Loading additional iptables modules: ip_conntrack_netbios_n[  OK  ]

1.2 设置开机自启动

[root@singledb ~]# chkconfig iptables off

[root@singledb ~]# chkconfig --list iptables

iptables        0:off   1:off   2:off   3:off   4:off   5:off   6:off

[root@singledb ~]# chkconfig iptables on

[root@singledb ~]# chkconfig --list iptables

iptables        0:off   1:off   2:on    3:on    4:on    5:on    6:off

[root@singledb ~]#

posted @ 2013-08-28 15:09  平凡的人生  阅读(617)  评论(0编辑  收藏  举报