xref: /freebsd/sbin/pfilctl/pfilctl.8 (revision 81ad6265)
1.\" Copyright (c) 2019 Gleb Smirnoff <glebius@FreeBSD.org>
2.\"
3.\" Redistribution and use in source and binary forms, with or without
4.\" modification, are permitted provided that the following conditions
5.\" are met:
6.\" 1. Redistributions of source code must retain the above copyright
7.\"    notice, this list of conditions and the following disclaimer.
8.\" 2. Redistributions in binary form must reproduce the above copyright
9.\"    notice, this list of conditions and the following disclaimer in the
10.\"    documentation and/or other materials provided with the distribution.
11.\"
12.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
13.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
15.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
16.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
17.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
18.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
19.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
20.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
21.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
22.\" SUCH DAMAGE.
23.\"
24.\" $FreeBSD$
25.\"
26.Dd January 28, 2019
27.Dt PFILCTL 8
28.Os
29.Sh NAME
30.Nm pfilctl
31.Nd pfil(9) control utility
32.Sh SYNOPSIS
33.Nm
34.Cm heads
35.Nm
36.Cm hooks
37.Nm
38.Cm link
39.Aq Fl i | Fl o
40.Op Fl a
41.Ar hook Ar head
42.Nm
43.Cm unlink
44.Aq Fl i | Fl o
45.Ar hook Ar head
46.Sh DESCRIPTION
47The
48.Nm
49utility is intended to view and change configuration of the
50.Xr pfil 9
51packet filtering hooks and filters on them.
52.Sh COMMANDS
53.Bl -tag -width "unlink"
54.It Cm heads
55List available packet filtering points.
56.It Cm hooks
57List available packet filters.
58.It Xo
59.Cm link
60.Aq Fl i | Fl o
61.Op Fl a
62.Ar hook Ar head
63.Xc
64Link
65.Ar hook
66to
67.Ar head .
68With the
69.Fl i
70flag the hook will be connected as input and with
71.Fl o
72as output hook.
73At least one of
74.Fl i
75or
76.Fl o
77is required.
78By default
79.Nm
80will prepend the hook in front of other hooks if any present:
81new hook will be as close to the wire as possible, so that on input
82it will be the first filter and on output it will be the last.
83Adding the
84.Fl a
85flag switches to appending new hook instead of prepending.
86.It Xo
87.Cm unlink
88.Aq Fl i | Fl o
89.Ar hook Ar head
90.Xc
91Unlink
92.Ar hook
93on
94.Ar head .
95At least one of
96.Fl i
97or
98.Fl o
99is required.
100With the
101.Fl i
102flag the hook will be removed from the input list of hooks
103and with
104.Fl o
105on output list.
106.El
107.Sh SEE ALSO
108.Xr ipfilter 4 ,
109.Xr ipfw 4 ,
110.Xr pf 4 ,
111.Xr pfil 9
112.Sh AUTHORS
113.An -nosplit
114The
115.Nm
116utility was written by
117.An Gleb Smirnoff Aq Mt glebius@FreeBSD.org .
118