ssh port and iptable

i don't have much knowledge to iptables and i managed to lock my self out few times
and im trying get a way to go back into the server if i missed something up
i fhave found this way:
but im not really sure ifts working on my system or not, so i have to be sure
and i don't have a linux on my house or another server to test it on it
anyone can confirm me that script is working probably ? or a way to stop iptables every 10 min? so i can log back in and fix stuff

thank you
Darren WallAsked:
Who is Participating?
savoneConnect With a Mentor Commented:
You don't need a rule to allow, as long as there is no rule or policy to deny.  If the INPUT policy is set to deny, you will shop to stop the service.

*/5 * * * *  /sbin/service iptables stop
You can set a cronjob to flush iptables every five minutes if you like.

*/5 * * * * /sbin/iptables -F
Darren WallAuthor Commented:
if  i flush it, i wont be able to connect remotely thro ssh? or  im mistaken?
cause there will be no rule to allow remote access to shh?
What kind of linux is that? Is it same machine under DDOS attack?
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.