View Full Version : ip range
Eldiemo
December 12th, 2010, 17:25
Hi all,
I can't find the right notation for specifying an ip range from 10.0.0.10 to 10.0.0.150 in pf.
Already tried
10.0.0.10-10.0.0.150
10.0.0.10-150
10.0.0.10:10.0.0.150
10.0.0.10:150
I hope someone can help me with the notation in pf or a table without writing out all the ip's.
Thanx in advance
wblock@
December 12th, 2010, 17:33
10.0.0.10/31
10.0.0.12/30
10.0.0.16/28
10.0.0.32/27
10.0.0.64/26
10.0.0.128/28
10.0.0.144/30
10.0.0.148/31
10.0.0.150/32
Eldiemo
December 12th, 2010, 17:38
Thanks
Can i use that notation in pf.conf and tables?
Eldiemo
December 12th, 2010, 17:50
Hi wblock,
Maybe I don't see it yet but the answer u supplied is with different subnet masks.
I forgot to mention that the range specified is 10.0.0.10 to 10.0.0.150 with subnet mask /24, it's an internal subnet.
Thanks
wblock@
December 12th, 2010, 18:04
/24 would be .0 to .255. But if you want to limit that range to ..10 to ..150, a neat single subnet mask won't work. It has to be a combination of a bunch of smaller masks. Of course, when the answer is nine tiny subnet ranges, it may be the question needs rework. Even multiples of two work out better. 10.0.0.64 to 10.0.0.127 is 10.0.0.64/26, for example.
CIDR notation works in pf.conf.
graudeejs
December 12th, 2010, 18:45
http://www.subnetmask.info/
vBulletin® v3.8.7, Copyright ©2000-2013, vBulletin Solutions, Inc.