Created
December 3, 2014 23:19
-
-
Save supershabam/5c415683f5bd4c0afe9b to your computer and use it in GitHub Desktop.
dynamic iptables rules using updating groups
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
# Accept packets from trusted IP addresses | |
iptables -A INPUT -s group:web_workers -j ACCEPT # change the IP address as appropriate | |
# enumerates group to create several rule lines | |
# iptables -A INPUT -s 123.1.1.2 -j ACCEPT # change the IP address as appropriate | |
# iptables -A INPUT -s 123.1.1.3 -j ACCEPT # change the IP address as appropriate | |
# as the web_workers group is updated, the rules are recreated and iptables flushed |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment