6253 F_GETLK doesn't always return lock owner
[illumos-gate.git] / usr / src / man / man1m / ipfs.1m
blob38a7f50c7b4affaed71b5a5ab5145383f244bd20
1 '\" te
2 .\" To view license terms, attribution, and copyright for IP Filter, the default path is /usr/lib/ipf/IPFILTER.LICENCE. If the Solaris operating environment has been installed anywhere other than the default, modify the given path to access the file at the installed
3 .\" location.
4 .\" Portions Copyright (c) 2008, Sun Microsystems Inc. All Rights Reserved.
5 .\" Portions Copyright (c) 2013, Joyent, Inc. All Rights Reserved.
6 .TH IPFS 1M "Oct 30, 2013"
7 .SH NAME
8 ipfs \- saves and restores information for NAT and state tables
9 .SH SYNOPSIS
10 .LP
11 .nf
12 \fBipfs\fR [\fB-G\fR | \fB-z\fR \fIzonename\fR] [\fB-nv\fR] \fB-l\fR
13 .fi
15 .LP
16 .nf
17 \fBipfs\fR [\fB-G\fR | \fB-z\fR \fIzonename\fR] [\fB-nv\fR] \fB-u\fR
18 .fi
20 .LP
21 .nf
22 \fBipfs\fR [\fB-G\fR | \fB-z\fR \fIzonename\fR] [\fB-nv\fR] [\fB-d\fR \fIdirname\fR] \fB-R\fR
23 .fi
25 .LP
26 .nf
27 \fBipfs\fR [\fB-G\fR | \fB-z\fR \fIzonename\fR] [\fB-nv\fR] [\fB-d\fR \fIdirname\fR] \fB-W\fR
28 .fi
30 .LP
31 .nf
32 \fBipfs\fR [\fB-G\fR | \fB-z\fR \fIzonename\fR] [\fB-nNSv\fR] [\fB-f\fR \fIfilename\fR] \fB-r\fR
33 .fi
35 .LP
36 .nf
37 \fBipfs\fR [\fB-G\fR | \fB-z\fR \fIzonename\fR] [\fB-nNSv\fR] [\fB-f\fR \fIfilename\fR] \fB-w\fR
38 .fi
40 .LP
41 .nf
42 \fBipfs\fR [\fB-G\fR | \fB-z\fR \fIzonename\fR] [\fB-nNSv\fR] \fB-f\fR \fIfilename\fR \fB-i\fR \fI<if1>\fR,\fI<if2>\fR
43 .fi
45 .SH DESCRIPTION
46 .LP
47 The \fBipfs\fR utility enables the saving of state information across reboots.
48 Specifically, the utility allows state information created for NAT entries and
49 rules using "keep state" to be locked (modification prevented) and then saved
50 to disk. Then, after a reboot, that information is restored. The result of this
51 state-saving is that connections are not interrupted.
52 .SH OPTIONS
53 .LP
54 The following options are supported:
55 .sp
56 .ne 2
57 .na
58 \fB\fB-d\fR\fR
59 .ad
60 .RS 6n
61 Change the default directory used with \fB-R\fR and \fB-W\fR options for saving
62 state information.
63 .RE
65 .sp
66 .ne 2
67 .na
68 \fB\fB-n\fR\fR
69 .ad
70 .RS 6n
71 Do not take any action that would affect information stored in the kernel or on
72 disk.
73 .RE
75 .sp
76 .ne 2
77 .na
78 \fB\fB-v\fR\fR
79 .ad
80 .RS 6n
81 Provides a verbose description of \fBipfs\fR activities.
82 .RE
84 .sp
85 .ne 2
86 .na
87 \fB\fB-N\fR\fR
88 .ad
89 .RS 6n
90 Operate on NAT information.
91 .RE
93 .sp
94 .ne 2
95 .na
96 \fB\fB-S\fR\fR
97 .ad
98 .RS 6n
99 Operate on filtering state information.
103 .ne 2
105 \fB\fB-u\fR\fR
107 .RS 6n
108 Unlock state tables in the kernel.
112 .ne 2
114 \fB\fB-l\fR\fR
116 .RS 6n
117 Lock state tables in the kernel.
121 .ne 2
123 \fB\fB-r\fR\fR
125 .RS 6n
126 Read information in from the specified file and load it into the kernel. This
127 requires the state tables to have already been locked and does not change the
128 lock once complete.
132 .ne 2
134 \fB\fB-w\fR\fR
136 .RS 6n
137 Write information out to the specified file and from the kernel. This requires
138 the state tables to have already been locked and does not change the lock once
139 complete.
143 .ne 2
145 \fB\fB-R\fR\fR
147 .RS 6n
148 Restores all saved state information, if any, from two files, \fBipstate.ipf\fR
149 and \fBipnat.ipf\fR, stored in the \fB/var/db/ipf\fR directory. This directory
150 can be changed with the \fB-d\fR option. The state tables are locked at the
151 beginning of this operation and unlocked once complete.
155 .ne 2
157 \fB\fB-W\fR\fR
159 .RS 6n
160 Saves in-kernel state information, if any, out to two files, \fBipstate.ipf\fR
161 and \fBipnat.ipf\fR, stored in the \fB/var/db/ipf\fR directory. This directory
162 can be changed with the \fB-d\fR option. The state tables are locked at the
163 beginning of this operation and unlocked once complete.
167 .ne 2
169 \fB\fB-z\fR \fIzonename\fR\fR
171 .RS 6n
172 Operate on the in-zone state information for the specified zone. If neither
173 this option nor \fB-G\fR is specified, the current zone is used. This command
174 is only available in the Global Zone. See \fBZONES\fR in \fBipf\fR(1m) for
175 more information.
179 .ne 2
181 \fB\fB-G\fR \fIzonename\fR\fR
183 .RS 6n
184 Operate on the global zone controlled state information for the specified
185 zone. If neither this option nor \fB-z\fR is specified, the current zone is
186 used. This command is only available in the Global Zone. See \fBZONES\fR in
187 \fBipf\fR(1m) for more information.
190 .SH FILES
191 .RS +4
193 .ie t \(bu
194 .el o
195 \fB/var/db/ipf/ipstate.ipf\fR
197 .RS +4
199 .ie t \(bu
200 .el o
201 \fB/var/db/ipf/ipnat.ipf\fR
203 .RS +4
205 .ie t \(bu
206 .el o
207 \fB/dev/ipl\fR
209 .RS +4
211 .ie t \(bu
212 .el o
213 \fB/dev/ipstate\fR
215 .RS +4
217 .ie t \(bu
218 .el o
219 \fB/dev/ipnat\fR
221 .SH ATTRIBUTES
223 See \fBattributes\fR(5) for descriptions of the following attributes:
228 box;
229 c | c
230 l | l .
231 ATTRIBUTE TYPE  ATTRIBUTE VALUE
233 Interface Stability     Committed
236 .SH SEE ALSO
238 \fBipf\fR(1M), \fBipmon\fR(1M), \fBipnat\fR(1M), \fBattributes\fR(5),
239 \fBzones(5)\fR
240 .SH DIAGNOSTICS
242 Arguably, the \fB-W\fR and \fB-R\fR operations should set the locking and,
243 rather than undo it, restore it to what it was previously.
246 Fragment table information is currently not saved.