xref: /netbsd-src/usr.sbin/pf/pfs/pfs.8 (revision bdc22b2e01993381dcefeff2bc9b56ca75a4235c)
1.\"	$NetBSD: pfs.8,v 1.4 2010/05/09 14:02:10 wiz Exp $
2.\"
3.\" Copyright (c) 2010 The NetBSD Foundation, Inc.
4.\" All rights reserved.
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright
10.\"    notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\"    notice, this list of conditions and the following disclaimer in the
13.\"    documentation and/or other materials provided with the distribution.
14.\"
15.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
16.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25.\" SUCH DAMAGE.
26.\"
27.Dd July 21, 2009
28.Dt PFS 8
29.Os
30.Sh NAME
31.Nm pfs
32.Nd save and restore information for NAT and state tables
33.Sh SYNOPSIS
34.Nm
35.Op Fl v
36.Fl l
37.Nm
38.Op Fl bv
39.Fl R
40.Ar filename
41.Nm
42.Op Fl bv
43.Fl r
44.Ar filename
45.Nm
46.Op Fl v
47.Fl u
48.Nm
49.Op Fl bv
50.Fl W
51.Ar filename
52.Nm
53.Op Fl bv
54.Fl w
55.Ar filename
56.Sh DESCRIPTION
57The
58.Nm
59command allows state information created for NAT entries and rules using
60.Dq keep state
61to be locked (modification prevented) and then saved to disk,
62allowing for the system to experience a reboot, followed by the restoration
63of that information, resulting in connections not being interrupted.
64.Sh OPTIONS
65.Bl -tag -width XrXfilenameXX
66.It Fl b
67The information are read or stored using binary format.
68The default format is a readable ASCII format, similar to
69.Pa pfctl.conf
70syntax.
71.It Fl l
72Lock state tables in the kernel.
73.It Fl R Ar filename
74Restore information from
75.Ar filename
76and load it into the kernel.
77The state tables are locked at the beginning of this operation and
78unlocked once complete.
79.It Fl r Ar filename
80Read information in from
81.Ar filename
82and load it into the kernel.
83This requires the state tables to have already been locked
84and does not change the lock once complete.
85.It Fl u
86Unlock state tables in the kernel.
87.It Fl v
88Provide a verbose description of what's being done.
89.It Fl W Ar filename
90Write information from the kernel out to
91.Ar filename .
92The state tables are locked at the beginning of this operation and
93unlocked once complete.
94.It Fl w Ar filename
95Write information from the kernel out to
96.Ar filename .
97This requires the state tables to have already been locked
98and does not change the lock once complete.
99.El
100.Sh FILES
101.Pa /dev/pf
102.Sh SEE ALSO
103.Xr pf 4
104