I am working iptables on Ubuntu 12.04. I would like to configure the iptables rules so that ssh is only allowed from one specific address. When I enter the following, it works:
sudo iptables -A INPUT -p tcp -s a.b.c.d --dport ssh -j ACCEPT
With that rule in place I can establish an ssh connectin from the specified address.
Now I want to make the rule persistent, so that it still works after a reboot. I add this line to the /etc/rc.local file:
/sbin/iptables -A INPUT -p tcp -s a.b.c.d --dport ssh -j ACCEPT
Then I reboot and it does not work. Can anyone tell me why this does not work and what I must do to make the rule persistent?