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