How to block IP range

Cristiano Deana cristiano.deana at gmail.com
Tue Oct 28 08:56:55 UTC 2014


On Tue, Oct 28, 2014 at 9:30 AM, Spenst, Aleksej
<Aleksej.Spenst at harman.com> wrote:

Hi

> block in quick on eth0 from "10.0.0.1 - 10.0.0.100" to 10.0.0.0
>
> and load the rules then pfctl does not complain about any syntax errors.
> However, if I look what rules are loaded with "pfctl -s rules" then I see only:
>
> block drop in quick on eth0 inet from 10.0.0.1 to 10.0.0.0

that should be "{ 10.0.0.1 - 10.0.0.100 }"

# grep test /etc/pf.conf
test="{ 10.0.0.1 - 10.0.0.100 }"
block in quick on $ext_if from $test
# pfctl -nvf /etc/pf.conf | grep 10.0
test = "{ 10.0.0.1 - 10.0.0.100 }"
block drop in quick on em1 inet from 10.0.0.1 - 10.0.0.100 to any


-- 
Cris, member of G.U.F.I
Italian FreeBSD User Group
http://www.gufi.org/


More information about the freebsd-pf mailing list