centos7 防火墙简单使用firewall
firewall-cmd --stat
firewall-cmd --reload
增加规则
firewall-cmd --zone=public --add-port=3306/tcp --permanent
#centos7启动防火墙
systemctl start firewalld.service
#centos7停止防火墙/关闭防火墙
systemctl stop firewalld.service
#centos7重启防火墙
systemctl restart firewalld.service
#设置开机启用防火墙
systemctl enable firewalld.service
#设置开机不启动防火墙
systemctl disable firewalld.service
#centos7查看防火墙所有信息
firewall-cmd --list-all
#centos7查看防火墙开放的端口信息
firewall-cmd --list-ports
增加规则
firewall-cmd --zone=public --add-port=8080/tcp --permanent
firewall-cmd --zone=public --add-port=8090/tcp --permanent
firewall-cmd --reload
firewall-cmd --list-ports
相关推荐
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