Re: Blocking sub-range of IP addresses

2003-03-12 Thread Guillaume Avez (Administrateur Systèmes)
It would be useful to have something that would take an IP address range and return the minimum coverage CIDR for that block (for use in feeding to iptables). For those addicted to command line (gipsc needs gnome), try netmask : #netmask -c 192.168.10.224:192.168.10.255 192.168.10.224/27

Re: Blocking sub-range of IP addresses

2003-03-12 Thread Karl Hammar
It would be useful to have something that would take an IP address range and return the minimum coverage CIDR for that block (for use in feeding to iptables). For example, if I want to allow access for hosts 1.2.3.1 - 1.2.3.4, I currently can allow them individually or just allow the

Re: Blocking sub-range of IP addresses

2003-03-12 Thread Josh Carroll
Actually, the previous post's usage of netmask would probably do the trick: [EMAIL PROTECTED]:~$ netmask -c 1.2.3.1:1.2.3.4 1.2.3.1/32 1.2.3.2/31 1.2.3.4/32 so, e.g.: for hostmask in `netmask -c 1.2.3.1:1.2.3.4`; do iptables -A INPUT -s $hostmask -d `ifconfig eth0 | grep

Re: Blocking sub-range of IP addresses

2003-03-12 Thread Administrateur Systèmes
It would be useful to have something that would take an IP address range and return the minimum coverage CIDR for that block (for use in feeding to iptables). For those addicted to command line (gipsc needs gnome), try netmask : #netmask -c 192.168.10.224:192.168.10.255 192.168.10.224/27

Re: Blocking sub-range of IP addresses

2003-03-12 Thread Karl Hammar
It would be useful to have something that would take an IP address range and return the minimum coverage CIDR for that block (for use in feeding to iptables). For example, if I want to allow access for hosts 1.2.3.1 - 1.2.3.4, I currently can allow them individually or just allow the

Re: Blocking sub-range of IP addresses

2003-03-12 Thread Josh Carroll
Actually, the previous post's usage of netmask would probably do the trick: [EMAIL PROTECTED]:~$ netmask -c 1.2.3.1:1.2.3.4 1.2.3.1/32 1.2.3.2/31 1.2.3.4/32 so, e.g.: for hostmask in `netmask -c 1.2.3.1:1.2.3.4`; do iptables -A INPUT -s $hostmask -d `ifconfig eth0 | grep

Re: Blocking sub-range of IP addresses

2003-03-11 Thread andrew lattis
On 2003/03/11 02:12:12PM -0600, Tue, Bill wrote: Hello Debian, I want to block all ip's ending in 224 to 255 but not 220 and others searching the net I found I need to add /27 to end of the ip. I understand /8 /16 /24 /32 somewhat but... My question: what makes /27 significant

Re: Blocking sub-range of IP addresses

2003-03-11 Thread Douglas Blood
http://www.ralphb.net/IPSubnet/class_a.html That is a page I use whenever I need to do anything with subnets. It explains that the /27 subnet has 30 hosts. So if you only wanted to block hosts X.Y.Z.23 - X.Y.Z.55 I would do everything under 64.. otherwise you get into defining multiple subnets so

Re: Blocking sub-range of IP addresses

2003-03-11 Thread Markus Schabel
Bill wrote: Hello Debian, I want to block all ip's ending in 224 to 255 but not 220 and others searching the net I found I need to add /27 to end of the ip. I understand /8 /16 /24 /32 somewhat but... My question: what makes /27 significant X.Y.Z.224 - X.Y.Z.255 deny from 63.148.99.224/27

RE: Blocking sub-range of IP addresses

2003-03-11 Thread MacLeod, Alastair
Hi Consider each octet of an IP address in turn. Octet:- 256-(2^n(4)).256-(2^n(3)).256-(2^n(2)).256-(2^n(1)) start with n(1), then n(2) and through to n(4). where 0=n(x)=8 and x=1;x=4;x++ and where x increments n(x-1)==8 always. and to get the prefix length /mm =32 - (sum n(x)) Alastair

Re: Blocking sub-range of IP addresses

2003-03-11 Thread Nikolai Lusan
On Tue, 11 Mar 2003, Bill wrote: I want to block all ip's ending in 224 to 255 but not 220 and others searching the net I found I need to add /27 to end of the ip. I understand /8 /16 /24 /32 somewhat but... All the numbers after a / define a subnet. For example a /24 subnet contais 256

Re: Blocking sub-range of IP addresses

2003-03-11 Thread Shawn Wallbridge
This is an excellent guide to understanding IP addresses. http://www.3com.com/other/pdfs/infra/corpinfo/en_US/501302.pdf shawn Hello Debian, I want to block all ip's ending in 224 to 255 but not 220 and others searching the net I found I need to add /27 to end of the ip. I understand

Re: Blocking sub-range of IP addresses

2003-03-11 Thread Bill
Thanks ian, Your pointer turned out to be most valuable. If anyone else wants to know I found this table most helpful. google search result on:howto CIDR range http://www.obfuscation.org/techs/cidr-conversion-table.html On March 11, 2003 03:51 pm, you wrote: Bill, just a tip, but

Re: Blocking sub-range of IP addresses

2003-03-11 Thread Frank Peters
Bill wrote: I want to block all ip's ending in 224 to 255 but not 220 and others searching the net I found I need to add /27 to end of the ip. I understand /8 /16 /24 /32 somewhat but... Netmasks work using a binary logical AND operation. A few years ago, you would be using something like

Re: Blocking sub-range of IP addresses

2003-03-11 Thread Josh Carroll
It would be useful to have something that would take an IP address range and return the minimum coverage CIDR for that block (for use in feeding to iptables). For example, if I want to allow access for hosts 1.2.3.1 - 1.2.3.4, I currently can allow them individually or just allow the entire /24.

Re: Blocking sub-range of IP addresses

2003-03-11 Thread andrew lattis
On 2003/03/11 02:12:12PM -0600, Tue, Bill wrote: Hello Debian, I want to block all ip's ending in 224 to 255 but not 220 and others searching the net I found I need to add /27 to end of the ip. I understand /8 /16 /24 /32 somewhat but... My question: what makes /27 significant

Re: Blocking sub-range of IP addresses

2003-03-11 Thread Douglas Blood
http://www.ralphb.net/IPSubnet/class_a.html That is a page I use whenever I need to do anything with subnets. It explains that the /27 subnet has 30 hosts. So if you only wanted to block hosts X.Y.Z.23 - X.Y.Z.55 I would do everything under 64.. otherwise you get into defining multiple subnets so

Re: Blocking sub-range of IP addresses

2003-03-11 Thread Markus Schabel
Bill wrote: Hello Debian, I want to block all ip's ending in 224 to 255 but not 220 and others searching the net I found I need to add /27 to end of the ip. I understand /8 /16 /24 /32 somewhat but... My question: what makes /27 significant X.Y.Z.224 - X.Y.Z.255 deny from 63.148.99.224/27

RE: Blocking sub-range of IP addresses

2003-03-11 Thread MacLeod, Alastair
Hi Consider each octet of an IP address in turn. Octet:- 256-(2^n(4)).256-(2^n(3)).256-(2^n(2)).256-(2^n(1)) start with n(1), then n(2) and through to n(4). where 0=n(x)=8 and x=1;x=4;x++ and where x increments n(x-1)==8 always. and to get the prefix length /mm =32 - (sum n(x)) Alastair

Re: Blocking sub-range of IP addresses

2003-03-11 Thread Nikolai Lusan
On Tue, 11 Mar 2003, Bill wrote: I want to block all ip's ending in 224 to 255 but not 220 and others searching the net I found I need to add /27 to end of the ip. I understand /8 /16 /24 /32 somewhat but... All the numbers after a / define a subnet. For example a /24 subnet contais 256

Re: Blocking sub-range of IP addresses

2003-03-11 Thread Shawn Wallbridge
This is an excellent guide to understanding IP addresses. http://www.3com.com/other/pdfs/infra/corpinfo/en_US/501302.pdf shawn Hello Debian, I want to block all ip's ending in 224 to 255 but not 220 and others searching the net I found I need to add /27 to end of the ip. I understand

Re: Blocking sub-range of IP addresses

2003-03-11 Thread Bill
Thanks ian, Your pointer turned out to be most valuable. If anyone else wants to know I found this table most helpful. google search result on:howto CIDR range http://www.obfuscation.org/techs/cidr-conversion-table.html On March 11, 2003 03:51 pm, you wrote: Bill, just a tip, but

Re: Blocking sub-range of IP addresses

2003-03-11 Thread Frank Peters
Bill wrote: I want to block all ip's ending in 224 to 255 but not 220 and others searching the net I found I need to add /27 to end of the ip. I understand /8 /16 /24 /32 somewhat but... Netmasks work using a binary logical AND operation. A few years ago, you would be using something like

Re: Blocking sub-range of IP addresses

2003-03-11 Thread Josh Carroll
It would be useful to have something that would take an IP address range and return the minimum coverage CIDR for that block (for use in feeding to iptables). For example, if I want to allow access for hosts 1.2.3.1 - 1.2.3.4, I currently can allow them individually or just allow the entire /24.