赞
踩
systemctl start firewalld
systemctl stop firewalld
systemctl status firewalld
systemctl disable firewalld
systemctl enable firewalld
firewall-cmd --version
firewall-cmd --help
firewall-cmd --state
<1>开放80端口
firewall-cmd --zone=public --add-port=80/tcp --permanent
ps:–permanent 永久生效,没有此参数重启后失效
<2>重载配置
firewall-cmd --reload
<3>查看80端口是否对外开放
firewall-cmd --zone=public --query-port=80/tcp
<1>删除80端口
firewall-cmd --zone=public --remove-port=80/tcp --permanent
<2>重载配置
firewall-cmd --reload
<3>查看80端口是否对外开放
firewall-cmd --zone=public --query-port=80/tcp
firewall-cmd --zone=public --list-ports
firewall-cmd --panic-on
ps:用finalshell或者Xshell远程连接时不要使用这个命令,否则防火墙会拒绝掉远程连接工具
firewall-cmd --panic-off
firewall-cmd --query-panic
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。