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 and İp Block

Discussion in 'General Discussion' started by MrNone, Nov 16, 2004.

  1. MrNone

    MrNone Active Member

    Joined:
    Sep 25, 2004
    Messages:
    38
    Likes Received:
    0
    Trophy Points:
    6
    Hi.

    How can i block some ip with APF ?

    Thank you
     
  2. dgbaker

    dgbaker Well-Known Member
    PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,578
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Toronto, Ontario Canada
    cPanel Access Level:
    DataCenter Provider
    From SSH as root

    Block an IP:
    apf -d IP

    Allow an IP:
    apf -a IP

    To block an entire class or part of a class, edit /etc/apf/deny_hosts.rules and follow the examples,like adding 24.202.11.0/24 etc... then restart apf.
     
  3. MrNone

    MrNone Active Member

    Joined:
    Sep 25, 2004
    Messages:
    38
    Likes Received:
    0
    Trophy Points:
    6
    Thank you very much! I have a one question. Can i block proxy users?

    Thank you
     
  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
    Only if you know the IP addresses of the proxy servers they are using and block them as dgbaker instructed. There's no way to just single them out.
     
  5. gorilla

    gorilla Well-Known Member

    Joined:
    Feb 3, 2004
    Messages:
    699
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Sydney / Australia
    is it better to block IPs with APF or with iptables ?
    Or is it much of a muchness ? :p
     
  6. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    If you're got APF installed, you might as well use APF ;) Any allows or denys will survive reboots.
     
  7. gorilla

    gorilla Well-Known Member

    Joined:
    Feb 3, 2004
    Messages:
    699
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Sydney / Australia
    thanks chirpy , u r a champ! initially before I had APF installed i went through my joyfull nightly routine to block those anoying IPs with IPtables and am still in the routine even I got the combo of BFD /APF starting to blocking them as well ! :D I guess am just paranoid ! :rolleyes:

    BTW followed the thread about server security and /tmp and couldnt help noticing the absents of your knowledgeable input ?
     
  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
    I think I've done my duty in older threads on the topic :p
     
  9. gorilla

    gorilla Well-Known Member

    Joined:
    Feb 3, 2004
    Messages:
    699
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Sydney / Australia
  10. dgbaker

    dgbaker Well-Known Member
    PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,578
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Toronto, Ontario Canada
    cPanel Access Level:
    DataCenter Provider
    Plus you can sometimes talk until your blue and people will still either ignore the advise or go what? :D And as always SEARCH is their friend. No sense in repeating what's already been said. ;)
     
Loading...

Share This Page