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
#!/bin/bash | |
# | |
# Update the ipset that iptables references for allowing/blocking based on country. | |
# Takes 2 parameters: ipset name (no spaces), country name e.g. 'Australia' | |
# | |
# iptables should have an existing '--match-set' rule e.g | |
# $ iptables -I INPUT -p tcp --dport 22 -m set --match-set australia4 src -j ACCEPT | |
# $ ip6tables -I INPUT -p tcp --dport 22 -m set --match-set australia6 src -j ACCEPT | |
# |