開心生活站

位置:首頁 > IT科技 > 

linux防火牆關閉端口命令

IT科技1.12W

方法一:

重啟後生效 

開啟的具體命令是:chkconfig iptables on 

關閉的具體命令是:chkconfig iptables off 

驗證防火牆是否關閉的具體命令是chkconfig --list |grep iptables

方法二: 即時生效,但重啟後失效 

開啟的具體命令是:service iptables start 

關閉的具體命令是:service iptables stop 

在centos 7中:

systemctl stop firewalld.service #停止   

systemctl disable firewalld.service #禁用

linux防火牆關閉端口命令