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.

block ip from accessing server in apf?

Discussion in 'General Discussion' started by chadi, Jul 25, 2004.

  1. chadi

    chadi BANNED

    Joined:
    Apr 20, 2004
    Messages:
    415
    Likes Received:
    0
    Trophy Points:
    0
    How can I block an IP from accessing the server in general in APF firewall?
     
  2. sawbuck

    sawbuck Well-Known Member

    Joined:
    Jan 18, 2004
    Messages:
    1,367
    Likes Received:
    5
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    /sbin/iptables -I INPUT -s "IP Address" -j DROP
     
  3. chadi

    chadi BANNED

    Joined:
    Apr 20, 2004
    Messages:
    415
    Likes Received:
    0
    Trophy Points:
    0
    Ok, I did that but it doesn't do anything in command (just shows root@server line again). Is this normal? Also, how can I check to make sure that APF is actually on and working? I forget the command line for that.
     
  4. chadi

    chadi BANNED

    Joined:
    Apr 20, 2004
    Messages:
    415
    Likes Received:
    0
    Trophy Points:
    0
    I checked mail queue (reason for blocking IP's in first place). There is one message that is locked.

    Message 1Bovl7-0006Df-Vy is locked
    Mail Queue Removed


    Why and how do I delete it?
     
  5. sawbuck

    sawbuck Well-Known Member

    Joined:
    Jan 18, 2004
    Messages:
    1,367
    Likes Received:
    5
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    /usr/local/sbin/apf -l
     
  6. sawbuck

    sawbuck Well-Known Member

    Joined:
    Jan 18, 2004
    Messages:
    1,367
    Likes Received:
    5
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    In WHM>>Email>>Manage Mail Queue
     
  7. chadi

    chadi BANNED

    Joined:
    Apr 20, 2004
    Messages:
    415
    Likes Received:
    0
    Trophy Points:
    0
    Please re-read what I said. I am already in there (mail queue) but it won't delete it.
     
  8. sawbuck

    sawbuck Well-Known Member

    Joined:
    Jan 18, 2004
    Messages:
    1,367
    Likes Received:
    5
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    Try exim -Mrm <id>
     
  9. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    It will be locked because exim is currently processing it. If you temporarily shutdown exim, you should then be able to delete the message.

    Also, you ought to use the following if you want to permanently block an IP through APF:

    apf -d 11.22.33.44
     
Loading...

Share This Page