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.

IPTABLES: Blocking Entire IP Range

Discussion in 'General Discussion' started by Doctor, Sep 6, 2003.

  1. Doctor

    Doctor Well-Known Member

    Joined:
    Apr 26, 2003
    Messages:
    180
    Likes Received:
    0
    Trophy Points:
    16
    How do I block this range of IP addresses using IPTABLES?

    80.116.128.0 - 80.116.255.255

    Anyone?

    cPanel.net Support Ticket Number:
     
  2. ciphervendor

    ciphervendor Well-Known Member

    Joined:
    Aug 26, 2002
    Messages:
    1,052
    Likes Received:
    0
    Trophy Points:
    36
    iptables -I INPUT -s 80.116.0.0/16 -j DROP

    cPanel.net Support Ticket Number:
     
  3. Doctor

    Doctor Well-Known Member

    Joined:
    Apr 26, 2003
    Messages:
    180
    Likes Received:
    0
    Trophy Points:
    16
    Thanks for the input. Does the 16 really cover 80.116.128.0 - 80.116.255.255 only OR 80.116.0.0 - 80.116.255.255 entirely?

    If I put 80.116.0.0/32 instead, what range does it cover? Is it 80.116.0.0 - 80.116.0.255?

    cPanel.net Support Ticket Number:
     
  4. pagedeveloping

    pagedeveloping Well-Known Member

    Joined:
    Jun 11, 2003
    Messages:
    219
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    New York
    These are the ranges:

    222.222.222.1/24 == 222.222.222.*
    222.222.222.1/16 == 222.222.*
    222.222.222.1/8 == 222.*

    cPanel.net Support Ticket Number:
     
  5. ciphervendor

    ciphervendor Well-Known Member

    Joined:
    Aug 26, 2002
    Messages:
    1,052
    Likes Received:
    0
    Trophy Points:
    36
    /32 is kind of useless as it only covers 1 ip address. /16 seems a little excessive, you may want to simply limit yourself to /24s

    cPanel.net Support Ticket Number:
     
Loading...

Share This Page