linux-防火墙

来源:互联网 发布:移动宽带网络客服电话 编辑:程序博客网 时间:2024/05/24 06:10
查看防火墙状态:
[root@localhost init.d]# service iptables statusiptables:未运行防火墙。[root@localhost init.d]# /etc/init.d/iptables statusiptables:未运行防火墙。

打开防火墙:

[root@localhost init.d]# service iptables startiptables:应用防火墙规则:[确定]

关闭防火墙:
[root@localhost init.d]# service iptables stopiptables:将链设置为政策 ACCEPT:filter [确定]iptables:清除防火墙规则:[确定]iptables:正在卸载模块:[确定]

查看防火墙开机自启动的状态:
[root@localhost init.d]# chkconfig iptables --listiptables        0:关闭  1:关闭  2:关闭  3:关闭  4:关闭  5:关闭  6:关闭

设置防火墙开机不自启动:
[root@localhost init.d]# chkconfig iptables off

0 0
原创粉丝点击