CentOS7配置防火墙
使用命令的方式配置CentOS7防火墙
##Add
firewall-cmd --permanent --zone=public --add-port=80/tcp
##Remove
firewall-cmd --permanent --zone=public --remove-port=80/tcp
##Reload
firewall-cmd --reload
复制代码
检查是否生效
firewall-cmd --zone=public --query-port=80/tcp
列出所有的开放端口
firewall-cmd --list-all
查看防火墙状态
systemctl status firewalld.service
启动防火墙
systemctl start firewalld.service
关闭防火墙
systemctl stop firewalld.service
重新启动防火墙
systemctl restart firewalld.service
相关推荐
89284553 2020-07-17
大老张学编程 2020-07-04
lizhengfa 2020-06-26
Aveiox 2020-06-25
85407718 2020-06-10
老谢的自留地 2020-05-29
yshlovelx 2020-05-27
大老张学编程 2020-05-09
summerinsist 2020-04-23
89284553 2020-04-10
yshlovelx 2020-03-27
Wepe0 2020-10-30
Lostinthewoods 2020-10-29
hickwu 2020-10-23
focusforce 2020-10-10
summerinsist 2020-08-21
winki 2020-08-19