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.

APF Reset

Discussion in 'General Discussion' started by ManXP, Oct 19, 2006.

  1. ManXP

    ManXP Well-Known Member

    Joined:
    Feb 3, 2005
    Messages:
    62
    Likes Received:
    0
    Trophy Points:
    6
    Hi,

    I need some ideas how it's possible to stop, disable, reset or uninstall APF without accesing shell. The problem is, that I was configuring ssh on one of my servers and changed ssh port. Also I removed port 22 from APF, and restarted everything.

    I don't know what the hell has happened (I was doing it for many times), but I just can't connect to SSH anymore. I changed SSH port to default 22 via my browser (found command to do it), but how can I do the same with APF?

    There is no WHMXtra installed, so I have no idea how to edit config file. Any comments?
     
  2. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    You can flush iptables from within WHM using the URL:

    Code:
    http://11.22.33.44:2086/scripts2/doautofixer?autofix=iptablesflush
    Where 11.22.33.44 is your servers IP address.
     
  3. Anishts

    Anishts Active Member

    Joined:
    Oct 6, 2005
    Messages:
    37
    Likes Received:
    0
    Trophy Points:
    6
    Hi

    How you reset sshd port using browser..? some command ? ;)
     
  4. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    There's a similar URL:

    Code:
    http://11.22.33.44:2086/scripts2/doautofixer?autofix=safesshrestart
    This will temporarily run up SSH on port 22 (if it can) but you'll still need to correct /etc/ssh/sshd_config once you get in.
     
  5. dropby23

    dropby23 Well-Known Member

    Joined:
    Jan 16, 2005
    Messages:
    155
    Likes Received:
    0
    Trophy Points:
    16
    where can we find the useful scripts they are not in faqs
     
  6. ManXP

    ManXP Well-Known Member

    Joined:
    Feb 3, 2005
    Messages:
    62
    Likes Received:
    0
    Trophy Points:
    6
    chirpy - Thank You so much, this command solved all my troubles. Thanks again!
     
  7. brendanrtg

    brendanrtg Well-Known Member

    Joined:
    Oct 4, 2006
    Messages:
    311
    Likes Received:
    0
    Trophy Points:
    16
    This is indeed very useful but has anyone encountered a problem where cpanel died and you are no longer able to access 2086 and 2087 while httpd is still functioning?

    To make matters worst, ssh is also refusing your connections due to high mem usage by the sites involved.

    How can we then force a reboot without shell or manual hands?
     
  8. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Unless you have remote console access, there's probably nothing you can do except have the server hard booted.
     
Loading...

Share This Page