293 useradd/del/mod should be ZFS-aware
[illumos-gate.git] / usr / src / man / man1m / ipnat.1m
blobe800988bb36fc5f404ac1529d8a1d55eda5237e0
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 IPNAT 1M "Oct 30, 2013"
7 .SH NAME
8 ipnat \- user interface to the NAT subsystem
9 .SH SYNOPSIS
10 .LP
11 .nf
12 \fBipnat\fR [\fB-CdFhlnRrsv\fR] [\fB-G\fR | \fB-z\fR \fIzonename\fR] \fB-f\fR \fIfilename\fR
13 .fi
15 .SH DESCRIPTION
16 .LP
17 The \fBipnat\fR utility opens a specified file (treating \fB-\fR as stdin) and
18 parses it for a set of rules that are to be added or removed from the IP NAT.
19 .sp
20 .LP
21 If there are no parsing problems, each rule processed by \fBipnat\fR is added
22 to the kernel's internal lists. Rules are appended to the internal lists,
23 matching the order in which they appear when given to \fBipnat\fR.
24 .sp
25 .LP
26 \fBipnat\fR's use is restricted through access to \fB/dev/ipauth\fR,
27 \fB/dev/ipl\fR, and \fB/dev/ipstate\fR. The default permissions of these files
28 require \fBipnat\fR to be run as root for all operations.
29 .sp
30 .LP
31 \fBipnat\fR's use is restricted through access to \fB/dev/ipnat\fR. The default
32 permissions of \fB/dev/ipnat\fR require \fBipnat\fR to be run as root for all
33 operations.
34 .SH OPTIONS
35 .LP
36 The following options are supported:
37 .sp
38 .ne 2
39 .na
40 \fB\fB-C\fR\fR
41 .ad
42 .RS 15n
43 Delete all entries in the current NAT rule listing (NAT rules).
44 .RE
46 .sp
47 .ne 2
48 .na
49 \fB\fB-d\fR\fR
50 .ad
51 .RS 15n
52 Turn debug mode on. Causes a hex dump of filter rules to be generated as it
53 processes each one.
54 .RE
56 .sp
57 .ne 2
58 .na
59 \fB\fB-F\fR\fR
60 .ad
61 .RS 15n
62 Delete all active entries in the current NAT translation table (currently
63 active NAT mappings).
64 .RE
66 .sp
67 .ne 2
68 .na
69 \fB\fB-f\fR \fIfilename\fR\fR
70 .ad
71 .RS 15n
72 Parse specified file for rules to be added or removed from the IP NAT.
73 \fIfilename\fR can be stdin.
74 .RE
76 .sp
77 .ne 2
78 .na
79 \fB\fB-h\fR\fR
80 .ad
81 .RS 15n
82 Print number of hits for each MAP/Redirect filter.
83 .RE
85 .sp
86 .ne 2
87 .na
88 \fB\fB-l\fR\fR
89 .ad
90 .RS 15n
91 Show the list of current NAT table entry mappings.
92 .RE
94 .sp
95 .ne 2
96 .na
97 \fB\fB-n\fR\fR
98 .ad
99 .RS 15n
100 Prevents \fBipf\fR from doing anything, such as making ioctl calls, which might
101 alter the currently running kernel.
105 .ne 2
107 \fB\fB-R\fR\fR
109 .RS 15n
110 Disable both IP address-to-hostname resolution and port number-to-service name
111 resolution.
115 .ne 2
117 \fB\fB-r\fR\fR
119 .RS 15n
120 Remove matching NAT rules rather than add them to the internal lists.
124 .ne 2
126 \fB\fB-s\fR\fR
128 .RS 15n
129 Retrieve and display NAT statistics.
133 .ne 2
135 \fB\fB-v\fR\fR
137 .RS 15n
138 Turn verbose mode on. Displays information relating to rule processing and
139 active rules/table entries.
143 .ne 2
145 \fB\fB-z\fR \fIzonename\fR\fR
147 .RS 15n
148 Operate on the in-zone IP NAT for the specified zone. If neither this option
149 nor \fB-G\fR is specified, the current zone is used. This command is only
150 available in the Global Zone. See \fBZONES\fR in \fBipf\fR(1m) for more
151 information.
155 .ne 2
157 \fB\fB-G\fR \fIzonename\fR\fR
159 .RS 15n
160 Operate on the global zone controlled IP NAT for the specified zone. If
161 neither this option nor \fB-z\fR is specified, the current zone is used. This
162 command is only available in the Global Zone. See \fBZONES\fR in \fBipf\fR(1m)
163 for more information.
166 .SH FILES
167 .ne 2
169 \fB\fB/dev/ipnat\fR\fR
171 .sp .6
172 .RS 4n
173 Link to IP Filter pseudo device.
177 .ne 2
179 \fB\fB/dev/kmem\fR\fR
181 .sp .6
182 .RS 4n
183 Special file that provides access to virtual address space.
187 .ne 2
189 \fB\fB/etc/ipf/ipnat.conf\fR\fR
191 .sp .6
192 .RS 4n
193 Location of \fBipnat\fR startup configuration file.
197 .ne 2
199 \fB\fB/usr/share/ipfilter/examples/\fR\fR
201 .sp .6
202 .RS 4n
203 Contains numerous IP Filter examples.
206 .SH ATTRIBUTES
208 See \fBattributes\fR(5) for descriptions of the following attributes:
213 box;
214 c | c
215 l | l .
216 ATTRIBUTE TYPE  ATTRIBUTE VALUE
218 Interface Stability     Committed
221 .SH SEE ALSO
223 \fBipf\fR(1M), \fBipfstat\fR(1M), \fBipnat\fR(4), \fBattributes\fR(5),
224 \fBzones(5)\fR