linux防火牆關閉端口命令
來源:趣味經驗館 1.08W
方法一:
重啓後生效
開啓的具體命令是: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 #禁用