Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

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:
    166
    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:
    166
    iptables -I INPUT -s 80.116.0.0/16 -j DROP

    cPanel.net Support Ticket Number:
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. Doctor

    Doctor Well-Known Member

    Joined:
    Apr 26, 2003
    Messages:
    180
    Likes Received:
    0
    Trophy Points:
    166
    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:
    166
    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:
    166
    /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:
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice