Community Forums
Connect with us on LinkedIn
Community Notice
+ Reply to Thread
Results 1 to 10 of 10
  1. #1
    Registered User
    Join Date
    Feb 2009
    Posts
    2

    Default Blocking IP ranges?

    Hi guys. I’ve recently been bombarded with Russian spammers on my forum.

    I’ve decided that I want to block all Russian IP addresses from the site through CPanel’s IP deny manager on my hosting account.

    It gives me the option of entering a range of IP address to ban and it gives the following example.

    10.5.3.3-10.5.3.40

    I’ve found a list of Russian IP addresses but I don’t know how to convert them to a range so I can just enter that.

    Here is the list of IP addresses

    217.116.48.0 217.116.63.255
    217.116.128.0 217.116.159.255
    217.117.80.0 217.117.95.255
    217.117.112.0 217.117.127.255
    217.117.176.0 217.117.191.255
    217.118.64.0 217.118.95.255
    217.118.176.0 217.118.191.255
    217.119.16.0 217.119.31.255
    217.119.80.0 217.119.95.255
    217.144.96.0 217.144.111.255
    217.144.160.0 217.144.191.255
    217.145.16.0 217.145.31.255
    217.145.144.0 217.145.159.255
    217.146.32.0 217.146.47.255
    217.147.0.0 217.147.31.255
    217.147.48.0 217.147.63.255
    217.148.48.0 217.148.63.255
    217.148.192.0 217.148.239.255
    217.149.16.0 217.149.31.255
    217.149.176.0 217.149.191.255
    217.150.0.0 217.150.63.255
    217.150.192.0 217.150.207.255
    217.151.16.0 217.151.31.255
    217.151.64.0 217.151.79.255
    217.151.128.0 217.151.143.255
    217.151.225.40 217.151.225.47
    217.151.227.0 217.151.227.255
    217.151.230.0 217.151.230.255
    217.168.64.0 217.168.79.255
    217.168.240.0 217.168.255.255
    217.169.80.0 217.169.95.255
    217.170.64.0 217.170.95.255
    217.170.112.0 217.170.127.255
    217.170.208.0 217.170.223.255
    217.171.0.0 217.171.15.255
    217.171.64.0 217.171.79.255
    217.171.144.0 217.171.159.255
    217.171.224.0 217.171.239.255
    217.172.16.0 217.172.31.255
    217.172.44.192 217.172.44.199
    217.172.45.208 217.172.45.215
    217.172.49.136 217.172.49.143
    217.173.0.0 217.173.31.255
    217.173.64.0 217.173.79.255
    217.174.0.0 217.174.15.255
    217.174.96.0 217.174.111.255
    217.174.160.0 217.174.180.255
    217.174.181.64 217.174.191.255
    217.175.16.0 217.175.47.255
    217.175.128.0 217.175.159.255
    217.194.240.0 217.194.255.255
    217.195.64.0 217.195.111.255
    217.195.208.0 217.195.223.255
    217.196.96.0 217.196.127.255
    217.197.0.0 217.197.15.255
    217.197.112.0 217.197.127.255
    217.197.240.0 217.198.15.255
    217.198.80.0 217.198.95.255
    217.198.160.0 217.198.191.255
    217.199.208.0 217.199.216.255
    217.199.218.0 217.199.223.255
    217.199.240.0 217.199.255.255
    217.212.248.0 217.212.248.7
    217.212.248.16 217.212.248.23
    217.212.248.64 217.212.248.159
    217.212.254.0 217.212.254.255

    Can anybody tell me how to convert these to a single range?

    Many thanks in advance.

  2. #2
    Member
    Join Date
    Jul 2006
    Posts
    285

    Default

    You can block the entire 217. range using this:

    217.0.0.0/8

    Here is a useful link for calculating CIDR ranges:

    http://iptools.com/dnstools.php?tool...data=217.0.0.0

  3. #3
    Registered User
    Join Date
    Feb 2009
    Posts
    2

    Default

    I’ve added “217.0.0.0/8” so does that mean that all the IP addresses I cited above are blocked? Many thanks for the link too.

  4. #4
    Member
    Join Date
    Jul 2006
    Posts
    285

    Default

    Yes, that blocks:

    217.0.0.0 => 217.255.255.255

  5. #5
    Member rhenderson's Avatar
    Join Date
    Apr 2005
    Location
    Oklahoma
    Posts
    742

    Default

    Quote Originally Posted by AnIrishman View Post
    I’ve added “217.0.0.0/8” so does that mean that all the IP addresses I cited above are blocked? Many thanks for the link too.
    But it also means you are blocking a lot of other IPs as well that might not be from Russia.

    Here are the correct blocks for 217. for Russia only:

    Code:
    217.8.80.0/20
    217.8.224.0/20
    217.9.80.0/20
    217.9.144.0/20
    217.10.32.0/20
    217.12.32.0/20
    217.12.96.0/20
    217.12.240.0/20
    217.13.208.0/20
    217.14.16.0/20
    217.14.48.0/20
    217.14.192.0/20
    217.14.240.0/20
    217.15.16.0/20
    217.15.48.0/20
    217.15.128.0/20
    217.15.144.0/20
    217.15.192.0/20
    217.16.16.0/20
    217.16.176.0/20
    217.17.160.0/20
    217.17.176.0/20
    217.18.48.0/20
    217.18.128.0/20
    217.18.144.0/20
    217.19.112.0/20
    217.20.64.0/20
    217.20.80.0/20
    217.20.208.0/20
    217.21.16.0/20
    217.21.96.0/20
    217.21.208.0/20
    217.22.160.0/20
    217.23.16.0/20
    217.23.64.0/20
    217.23.80.0/20
    217.23.128.0/20
    217.23.144.0/20
    217.23.176.0/20
    217.24.112.0/20
    217.24.176.0/20
    217.25.80.0/20
    217.25.144.0/20
    217.25.208.0/20
    217.25.224.0/20
    217.26.0.0/20
    217.26.16.0/20
    217.26.176.0/20
    217.28.80.0/20
    217.28.208.0/20
    217.29.48.0/20
    217.29.80.0/20
    217.29.112.0/20
    217.29.176.0/20
    217.30.240.0/20
    217.64.128.0/20
    217.65.0.0/20
    217.65.80.0/20
    217.65.208.0/20
    217.66.16.0/20
    217.66.64.0/20
    217.66.80.0/20
    217.66.144.0/20
    217.67.0.0/20
    217.67.112.0/20
    217.67.176.0/20
    217.69.192.0/20
    217.69.208.0/20
    217.70.16.0/20
    217.70.96.0/20
    217.70.112.0/20
    217.71.128.0/20
    217.71.160.0/20
    217.71.224.0/20
    217.72.0.0/20
    217.72.144.0/20
    217.73.112.0/20
    217.73.192.0/20
    217.73.240.0/20
    217.74.32.0/20
    217.74.112.0/20
    217.74.128.0/20
    217.74.144.0/20
    217.74.160.0/20
    217.74.240.0/20
    217.76.32.0/20
    217.76.176.0/20
    217.77.48.0/20
    217.77.96.0/20
    217.77.112.0/20
    217.78.176.0/20
    217.79.16.0/20
    217.79.48.0/20
    217.79.224.0/20
    217.106.0.0/15
    217.112.16.0/20
    217.113.112.0/20
    217.114.0.0/20
    217.114.16.0/20
    217.114.32.0/20
    217.114.144.0/20
    217.114.176.0/20
    217.114.224.0/20
    217.114.240.0/20
    217.115.80.0/20
    217.115.176.0/20
    217.116.48.0/20
    217.116.128.0/20
    217.116.144.0/20
    217.117.80.0/20
    217.117.112.0/20
    217.117.176.0/20
    217.118.64.0/20
    217.118.80.0/20
    217.118.176.0/20
    217.119.16.0/20
    217.119.80.0/20
    217.144.96.0/20
    217.144.160.0/20
    217.144.176.0/20
    217.145.16.0/20
    217.145.144.0/20
    217.146.32.0/20
    217.147.0.0/20
    217.147.16.0/20
    217.147.48.0/20
    217.148.48.0/20
    217.148.192.0/20
    217.148.208.0/20
    217.149.16.0/20
    217.149.176.0/20
    217.150.0.0/20
    217.150.16.0/20
    217.150.32.0/20
    217.150.48.0/20
    217.150.192.0/20
    217.151.16.0/20
    217.151.64.0/20
    217.151.128.0/20
    217.168.64.0/20
    217.168.240.0/20
    217.169.80.0/20
    217.170.64.0/20
    217.170.80.0/20
    217.170.112.0/20
    217.170.208.0/20
    217.171.0.0/20
    217.171.64.0/20
    217.171.144.0/20
    217.171.224.0/20
    217.172.16.0/20
    217.173.0.0/20
    217.173.16.0/20
    217.173.64.0/20
    217.174.0.0/20
    217.174.96.0/20
    217.174.160.0/20
    217.174.176.0/20
    217.175.16.0/20
    217.175.32.0/20
    217.175.128.0/20
    217.175.144.0/20
    217.194.240.0/20
    217.195.64.0/20
    217.195.80.0/20
    217.195.96.0/20
    217.195.208.0/20
    217.196.96.0/20
    217.196.112.0/20
    217.197.0.0/20
    217.197.112.0/20
    217.197.240.0/20
    217.198.0.0/20
    217.198.80.0/20
    217.198.160.0/20
    217.198.176.0/20
    217.199.208.0/20
    217.199.240.0/20
    You might take a look at http://www.ipdeny.com/ipblocks/
    Regards,
    Randy
    Affordable Web Hosting
    _________________________

  6. #6
    Registered User
    Join Date
    Feb 2009
    Posts
    2

    Default

    Thanks guys i am having a very similar problem

  7. #7
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Apr 2008
    Location
    PK
    Posts
    443

    Default

    This site also helps you create a .htaccess file that blocks all IPs from a country.

    http://blockacountry.com/
    1 solution works for all problems. Trying harder!
    HostMasterTips - Understanding Tech Support

  8. #8
    Registered User
    Join Date
    Apr 2009
    Posts
    1

    Default

    I'm in a similar situation. I found this site:

    http://www.countryipblocks.net/index.php

    and it provides a lot of ranges. My question is, how do you go about entering all those ranges within cPanel, hopefully in one shot, without having to enter them all one at a time. This site provides hundreds of them at a time.

  9. #9
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Mar 2003
    Location
    NC
    Posts
    725
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Quote Originally Posted by waizen View Post
    I'm in a similar situation. I found this site:

    http://www.countryipblocks.net/index.php

    and it provides a lot of ranges. My question is, how do you go about entering all those ranges within cPanel, hopefully in one shot, without having to enter them all one at a time. This site provides hundreds of them at a time.
    If you use APF or CSF you could simply add them to the deny file via ssh and restart the firewall.

  10. #10
    Registered User
    Join Date
    Apr 2009
    Location
    Australia
    Posts
    1

    Default

    Quote Originally Posted by ChrisRHS View Post
    You can block the entire 217. range using this:

    217.0.0.0/8

    Here is a useful link for calculating CIDR ranges:

    http://iptools.com/dnstools.php?tool...data=217.0.0.0
    Thanks Chris your help is much appreciated.

Similar Threads & Tags
Similar threads

  1. Multiple IP Blocks (Ranges)
    By tomdchi in forum cPanel and WHM Discussions
    Replies: 6
    Last Post: 06-27-2011, 07:20 PM
  2. IPTABLES blocking Russian, Romania, China Ip ranges
    By bsasninja in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 10-22-2007, 03:13 PM
  3. Migrating IP Ranges
    By Jeewhizz in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 08-14-2007, 02:20 PM
  4. Ignoring Bandwidth from certain IP ranges
    By Jasonflk in forum New User Questions
    Replies: 0
    Last Post: 01-25-2007, 01:53 PM
  5. opinion blocking several ip ranges
    By dave9000 in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 01-13-2004, 04:45 PM
Tags for this Thread
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube