防火墙设置

1.查看防火墙状态

  service iptables status

当前源地址和目标地址之间是畅通的.

2。临时关闭防火墙

service iptables stop

3.查看防火墙开机的状态

 chkconfig iptables --list

# 0 - 停机
# 1 - 单用户模式
# 2 - 多用户,没有NFS
# 3 - 完全多用户模式(标准的运行级)
# 4 - 没有用到
# 5 - X11(xwindow) ,登陆后进入GUI
# 6 - 重新启动

表示在不同级别下的运行状态是on还是off。所以千万不用讲运行级别设置为0,6;最常用的就是2,3,5

4.永久关闭防火墙chkconfig iptables off

 

 

5.永久关闭防火墙chkconfig iptables on

 

posted @ 2019-07-29 17:23  行走看世界  阅读(162)  评论(0编辑  收藏  举报