The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

preventing being locked out from system?

Discussion in 'General Discussion' started by Mo, Oct 15, 2003.

  1. Mo

    Mo Active Member

    Joined:
    Nov 21, 2001
    Messages:
    25
    Likes Received:
    0
    Trophy Points:
    1
    Is there any sure way of preventing a firewall / iptables from locking up and not allowing anyone access to the server via SSH? I remember a cron script running might help but cant seem to find it?

    Any help is appreciated!

    cPanel.net Support Ticket Number:
     
  2. haze

    haze Well-Known Member

    Joined:
    Dec 21, 2001
    Messages:
    1,550
    Likes Received:
    3
    Trophy Points:
    38
    If you aren't very familiar with iptables you might want to get a script to help you manage it. I use and recommend APF from r-fx.net. You can add your IP to the allow_hosts.rules script which will allow access from your IP.

    cPanel.net Support Ticket Number:
     
  3. hostit1

    hostit1 Well-Known Member

    Joined:
    Jul 24, 2003
    Messages:
    88
    Likes Received:
    0
    Trophy Points:
    0
    I think I know what you mean. Possibly

    Are you running into the problem of creating a firewall rule, applying it, then being locked out?

    Create a small sh script with the following:

    service iptables start
    sleep 10
    service iptables stop


    chmod it 755

    Run it by typing in ./filename

    What it will do is start ip tables for 10 seconds, then it will kill the service. If you get locked out, then you know that there is a issue with your rule.
    In 10 seconds, you should be able to ssh back into the box and fix the rule. If after you apply then start the iptables service and you don't get locked out, then you can do a service iptables start

    This is what i do at least.

    Tim
     
Loading...

Share This Page