Skip to content

Instantly share code, notes, and snippets.

@hiendnguyen
Created March 11, 2017 03:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hiendnguyen/54dcbcc9ee4d32b60cdc8d6c963ba04f to your computer and use it in GitHub Desktop.
Save hiendnguyen/54dcbcc9ee4d32b60cdc8d6c963ba04f to your computer and use it in GitHub Desktop.
CentOS 7 Firewall Setup
sudo systemctl start firewalld
sudo firewall-cmd --permanent --add-service=ssh
sudo firewall-cmd --permanent --add-service=http
sudo firewall-cmd --permanent --add-service=https
sudo firewall-cmd --reload
sudo systemctl enable firewalld
#To see any additional services that you can enable by name, type:
sudo firewall-cmd --get-services
#To list all services permanently added to firewall, type:
sudo firewall-cmd --permanent --list-all
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment