xref: /freebsd/share/man/man4/ipfirewall.4 (revision 313376588638950ba1e93c403dd8c97bc52fd3a2)
1.\"
2.\" $FreeBSD$
3.\"
4.Dd October 25, 2012
5.Dt IPFW 4
6.Os
7.Sh NAME
8.Nm ipfw
9.Nd IP packet filter and traffic accounting
10.Sh SYNOPSIS
11To compile
12the driver
13into the kernel, place the following option in the kernel configuration
14file:
15.Bd -ragged -offset indent
16.Cd "options IPFIREWALL"
17.Ed
18.Pp
19Other related kernel options
20which may also be useful are:
21.Bd -ragged -offset indent
22.Cd "options IPFIREWALL_DEFAULT_TO_ACCEPT"
23.Cd "options IPFIREWALL_VERBOSE"
24.Cd "options IPFIREWALL_VERBOSE_LIMIT=100"
25.Ed
26.Pp
27To load
28the driver
29as a module at boot time, add the following line into the
30.Xr loader.conf 5
31file:
32.Bd -literal -offset indent
33ipfw_load="YES"
34.Ed
35.Sh DESCRIPTION
36The
37.Nm
38system facility allows filtering,
39redirecting, and other operations on
40.Tn IP
41packets travelling through
42network interfaces.
43.Pp
44The default behavior of
45.Nm
46is to block all incoming and outgoing traffic.
47This behavior can be modified, to allow all traffic through the
48.Nm
49firewall by default, by enabling the
50.Dv IPFIREWALL_DEFAULT_TO_ACCEPT
51kernel option.
52This option may be useful when configuring
53.Nm
54for the first time.
55If the default
56.Nm
57behavior is to allow everything, it is easier to cope with
58firewall-tuning mistakes which may accidentally block all traffic.
59.Pp
60To enable logging of packets passing through
61.Nm ,
62enable the
63.Dv IPFIREWALL_VERBOSE
64kernel option.
65The
66.Dv IPFIREWALL_VERBOSE_LIMIT
67option will prevent
68.Xr syslogd 8
69from flooding system logs or causing local Denial of Service.
70This option may be set to the number of packets which will be logged on
71a per-entry basis before the entry is rate-limited.
72.Pp
73The user interface for
74.Nm
75is implemented by the
76.Xr ipfw 8
77utility, so please refer to the
78.Xr ipfw 8
79manpage for a complete description of the
80.Nm
81capabilities and how to use it.
82.Sh SEE ALSO
83.Xr setsockopt 2 ,
84.Xr divert 4 ,
85.Xr ip 4 ,
86.Xr ipfw 8 ,
87.Xr sysctl 8 ,
88.Xr syslogd 8 ,
89.Xr pfil 9
90