freebsd-dev/sys
Luigi Rizzo 43405724ec One bugfix and one new feature.
The bugfix (ipfw2.c) makes the handling of port numbers with
a dash in the name, e.g. ftp-data, consistent with old ipfw:
use \\ before the - to consider it as part of the name and not
a range separator.

The new feature (all this description will go in the manpage):

each rule now belongs to one of 32 different sets, which can
be optionally specified in the following form:

	ipfw add 100 set 23 allow ip from any to any

If "set N" is not specified, the rule belongs to set 0.

Individual sets can be disabled, enabled, and deleted with the commands:

	ipfw disable set N
	ipfw enable set N
	ipfw delete set N

Enabling/disabling of a set is atomic. Rules belonging to a disabled
set are skipped during packet matching, and they are not listed
unless you use the '-S' flag in the show/list commands.
Note that dynamic rules, once created, are always active until
they expire or their parent rule is deleted.
Set 31 is reserved for the default rule and cannot be disabled.

All sets are enabled by default. The enable/disable status of the sets
can be shown with the command

	ipfw show sets

Hopefully, this feature will make life easier to those who want to
have atomic ruleset addition/deletion/tests. Examples:

To add a set of rules atomically:

	ipfw disable set 18
	ipfw add ... set 18 ...		# repeat as needed
	ipfw enable set 18

To delete a set of rules atomically

	ipfw disable set 18
	ipfw delete set 18
	ipfw enable set 18

To test a ruleset and disable it and regain control if something
goes wrong:

	ipfw disable set 18
	ipfw add ... set 18 ...         # repeat as needed
	ipfw enable set 18 ; echo "done "; sleep 30 && ipfw disable set 18

    here if everything goes well, you press control-C before
    the "sleep" terminates, and your ruleset will be left
    active. Otherwise, e.g. if you cannot access your box,
    the ruleset will be disabled after the sleep terminates.

I think there is only one more thing that one might want, namely
a command to assign all rules in set X to set Y, so one can
test a ruleset using the above mechanisms, and once it is
considered acceptable, make it part of an existing ruleset.
2002-08-10 04:37:32 +00:00
..
alpha Make ppp(4) devices clonable and unloadable. 2002-08-09 15:30:48 +00:00
amd64 Make ppp(4) devices clonable and unloadable. 2002-08-09 15:30:48 +00:00
arm Create a new header <machine/_stdint.h> for storing MD parts of 2002-07-29 17:41:23 +00:00
boot Add help about hint.acpi.0.disable. 2002-08-09 20:07:51 +00:00
cam Correct spelling of 'supplied'. 2002-06-19 20:44:48 +00:00
coda Fix typo in the last revision. 2002-08-04 19:34:38 +00:00
compat - Replace v_flag with v_iflag and v_vflag 2002-08-04 10:29:36 +00:00
conf Add the ability to use ATAPI devices via CAM. 2002-08-09 20:54:06 +00:00
contrib Resolve conflicts arising from the ACPI CA 20020725 import. 2002-07-30 19:35:32 +00:00
crypto Fix some really pedantic GCC warnings. 2002-07-15 13:45:15 +00:00
ddb Part 1 of KSE-III 2002-06-29 17:26:22 +00:00
dev Add the ability to use ATAPI devices via CAM. 2002-08-09 20:54:06 +00:00
fs Fix typo in vnode flags causing deadlock in msdosfs_fsync(). 2002-08-05 21:07:30 +00:00
geom Don't use the static thread.. it is going away. 2002-06-29 07:47:20 +00:00
gnu - Replace v_flag with v_iflag and v_vflag 2002-08-04 10:29:36 +00:00
i4b Remote pci.h/NPCI usage from i4b code. 2002-06-13 06:04:28 +00:00
i386 Make ppp(4) devices clonable and unloadable. 2002-08-09 15:30:48 +00:00
ia64 My quad cpu itanium2 box has its cpu's numbered with a lid starting 2002-08-10 03:36:42 +00:00
isa Clock frequencies reported by sysctl should be unsigned values. Discovered 2002-06-22 16:30:18 +00:00
isofs/cd9660 - Replace v_flag with v_iflag and v_vflag 2002-08-04 10:29:36 +00:00
kern While we're at it, add range checks similar to those in previous commit to 2002-08-09 12:58:11 +00:00
libkern Convert GNU variadic macros to the ISO 9X variety. 2002-07-15 13:34:50 +00:00
modules Make ppp(4) devices clonable and unloadable. 2002-08-09 15:30:48 +00:00
net Make ppp(4) devices clonable and unloadable. 2002-08-09 15:30:48 +00:00
netatalk Back out my lats commit of locking down a socket, it conflicts with hsu's work. 2002-05-31 11:52:35 +00:00
netatm - Remove UM_* user land memory macros since they are no longer used. 2002-06-24 22:31:17 +00:00
netgraph Make the consumers of the linker_load_file() function use 2002-08-02 20:56:07 +00:00
netinet One bugfix and one new feature. 2002-08-10 04:37:32 +00:00
netinet6 Introduce support for Mandatory Access Control and extensible 2002-08-02 20:49:14 +00:00
netipx Make spxnames a const char * to quieten some warnings in netstat. 2002-07-27 23:15:08 +00:00
netkey - fixed the order of searching SA table for packets. 2002-07-10 16:39:38 +00:00
netnatm Back out my lats commit of locking down a socket, it conflicts with hsu's work. 2002-05-31 11:52:35 +00:00
netncp Wire the sysctl output buffer before grabbing any locks to prevent 2002-07-28 19:59:31 +00:00
netns Fix bug which has been there since rev 1.1 where && was used instead of &. 2002-06-09 03:57:34 +00:00
netsmb Wire the sysctl output buffer before grabbing any locks to prevent 2002-07-28 19:59:31 +00:00
nfs
nfsclient - Add a missing VI_UNLOCK to an error case in nfs_flush. 2002-08-05 08:54:29 +00:00
nfsserver - Replace v_flag with v_iflag and v_vflag 2002-08-04 10:29:36 +00:00
pc98 Make ppp(4) devices clonable and unloadable. 2002-08-09 15:30:48 +00:00
pccard Add 16-bit before bus to keep the words card and bus apart. 2002-07-31 20:01:11 +00:00
pci Fixes for the D-Link DFE-580 card. 2002-08-07 22:31:27 +00:00
posix4 Part 1 of KSE-III 2002-06-29 17:26:22 +00:00
powerpc o Introduce pmap_page_is_mapped(). Its purpose is to obsolete 2002-08-07 19:37:22 +00:00
rpc
security - Replace v_flag with v_iflag and v_vflag 2002-08-04 10:29:36 +00:00
sparc64 Make ppp(4) devices clonable and unloadable. 2002-08-09 15:30:48 +00:00
sys Update ELAST. 2002-08-09 14:54:33 +00:00
tools - Add automatic post vop debug checks. These work in both the success and 2002-07-30 08:52:00 +00:00
ufs Don't call softdep_slowdown() if soft updates are not active on the 2002-08-05 17:59:20 +00:00
vm o Use pmap_page_is_mapped() in vm_page_protect() rather than the PG_MAPPED 2002-08-08 19:12:36 +00:00
Makefile Milestone #1 in cross-arch make releases. 2002-04-26 17:55:27 +00:00