RND GROUP LIMITED HomeCapabilitiesAbout usContact us

Stupid iptables or stupid me?

September 26th, 2007

Well there we have it. Working on a production system lock down ssh and bang! Can’t ssh in any more. How many times have I told myself that I should have a cronjob that stops iptables after 5 mins so you can get in if you stuff it all up! Anyway for those of you who have typo-minded fingers drop the following in /etc/cron.d/iptables before you add or reload iptables:

*/5 * * * * root /etc/init.d/iptables stop

If you make a mistake cron (presuming its running) should stop iptables and you should be able to get back in. Don’t forget to remove it once your finished otherwise there isn’t much use in having iptables running in the first place.

Good luck! ;-)