linux centOS开关防火墙,设置防火墙例外端口,开机启动、禁用

1、例外端口:查看、添加、删除:

firewall-cmd --list-all
firewall-cmd --zone=public --add-port=9000/tcp --permanent
firewall-cmd --zone=public --remove-port=9000/tcp --permanent

重载使生效:

firewall-cmd --reload

2、防火墙状态:查看、关闭、启动、重启:

systemctl status firewalld
systemctl stop firewalld
systemctl start firewalld
systemctl restart firewalld

 3、开机启动:查看、禁用、启用:

systemctl is-enabled firewalld
systemctl disable firewalld
systemctl enable firewalld

 相关文章:

centOS开启关闭服务,查看设置开机自启动,systemctl 工具使用

posted on 2019-03-07 14:10  小石头小祖宗  阅读(21)  评论(0编辑  收藏  举报  来源

导航