IPF adding single rule

Giorgos Keramidas keramida at ceid.upatras.gr
Fri Jun 24 04:17:50 GMT 2005

On 2005-06-23 22:10, fbsd_user <fbsd_user at a1poweruser.com> wrote:
> ipfstat -ni lists the in core inbound rules with their line number
> Say I want to add a single rule before rule line number 17
> If I have a file addrule with  17 block in quick on dc0 from any to any
> and then issue ipf -f addrule  I get error that 17 is unknown keyword (17)
> Is there any way to insert a rule into the in core rules at the desired
> location and then later just remove that rule??

Yes there is a way.  You just have to prefix the rule number with '@'.

	# ipf -f -
	@17 block in quick on dc0 from any to any

This is apparent in the second BNF rule in the description of the IPF
syntax, documented in ipf.conf(5).

More information about the freebsd-questions mailing list