Linux Add Port to the Firewall
作者:XD / 发表: 2025年3月6日 06:01 / 更新: 2025年3月6日 06:02 / 编程笔记 / 阅读量:35
1. Check current port
sudo firewall-cmd --list-all
2. Add port XXXX(8003) to the default public zone
sudo firewall-cmd --zone=public --add-port=8003/tcp --permanent
3. Reload the firewall to apply changes
sudo firewall-cmd --reload
4. Verify the added port
sudo firewall-cmd --list-all