IPFW: delete range of rules?

Dan Nelson dnelson at allantgroup.com
Wed Nov 29 12:39:27 PST 2006


In the last episode (Nov 29), Dan Mahoney, System Admin said:
> Hey all, the ipfw man page says rules can be deleted individually or
> in groups, but I don't see (other than the sets) an easy way to craft
> deletion of rules in a range (for example, 500-550).

You could expand the rules before calling ipfw:

  ipfw delete $(jot - 500 550 1)

or, if you use zsh:

  ipfw delete {500..550}

It would also be possible to extend the ipfw 'delete' rule parser to
handle ranges.

-- 
	Dan Nelson
	dnelson at allantgroup.com


More information about the freebsd-questions mailing list