Created
March 11, 2017 03:35
-
-
Save hiendnguyen/54dcbcc9ee4d32b60cdc8d6c963ba04f to your computer and use it in GitHub Desktop.
CentOS 7 Firewall Setup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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