Solved

ssh port and iptable

Posted on 2015-01-10
4
245 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 62

Expert Comment

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

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

786 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