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
相关文章: