Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save del-xiong/877363eebb0df8f1abf7960596ce2145 to your computer and use it in GitHub Desktop.
Save del-xiong/877363eebb0df8f1abf7960596ce2145 to your computer and use it in GitHub Desktop.
centos7 添加删除防火墙端口
添加端口
# firewall-cmd --zone=public --add-port=6022/tcp --permanent
# firewall-cmd --zone=public --add-port=6022/udp --permanent
删除端口
# firewall-cmd --zone=public --remove-port=6022/tcp --permanent
# firewall-cmd --zone=public --remove-port=6022/udp --permanent
之后运行firewall-cmd --reload或firewall-cmd --complete-reload重启就ok了
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment