I currently limit IP addresses that have access to my SSH service with a rule like this
# accept already established iptables -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT iptables -A INPUT -p tcp --source w.x.y.z/32 --dport 22 -j ACCEPT iptables -A INPUT -p tcp --source a.b.c.d/32 --dport 22 -j ACCEPT #drop everyting else iptables -A INPUT -j DROP iptables -P FORWARD DROP
Where w.x.y.z and a.b.c.d are the allowed IPs.
I have this rule on multiple servers.
What would be the best way to be able to add and remove IPs to the allowed list and reload all servers rules so the changes are effective?