firewalld 放开 关闭端口

firewalld 放开 关闭端口:
systemctl start firewalld
systemctl enable firewalld

firewall-cmd --permanent --add-port=8080/tcp
firewall-cmd --reload
firewall-cmd --list-ports

移除特定端口的所有规则:
firewall-cmd --permanent --zone=public --remove-port=端口号/tcp
firewall-cmd --reload

posted @ 2024-11-27 10:59  walkersss  阅读(68)  评论(0)    收藏  举报