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