On Sun, May 27, 2007 at 02:12:47AM +0100, Jeroen Massar wrote:
> Jim M wrote:
> > I know I can block an outgoing IP address such as
> >
> > block out quick on $external from any to 123.123.123.123
> >
> > But can you also block a range of IP addresses?  Such as
> >
> > block out quick on $external from any to 123.123.100.0-123.123.200.255
> 
> Yes, but one writes this in CIDR style, thus for your example:
> 
> block out quick on $external from any to 123.123.100.0/24
> block out quick on $external from any to 123.123.200.0/24
> 
> A /23 would be 100 - 254, see 'sipcalc' or other such tools for
> calculations. Also see Wikipedia's CIDR entry for more details.

123.123.100.0/23 would be 123.123.100.0 - 123.123.101.255

123.123.100.0-123.123.200.255 is 123.123.100.0/22 + 123.123.104.0/21 +
123.123.112.0/20 + 123.123.128.0/18 + 123.123.192.0/21 +
123.123.200.0/24

Regards,
Markus

Reply via email to