Solved

ssh port and iptable

Posted on 2015-01-10
4
256 Views
Last Modified: 2015-01-11
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
Comment
Question by:Darren Wall
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 23

Expert Comment

by:savone
ID: 40542120
You can set a cronjob to flush iptables every five minutes if you like.


*/5 * * * * /sbin/iptables -F
0
 

Author Comment

by:Darren Wall
ID: 40542181
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
 
LVL 23

Accepted Solution

by:
savone earned 500 total points
ID: 40542214
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
 
LVL 62

Expert Comment

by:gheist
ID: 40543376
What kind of linux is that? Is it same machine under DDOS attack?
0

Featured Post

Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
BIND is the most widely used Name Server. A Name Server is the one that translates a site name to it's IP address. There is a new bug in BIND (https://kb.isc.org/article/AA-01272), affecting all versions of BIND 9 from BIND 9.1.0 (inclusive) thro…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses

615 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question