Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 265
  • Last Modified:

ssh port and iptable

hello
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:
http://www.cyberciti.biz/faq/linux-iptables-firewall-flushout-configuration-every-5minutes/
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
0
Darren Wall
Asked:
Darren Wall
  • 2
1 Solution
 
savoneCommented:
You can set a cronjob to flush iptables every five minutes if you like.


*/5 * * * * /sbin/iptables -F
0
 
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?
0
 
savoneCommented:
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
0
 
gheistCommented:
What kind of linux is that? Is it same machine under DDOS attack?
0

Featured Post

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now