评论

收藏

iptables防火墙

avatar 360 | 2245 人阅读 | 0 人评论 | 2016-08-14

一、检查iptables服务状态
首先检查iptables服务的状态

[root@woxplife ~]# service iptables status
iptables: Firewall is not running.
说明iptables服务是有安装的,但是没有启动服务。
如果没有安装的话可以直接yum安装

yum install -y iptables
启动iptables

[root@woxplife ~]# service iptables start
iptables: Applying firewall rules:                         [  OK  ]
看一下当前iptables的配置情况

[root@woxplife ~]# iptables -L -n


添加到自启动chkconfig
[root@woxplife ~]# chkconfig iptables on

""
还没有人打赏,支持一下
您需要登录后才可以回帖 登录 | 注册 微信登录

EA之家评论守则