.\" $OpenBSD: ipf.8,v 1.7 1999/04/29 17:57:35 espie Exp $ .Dd February 6, 1999 .Dt IPF 8 .Os .Sh NAME .Nm ipf .Nd "alters packet filtering lists for IP packet input and output" .Sh SYNOPSIS .Nm ipf .Op Fl AdDEInorsUvyzZ .Op Fl l Ar block|pass|nomatch .Op Fl F Ar i|o|a|s|S .Op Fl f Ar filename .Sh DESCRIPTION .Nm opens the filenames listed (treating .Sq \- as stdin) and parses the file for a set of rules which are to be added or removed from the packet filter rule set. .Pp Each rule processed by .Nm is added to the kernel's internal lists if there are no parsing problems. Rules are added to the end of the internal lists, matching the order in which they appear when given to .Nm ipf . .Sh OPTIONS .Bl -tag -width Ds .It Fl A Set the list to make changes to the active list (default). .It Fl d Turn debug mode on. Causes a hexdump of filter rules to be generated as it processes each one. .It Fl D Disable the filter (if enabled). Not effective for loadable kernel versions. .It Fl E Enable the filter (if disabled). Not effective for loadable kernel versions. .It Fl F Ar i|o|a This option specifies which filter list to flush. The parameter should either be "i" (input), "o" (output) or "a" (remove all filter rules). Either a single letter or an entire word starting with the appropriate letter maybe used. This option maybe before, or after, any other with the order on the command line being that used to execute options. .It Fl F Ar s|S To flush entries from the state table, the .Fl -F option is used in conjunction with either "s" (removes state information about any non-fully established connections) or "S" (deletes the entire state table). Only one of the two options may be given. A fully established connection will show up in .Li ipfstat -s output as 4/4, with deviations either way indicating it is not fully established any more. .It Fl f Ar filename This option specifies which files .Nm should use to get input from for modifying the packet filter rule lists. .It Fl I Set the list to make changes to the inactive list. .It Fl l Ar pass|block|nomatch Use of the .Fl l flag toggles default logging of packets. Valid arguments to this option are .Ar pass , .Ar block and .Ar nomatch . When an option is set, any packet which exits filtering and matches the set category is logged. This is most useful for causing all packets which don't match any of the loaded rules to be logged. .It Fl n This flag (no-change) prevents .Nm from actually making any ioctl calls or doing anything which would alter the currently running kernel. .It Fl o Force rules by default to be added/deleted to/from the output list, rather than the (default) input list. .It Fl r Remove matching filter rules rather than add them to the internal lists .It Fl s Swap the active filter list in use to be the "other" one. .It Fl U (SOLARIS 2 ONLY) Block packets traveling along the data stream which aren't recognized as IP packets. They will be printed out on the console. .It Fl v Turn verbose mode on. Displays information relating to rule processing. .It Fl y Manually resync the in-kernel interface list maintained by IP Filter with the current interface status list. .It Fl z For each rule in the input file, reset the statistics for it to zero and display the statistics prior to them being zeroed. .It Fl Z Zero global statistics held in the kernel for filtering only (this doesn't affect fragment or state statistics). .Sh FILES .Bl -tag -width /usr/share/ipf -compact .It Pa /usr/share/ipf location of sample configuration files .It Pa /dev/ipauth name of the .Nm auth socket .It Pa /dev/ipl name of the .Nm logging socket .It Pa /dev/ipstate name of the .Nm state socket .Sh SEE ALSO .Xr ipftest 1 , .Xr ipnat 8 , .Xr ipf 4 , .Xr ipl 4 , .Xr ipnat 4 , .Xr ipf 5 , .Xr ipfstat 8 , .Xr ipmon 8 .br http://coombs.anu.edu.au/ipfilter/ .Sh DIAGNOSTICS Needs to be run as root for the packet filtering lists to actually be affected inside the kernel. .Sh BUGS If you find any, please send email to me at darrenr@pobox.com.