]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - share/man/man4/ipfirewall.4
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.2.git] / share / man / man4 / ipfirewall.4
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
11 To compile
12 .Ns Nm
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 kernel options related to
20 .Ns Nm
21 which may also be useful are:
22 .Bd -ragged -offset indent
23 .Cd "options IPFIREWALL_DEFAULT_TO_ACCEPT"
24 .Cd "options IPFIREWALL_VERBOSE"
25 .Cd "options IPFIREWALL_VERBOSE_LIMIT=100"
26 .Ed
27 .Pp
28 To load
29 .Ns Nm
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 The user interface for
75 .Nm
76 is implemented by the
77 .Xr ipfw 8
78 utility, so please refer to the
79 .Xr ipfw 8
80 manpage for a complete description of the
81 .Nm
82 capabilities and how to use it.
83 .Sh SEE ALSO
84 .Xr setsockopt 2 ,
85 .Xr divert 4 ,
86 .Xr ip 4 ,
87 .Xr ipfw 8 ,
88 .Xr sysctl 8 ,
89 .Xr syslogd 8 ,
90 .Xr pfil 9