firewall-cmd.md (448B)
1 # firewall-cmd 2 3 ## add / remove port 4 ``` 5 firewall-cmd --permanent --add-port=<port_num>/<protocol> 6 firewall-cmd --permanent --remove-port=<port_num>/<protocol> 7 8 firewall-cmd --permanent --add-port=22/tcp 9 firewall-cmd --permanent --remove-port=22/tcp 10 ``` 11 12 ## open port on specific ip 13 [serverfault answer][] 14 15 [serverfault answer]: https://serverfault.com/questions/684602/how-to-open-port-for-a-specific-ip-address-with-firewall-cmd-on-centos#684603