Created
April 3, 2019 07:33
-
-
Save rdymc/626c092a2ee059837dd23700e01d0757 to your computer and use it in GitHub Desktop.
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/bash | |
| firewall-cmd --remove-service=ssh --permanent | |
| #firewall-cmd --add-service=http --add-source=1.1.1.1/32 --permanent | |
| #firewall-cmd --add-service=ssh --add-source=1.1.1.1/32 --permanent | |
| firewall-cmd --add-rich-rule="rule family="ipv4" source address="1.1.1.1" service name="ssh" accept" --permanent | |
| firewall-cmd --add-rich-rule="rule family="ipv4" source address="1.1.1.1" service name="http" accept" --permanent | |
| firewall-cmd --reload | |
| firewall-cmd --list-all | |
| iptables -S |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment