Created
November 24, 2016 01:25
-
-
Save uemuraj/8433969323deb8be31e99cfdafb29b92 to your computer and use it in GitHub Desktop.
CentOS7 でファイアウォールの設定をする時の覚え書き
This file contains hidden or 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
#!/bin/sh | |
firewall-cmd --zone=public --list-all | grep "80/tcp" || firewall-cmd --permanent --zone=public --add-port=80/tcp | |
firewall-cmd --zone=public --list-all | grep "443/tcp" || firewall-cmd --permanent --zone=public --add-port=443/tcp | |
firewall-cmd --reload |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment