Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save akhdaniel/7d23c744e0efd1495ed46b02d5b6b7ad to your computer and use it in GitHub Desktop.
Save akhdaniel/7d23c744e0efd1495ed46b02d5b6b7ad to your computer and use it in GitHub Desktop.
How To Open A Port In CentOS 7 With Firewalld

Open Specific Port

firewall-cmd --permanent --add-port=100/tcp
firewall-cmd --reload
firewall-cmd --list-ports
firewall-cmd --permanent --add-port=200-300/tcp

Open Predefined Service

firewall-cmd --permanent --add-service=http
firewall-cmd --reload
firewall-cmd --list-services
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment