General Question

Dog's avatar

Is it possible to block all the IP addresses from an Internet Service Provider?

Asked by Dog (25132points) February 5th, 2011

If I continue to block IP’s off a hosting plan will it eventually run out of them?

Or do the ISPs share?

Observing members: 0 Composing members: 0

5 Answers

XOIIO's avatar

There are billions, billions of ip’s. there is one for each cell phone, computer and ipod. You may as well just have the site secret so that only you can get to it and some sort of login. If you want to block a certain area there is ip blocking like that. I’m not sure why you want to block all ip’s though.

koanhead's avatar

This can be done if you can determine the ISP’s subnet. This can be determined by doing a WHOIS query on the ISP’s domain name and then querying the ISP’s nameserver for the IP address of some domains known to belong to the ISP.
For example, I just did a “whois” and got a reply containing the names of several nameservers. I picked one and did “dig” which gave me a bunch of A records all in the block. It looks like the block is probably but it’s hard to tell the size.
ISP’s are all registered with their regional authority. If you need to find the netblock of an American ISP contact ICANN. They may or may not help you, I haven’t tried.
Once you have the block of IP addresses, it’s simple to craft a firewall rule to drop packets coming from or going to there, assuming you have a real firewall.
It’s possible that the ISP you are dealing with may not be a “real” ISP but a company leasing address space from a larger pool, in which case their addresses may not all be from the same block.

Vortico's avatar

Blocking a huge list of IP addresses would be very inefficient, but you can resolve the hostname from the IP address using a scripting language such as PHP.

$block = ‘’;
$host = gethostbyaddr($_SERVER[‘REMOTE_ADDR’]);
if(strpos($host, $block) === true) exit();

Response moderated (Unhelpful)
blueiiznh's avatar

ummm…what and why are you doing this?
What is the issue or reason?

Answer this question




to answer.

This question is in the General Section. Responses must be helpful and on-topic.

Your answer will be saved while you login or join.

Have a question? Ask Fluther!

What do you know more about?
Knowledge Networking @ Fluther