add port firewall centos 7 code example
Example 1: firewall-cmd add port 8080
sudo firewall-cmd --zone=public --permanent --add-port=5000/tcp
sudo firewall-cmd --zone=public --permanent --add-port=4990-4999/udp
sudo firewall-cmd --zone=public --permanent --list-ports
Example 2: centos 7 port open
firewall-cmd --zone=public --add-port=55555/tcp --permanent
firewall-cmd --reload
Example 3: install firewall-cmd centos 7
sudo yum install firewalld
sudo systemctl enable firewalld
sudo reboot