]> CyberLeo.Net >> Repos - FreeBSD/releng/8.1.git/blob - share/man/man4/ipfirewall.4
Copy stable/8 to releng/8.1 in preparation for 8.1-RC1.
[FreeBSD/releng/8.1.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 .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_FORWARD"
25 .Cd "options IPFIREWALL_VERBOSE"
26 .Cd "options IPFIREWALL_VERBOSE_LIMIT=100"
27 .Ed
28 .Pp
29 To load
30 .Ns Nm
31 as a module at boot time, add the following line into the
32 .Xr loader.conf 5
33 file:
34 .Bd -literal -offset indent
35 ipfw_load="YES"
36 .Ed
37 .Sh DESCRIPTION
38 The
39 .Nm
40 system facility allows filtering,
41 redirecting, and other operations on
42 .Tn IP
43 packets travelling through
44 network interfaces.
45 .Pp
46 The default behavior of
47 .Nm
48 is to block all incoming and outgoing traffic.
49 This behavior can be modified, to allow all traffic through the
50 .Nm
51 firewall by default, by enabling the
52 .Dv IPFIREWALL_DEFAULT_TO_ACCEPT
53 kernel option.
54 This option may be useful when configuring
55 .Nm
56 for the first time.
57 If the default
58 .Nm
59 behavior is to allow everything, it is easier to cope with
60 firewall-tuning mistakes which may accidentally block all traffic.
61 .Pp
62 To enable logging of packets passing through
63 .Nm ,
64 enable the
65 .Dv IPFIREWALL_VERBOSE
66 kernel option.
67 The
68 .Dv IPFIREWALL_VERBOSE_LIMIT
69 option will prevent
70 .Xr syslogd 8
71 from flooding system logs or causing local Denial of Service.
72 This option may be set to the number of packets which will be logged on
73 a per-entry basis before the entry is rate-limited.
74 .Pp
75 Policy routing and transparent forwarding features of
76 .Nm
77 can be enabled by
78 .Dv IPFIREWALL_FORWARD
79 kernel option.
80 .Pp
81 The user interface for
82 .Nm
83 is implemented by the
84 .Xr ipfw 8
85 utility, so please refer to the
86 .Xr ipfw 8
87 manpage for a complete description of the
88 .Nm
89 capabilities and how to use it.
90 .Sh SEE ALSO
91 .Xr setsockopt 2 ,
92 .Xr divert 4 ,
93 .Xr ip 4 ,
94 .Xr ipfw 8 ,
95 .Xr sysctl 8 ,
96 .Xr syslogd 8 ,
97 .Xr pfil 9