# ip range



## Eldiemo (Dec 12, 2010)

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@ (Dec 12, 2010)

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 (Dec 12, 2010)

Thanks

Can i use that notation in pf.conf and tables?


----------



## Eldiemo (Dec 12, 2010)

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@ (Dec 12, 2010)

/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 (Dec 12, 2010)

http://www.subnetmask.info/


----------

