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.

how to disable a country visits

Discussion in 'General Discussion' started by sebans, Jul 22, 2004.

  1. sebans

    sebans Active Member

    Joined:
    Nov 13, 2003
    Messages:
    34
    Likes Received:
    0
    Trophy Points:
    6
    I'm having a lot of problems from visitors coming from nigeria and romania and I would like to disable those 2 countries

    Any idea on how to do it?

    thanks in advance

    sebans
     
  2. JBapt

    JBapt Active Member

    Joined:
    Feb 5, 2004
    Messages:
    41
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Porto - Portugal
    LOOOOL

    Hurray for freedom!!!!

    This can be done with iptables checking ip's. But hey... c'mon... just learn to cope with it or sometime you wont allow anyone!
     
  3. matt621

    matt621 Well-Known Member

    Joined:
    Jun 25, 2003
    Messages:
    175
    Likes Received:
    0
    Trophy Points:
    16
    I'd like to deny this block 219.236.0.0 - 219.237.255.255 using Iptables.

    Is there a shorthand to blocking this range or do I have to do each line manually?

    thanks.
     
  4. linux-image

    linux-image Well-Known Member

    Joined:
    Jun 8, 2004
    Messages:
    1,192
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    India
    cPanel Access Level:
    Root Administrator
    iptables -A INPUT -s 219.236.0.0/16 -j DROP

    that will do.
     
  5. matt621

    matt621 Well-Known Member

    Joined:
    Jun 25, 2003
    Messages:
    175
    Likes Received:
    0
    Trophy Points:
    16
    that easy eh? :eek:

    can you explain how that works? (Just so I know for future reference.)

    thank you.
     
  6. linux-image

    linux-image Well-Known Member

    Joined:
    Jun 8, 2004
    Messages:
    1,192
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    India
    cPanel Access Level:
    Root Administrator
    255.255.0.0 ==> 11111111.11111111.00000000.00000000

    thatz 16 bit empty at the last so its: 219.236.0.0/16

    use this same concept and it will sure help.
     
Loading...

Share This Page