Date: Mon, 27 Oct 2014 12:53:23 -0400 From: Adam McDougall <mcdouga9@egr.msu.edu> To: freebsd-pf@freebsd.org Subject: Re: How to block IP range Message-ID: <544E7883.1000705@egr.msu.edu> In-Reply-To: <CBA35483CE5B4D4B804BF128A77A61650E9A16A7@HIKAWSEXMB02.ad.harman.com> References: <CBA35483CE5B4D4B804BF128A77A61650E9A16A7@HIKAWSEXMB02.ad.harman.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 10/27/2014 12:11, Spenst, Aleksej wrote: > Hi All, > > Is there any syntax to block a certain IP range? > For example, I need to block only 100 IPs in the range: 10.0.0.1-10.0.0.100 > I can't use the netmask like "block on eth0 from 10.0.0/24" since this will block 256 addresses. > I don't want also to write all IPs separated by comma like "block on eth0 from {10.0.0.1,10.0.0.2,.....}" since this will generate 100 separate rules (and this is also a very long rule). > Are there any other ways? > > Thank you! > Aleksej. > > > >From the manpage in 10: Ranges of addresses are specified by using the ‘-’ operator. For instance: “10.1.1.10 - 10.1.1.12” means all addresses from 10.1.1.10 to 10.1.1.12, hence addresses 10.1.1.10, 10.1.1.11, and 10.1.1.12.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?544E7883.1000705>