firewall port open in linux centos7 code example
Example 1: firewall port open centos
firewall-cmd --zone=public --add-port=2888/tcp --permanent
Then remember to reload the firewall for changes to take effect.
firewall-cmd --reload
Example 2: open firewall port in linux
Debian: sudo ufw allow PORT. CentOS: sudo firewall-cmd --zone=public --permanent --add-port=PORT/tcp sudo firewall-cmd --reload