However, if you feed it something like 192.168.0.8 to 192.168.5.200,
it gives back a bunch of ranges with a number of /29s and /26s, a
couple of /24s and a total of a dozen ranges. What i want is a
calculator which will look at the high and the low, and figure out
that 192.168.0.0/21 will cover the whole thing.
Added useless information: what prompts this request is that my
mailserver has been getting hit with a bunch of sasl hack attempts,
many of which come from Bharti Airtel, which I assume is an ISP or a wireless / cellphone provider.
What I'm looking for, though, is one where you can feed it a low IP
address and a high IP address, and it will figure out the (singular)
range which covers all the IP addresses. So, for example, you feed it 192.168.0.0 and 192.168.1.255, and it gives you 192.168.0.0/23. The one
I currently use can do that with no problem. However, if you feed it something like 192.168.0.8 to 192.168.5.200, it gives back a bunch of
ranges with a number of /29s and /26s, a couple of /24s and a total of
a dozen ranges. What i want is a calculator which will look at the high
and the low, and figure out that 192.168.0.0/21 will cover the whole
thing.
I know - there are a bunch of 'em out there, including one I use
regularly. (For that matter, just figure it out on your fingers...)
What I'm looking for, though, is one where you can feed it a low IP
address and a high IP address, and it will figure out the (singular)
range which covers all the IP addresses. So, for example, you feed it >192.168.0.0 and 192.168.1.255, and it gives you 192.168.0.0/23. The one
I currently use can do that with no problem. However, if you feed it >something like 192.168.0.8 to 192.168.5.200, it gives back a bunch of
ranges with a number of /29s and /26s, a couple of /24s and a total of
a dozen ranges. What i want is a calculator which will look at the high
and the low, and figure out that 192.168.0.0/21 will cover the whole
thing.
Added useless information: what prompts this request is that my
mailserver has been getting hit with a bunch of sasl hack attempts,
many of which come from Bharti Airtel, which I assume is an ISP or a >wireless / cellphone provider. I have to admire them for the beauty of
their distributed attack, but I still want to swat them, and they're
mostly smart enough to evade fail2ban. So I would be more than happy to
just ban them at the firewall level, and this would make figuring out
the range to ban easier.
What I'm looking for, though, is one where you can feed it a
low IP address and a high IP address, and it will figure out
the (singular) range which covers all the IP addresses.
function powerOfTwo(i as ulong) as Boolean
' Returns true if i is a power of two.
What I'm looking for, though, is one where you can feed it a low IP
address and a high IP address, and it will figure out the (singular)
range which covers all the IP addresses.
Joe Makowiec <makowiec@invalid.invalid> wrote:[...]
Use whois to find out their AS number, and then a public looking glass
to find out the prefixes they're announcing.
Marc Haber <mh+usenetspam2616@zugschl.us> wrote:
Use whois to find out their AS number, and then a public looking
glass to find out the prefixes they're announcing.
What would be a trustworthy looking glass for this? Ideally one that
can be used in a scriptable way.
1. Start: Convert IP1 and IP2 to int;
| Sysop: | DaiTengu |
|---|---|
| Location: | Appleton, WI |
| Users: | 1,116 |
| Nodes: | 10 (0 / 10) |
| Uptime: | 85:27:32 |
| Calls: | 14,305 |
| Files: | 186,338 |
| D/L today: |
647 files (184M bytes) |
| Messages: | 2,525,478 |