Portal Home > Knowledgebase > Articles Database > flushing iptables and avoiding losing remote access
Posted by thegeezer3, 10-13-2009, 05:07 AM Hi I want to know if i run the following iptables script, i wont lose my ssh remote access. Can anyone confirm this is ok?
Posted by eth1, 10-13-2009, 06:13 AM Yes, that should work. In addition to the above script you're using we strongly recommend that you set a cronjob for the root user which has, */5 * * * * iptables -F This will flush the iptables rules after every 5 minutes so even if you lock out of the server due to a bad iptables rule, the rules will be flushed every 5 minutes and you should be able to gain entry via SSH. This is a much better way of deploying iptables and retaining access in case of a mistake and when the server is miles away in a data center.
Add to Favourites Print this Article