Linux Firewall 初探¶
Linux Firewall 规则相关命令¶
1. 添加放行端口¶
sudo firewall-cmd --permanent --add-port=443/tcp
2. 删除放行端口¶
sudo firewall-cmd --permanent --remove-port=443/tcp
3. 添加放行服务¶
sudo firewall-cmd --permanent --add-service=http
4. 删除放行服务¶
sudo firewall-cmd --permanent --remove-service=http
重载防火墙¶
sudo firewall-cmd --reload
REF¶
[1]. https://goto-linux.com/zh-cn/2020/6/13/%E5%A6%82%E4%BD%95%E5%9C%A8rhel-8-/-centos-8%E4%B8%8A%E5%AE%89%E8%A3%85%E5%92%8C%E9%85%8D%E7%BD%AEsamba/