ipfw matching
I have a quick question on the way ipfw matches IP masks. If I give this IP address: 12.144.51.128/17 Am I then correct in thinking it will match all IP addresses from 12.144.51.128 to 12.144.51.255? Or will it start matching from 12.144.51.0? (not what I want). Now for the harder question (I guess there is a second question, after all). If I want to match from 12.51.0 to 12.51.15 (and all their hosts underneath), would I write this: 12.51.0.0:255.255.240.255 ? I really wanna crack down on some spammers, but not waste too many ipfw rules on it. Thanks! - Mark To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-questions in the body of the message
ipfw matching (revisited)
Ok, I constructed the following IP:mask for ipfw to match: 202.43.64.0:255.255.191.0 This is supposed to match the range 202.43.64.xx to 202.43.127.xx Will this happen? It is really important that it does not match too much. Thanks! - Mark To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-questions in the body of the message
Re: ipfw matching (revisited)
On Tue, Nov 12, 2002 at 03:06:42PM +0100, Mark wrote: Ok, I constructed the following IP:mask for ipfw to match: 202.43.64.0:255.255.191.0 This is supposed to match the range 202.43.64.xx to 202.43.127.xx Close, but no cigar. You want: 202.43.64.0:255.255.192.0 also known as 202.43.64.0/18 ^ That matches the addresses from 202.43.64.0 to 202.43.127.255 inclusive. Cheers, Matthew -- Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks Savill Way Marlow Tel: +44 1628 476614 Bucks., SL7 1TH UK To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-questions in the body of the message
Re: ipfw matching (revisited)
- Original Message - From: Matthew Seaman [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, November 12, 2002 3:45 PM Subject: Re: ipfw matching (revisited) On Tue, Nov 12, 2002 at 03:06:42PM +0100, Mark wrote: Ok, I constructed the following IP:mask for ipfw to match: 202.43.64.0:255.255.191.0 This is supposed to match the range 202.43.64.xx to 202.43.127.xx Close, but no cigar. You want: 202.43.64.0:255.255.192.0 also known as 202.43.64.0/18 ^ That matches the addresses from 202.43.64.0 to 202.43.127.255 inclusive. Thanks for the explanation. Yes, 191 (1011) would only have bit 6 variable; indeed, I needed 192 (1100), to keep the lower 6 bits variable. It is clear to me now. Good thing I asked! :) - Mark To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-questions in the body of the message