Solved

ssh port and iptable

Posted on 2015-01-10
4
240 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
  • 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 61

Expert Comment

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

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

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…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

762 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now