linux防火墻(Centos 6.x版本)

基本语法

Centos 7.x版本是firewall

service  服务名 start		(功能描述:开启服务)
service  服务名 stop		(功能描述:关闭服务)
service  服务名 restart		(功能描述:重新启动服务)
service  服务名 status		(功能描述:查看服务状态) 
service  iptables  start	(功能描述:开启防火墙服务)
service  iptables  stop		(功能描述:关闭防火墙服务)
service  iptables  restart	(功能描述:重新启动防火墙服务)
service  iptables  status	(功能描述:查看防火墙服务状态)  ) 

chkconfig 设置后台服务的自启配置

chkconfig   	(功能描述:查看所有服务器自启配置)
chkconfig 服务名 off   (功能描述:关掉指定服务的自动启动)
chkconfig 服务名 on   (功能描述:开启指定服务的自动启动)
chkconfig 服务名 --list	(功能描述:查看服务开机启动状态)

(1)关闭iptables服务的自动启动chkconfig iptables off 永久
(2)开启iptables服务的自动启动chkconfig iptables on
(3)service iptables stop 暂时关闭防火墙:(立即生效,开机重启,会重新打开)

发布了23 篇原创文章 · 获赞 27 · 访问量 2269

猜你喜欢

转载自blog.csdn.net/MyNameIsWangYi/article/details/102771357
今日推荐