Man pages review
Phil Sutter
reviewerv2 cover Man pages review
Thanks to the manpage-l10n project, we received several tickets listing a number of corrections and improvements to the different iptables man pages. This series implements what I considered valid and worth keeping.
Changes since v1:
- Adjusted patches 6, 7 and 14 as per Jan's feedback.
- Folded the two trivial "missing space after comma" patches into one, they even fixed the same commit.
Phil Sutter (15):
man: iptables.8: Extend exit code description
man: iptables.8: Trivial spelling fixes
man: iptables.8: Fix intra page reference
man: iptables.8: Clarify --goto description
man: Use HTTPS for links to netfilter.org
man: iptables.8: Trivial font fixes
man: iptables-restore.8: Fix --modprobe description
man: iptables-restore.8: Consistently document -w option
man: iptables-restore.8: Drop -W option from synopsis
man: iptables-restore.8: Put 'file' in italics in synopsis
man: iptables-restore.8: Start paragraphs in upper-case
man: Trivial: Missing space after comma
man: iptables-save.8: Clarify 'available tables'
man: iptables-save.8: Fix --modprobe description
man: iptables-save.8: Start paragraphs in upper-case
extensions/libxt_nfacct.man | 2 +- iptables/iptables-restore.8.in | 25 ++++++++++++------------ iptables/iptables-save.8.in | 18 ++++++++++------- iptables/iptables.8.in | 35 ++++++++++++++++++---------------- 4 files changed, 44 insertions(+), 36 deletions(-)
Signature · 1 line
2.40.0
Phil Sutter
reviewerPATCH v2 1/15 man: iptables.8: Extend exit code description
Codes 3 and 4 were missing.
--- iptables/iptables.8.in | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
iptables/iptables.8.in +6 -3
@@ -410,9 +410,12 @@ the default setting. iptables can use extended packet matching and target modules. A list of these is available in the \fBiptables\-extensions\fP(8) manpage. .SH DIAGNOSTICS -Various error messages are printed to standard error. The exit code -is 0 for correct functioning. Errors which appear to be caused by -invalid or abused command line parameters cause an exit code of 2, and +Various error messages are printed to standard error. The exit code is 0 for +correct functioning. Errors which appear to be caused by invalid or abused +command line parameters cause an exit code of 2. Errors which indicate an +incompatibility between kernel and user space cause an exit code of 3. Errors +which indicate a resource problem, such as a busy lock, failing memory +allocation or error messages from kernel cause an exit code of 4. Finally, other errors cause an exit code of 1. .SH BUGS Bugs? What's this? ;-)
Signature · 1 line
2.40.0
Phil Sutter
reviewerPATCH v2 2/15 man: iptables.8: Trivial spelling fixes
In reply to Phil Sutter- Missing "and" as well as full stop
- Missing comma in enumeration
- Duplicate "previous"
- Confusions are avoided rather than simplified
- Missing space after comma
--- iptables/iptables.8.in | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
iptables/iptables.8.in +5 -5
@@ -125,8 +125,8 @@ This table is used mainly for configuring exemptions from connection tracking in combination with the NOTRACK target. It registers at the netfilter hooks with higher priority and is thus called before ip_conntrack, or any other IP tables. It provides the following built-in chains: \fBPREROUTING\fP -(for packets arriving via any network interface) \fBOUTPUT\fP -(for packets generated by local processes) +(for packets arriving via any network interface) and \fBOUTPUT\fP +(for packets generated by local processes). .TP \fBsecurity\fP: This table is used for Mandatory Access Control (MAC) networking rules, such
@@ -258,7 +258,7 @@ This option has no effect in ip6tables and ip6tables-restore. [\fB!\fP] \fB\-p\fP, \fB\-\-protocol\fP \fIprotocol\fP The protocol of the rule or of the packet to check. The specified protocol can be one of \fBtcp\fP, \fBudp\fP, \fBudplite\fP, -\fBicmp\fP, \fBicmpv6\fP,\fBesp\fP, \fBah\fP, \fBsctp\fP, \fBmh\fP or the special keyword "\fBall\fP", +\fBicmp\fP, \fBicmpv6\fP, \fBesp\fP, \fBah\fP, \fBsctp\fP, \fBmh\fP or the special keyword "\fBall\fP", or it can be a numeric value, representing one of these protocols or a different one. A protocol name from /etc/protocols is also allowed. A "!" argument before the protocol inverts the
@@ -386,7 +386,7 @@ network names, or services (whenever applicable). \fB\-x\fP, \fB\-\-exact\fP Expand numbers. Display the exact value of the packet and byte counters, -instead of only the rounded number in K's (multiples of 1000) +instead of only the rounded number in K's (multiples of 1000), M's (multiples of 1000K) or G's (multiples of 1000M). This option is only relevant for the \fB\-L\fP command. .TP
@@ -441,7 +441,7 @@ entering the \fBFORWARD\fP chain. .PP The various forms of NAT have been separated out; \fBiptables\fP is a pure packet filter when using the default `filter' table, with -optional extension modules. This should simplify much of the previous +optional extension modules. This should avoid much of the confusion over the combination of IP masquerading and packet filtering seen previously. So the following options are handled differently: .nf
Signature · 1 line
2.40.0
Phil Sutter
reviewerPATCH v2 3/15 man: iptables.8: Fix intra page reference
In reply to Phil SutterWhen sections MATCH EXTENSIONS and TARGET EXTENSIONS were combined, the reference could have been updated to specify the exact title.
--- iptables/iptables.8.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
iptables/iptables.8.in +2 -2
@@ -307,8 +307,8 @@ false, evaluation will stop. This specifies the target of the rule; i.e., what to do if the packet matches it. The target can be a user-defined chain (other than the one this rule is in), one of the special builtin targets which decide -the fate of the packet immediately, or an extension (see \fBEXTENSIONS\fP -below). If this +the fate of the packet immediately, or an extension (see \fBMATCH AND TARGET +EXTENSIONS\fP below). If this option is omitted in a rule (and \fB\-g\fP is not used), then matching the rule will have no effect on the packet's fate, but the counters on the rule will be
Signature · 1 line
2.40.0
Phil Sutter
reviewerPATCH v2 4/15 man: iptables.8: Clarify --goto description
In reply to Phil SutterText speaks about behaviour of RETURN target when used in chains redirected to using --goto instead of --jump, not the difference between --jump option and "return".
--- iptables/iptables.8.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
iptables/iptables.8.in +1 -1
@@ -316,7 +316,7 @@ incremented. .TP \fB\-g\fP, \fB\-\-goto\fP \fIchain\fP This specifies that the processing should continue in a user -specified chain. Unlike the \-\-jump option return will not continue +specified chain. Unlike with the \-\-jump option, \fBRETURN\fP will not continue processing in this chain but instead in the chain that called us via \-\-jump. .TP
Signature · 1 line
2.40.0
Phil Sutter
reviewerPATCH v2 5/15 man: Use HTTPS for links to netfilter.org
In reply to Phil SutterThe browser is redirected there anyway, but who cares about such minor details nowadays.
--- extensions/libxt_nfacct.man | 2 +- iptables/iptables.8.in | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
extensions/libxt_nfacct.man +1 -1
@@ -26,5 +26,5 @@ nfacct get http\-traffic .PP You can obtain .B nfacct(8) -from http://www.netfilter.org or, alternatively, from the git.netfilter.org +from https://www.netfilter.org or, alternatively, from the git.netfilter.org repository.
iptables/iptables.8.in +2 -2
@@ -419,7 +419,7 @@ allocation or error messages from kernel cause an exit code of 4. Finally, other errors cause an exit code of 1. .SH BUGS Bugs? What's this? ;-) -Well, you might want to have a look at http://bugzilla.netfilter.org/ +Well, you might want to have a look at https://bugzilla.netfilter.org/ \fBiptables\fP will exit immediately with an error code of 111 if it finds that it was called as a setuid-to-root program. iptables cannot be used safely in this manner because it trusts
@@ -463,7 +463,7 @@ not in the standard distribution, and the netfilter-hacking-HOWTO details the netfilter internals. .br See -.BR "http://www.netfilter.org/" . +.BR "https://www.netfilter.org/" . .SH AUTHORS Rusty Russell originally wrote iptables, in early consultation with Michael Neuling.
Signature · 1 line
2.40.0
Phil Sutter
reviewerPATCH v2 6/15 man: iptables.8: Trivial font fixes
In reply to Phil SutterNo content changes intended, just type commands in bold and the single path reference in italics.
---
Changes since v1:
- Put only commands in bold font, not program names
- Add missing dash-escaping if done so
--- iptables/iptables.8.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
iptables/iptables.8.in +3 -3
@@ -244,13 +244,13 @@ add, delete, insert, replace and append commands). \fB\-4\fP, \fB\-\-ipv4\fP This option has no effect in iptables and iptables-restore. If a rule using the \fB\-4\fP option is inserted with (and only with) -ip6tables-restore, it will be silently ignored. Any other uses will throw an +\fBip6tables\-restore\fP, it will be silently ignored. Any other uses will throw an error. This option allows IPv4 and IPv6 rules in a single rule file for use with both iptables-restore and ip6tables-restore. .TP \fB\-6\fP, \fB\-\-ipv6\fP If a rule using the \fB\-6\fP option is inserted with (and only with) -iptables-restore, it will be silently ignored. Any other uses will throw an +\fBiptables\-restore\fP, it will be silently ignored. Any other uses will throw an error. This option allows IPv4 and IPv6 rules in a single rule file for use with both iptables-restore and ip6tables-restore. This option has no effect in ip6tables and ip6tables-restore.
@@ -260,7 +260,7 @@ The protocol of the rule or of the packet to check. The specified protocol can be one of \fBtcp\fP, \fBudp\fP, \fBudplite\fP, \fBicmp\fP, \fBicmpv6\fP, \fBesp\fP, \fBah\fP, \fBsctp\fP, \fBmh\fP or the special keyword "\fBall\fP", or it can be a numeric value, representing one of these protocols or a -different one. A protocol name from /etc/protocols is also allowed. +different one. A protocol name from \fI/etc/protocols\fP is also allowed. A "!" argument before the protocol inverts the test. The number zero is equivalent to \fBall\fP. "\fBall\fP" will match with all protocols and is taken as default when this
Signature · 1 line
2.40.0
Phil Sutter
reviewerPATCH v2 7/15 man: iptables-restore.8: Fix --modprobe description
In reply to Phil Sutter- Consistently use 'modprobe' as option argument name
- Add a reference to modprobe man page
- Put the path in italics, and the command in bold
---
Changes since v1:
- Non-bold "modprobe" and iptables-restore program name
--- iptables/iptables-restore.8.in | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
iptables/iptables-restore.8.in +4 -3
@@ -67,9 +67,10 @@ the program will exit if the lock cannot be obtained. This option will make the program wait (indefinitely or for optional \fIseconds\fP) until the exclusive lock can be obtained. .TP -\fB\-M\fP, \fB\-\-modprobe\fP \fImodprobe_program\fP -Specify the path to the modprobe program. By default, iptables-restore will -inspect /proc/sys/kernel/modprobe to determine the executable's path. +\fB\-M\fP, \fB\-\-modprobe\fP \fImodprobe\fP +Specify the path to the modprobe(8) program. By default, +iptables-restore will inspect \fI/proc/sys/kernel/modprobe\fP to +determine the executable's path. .TP \fB\-T\fP, \fB\-\-table\fP \fIname\fP Restore only the named table even if the input stream contains other ones.
Signature · 1 line
2.40.0
Phil Sutter
reviewerPATCH v2 8/15 man: iptables-restore.8: Consistently document -w option
In reply to Phil SutterUse the same name for the option's argument.
--- iptables/iptables-restore.8.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
iptables/iptables-restore.8.in +2 -2
@@ -23,11 +23,11 @@ iptables-restore \(em Restore IP Tables .P ip6tables-restore \(em Restore IPv6 Tables .SH SYNOPSIS -\fBiptables\-restore\fP [\fB\-chntvV\fP] [\fB\-w\fP \fIsecs\fP] +\fBiptables\-restore\fP [\fB\-chntvV\fP] [\fB\-w\fP \fIseconds\fP] [\fB\-W\fP \fIusecs\fP] [\fB\-M\fP \fImodprobe\fP] [\fB\-T\fP \fIname\fP] [\fBfile\fP] .P -\fBip6tables\-restore\fP [\fB\-chntvV\fP] [\fB\-w\fP \fIsecs\fP] +\fBip6tables\-restore\fP [\fB\-chntvV\fP] [\fB\-w\fP \fIseconds\fP] [\fB\-W\fP \fIusecs\fP] [\fB\-M\fP \fImodprobe\fP] [\fB\-T\fP \fIname\fP] [\fBfile\fP] .SH DESCRIPTION
Signature · 1 line
2.40.0
Phil Sutter
reviewerPATCH v2 9/15 man: iptables-restore.8: Drop -W option from synopsis
In reply to Phil SutterThe description was dropped already, there is no benefit in still listing it.
--- iptables/iptables-restore.8.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
iptables/iptables-restore.8.in +2 -2
@@ -24,11 +24,11 @@ iptables-restore \(em Restore IP Tables ip6tables-restore \(em Restore IPv6 Tables .SH SYNOPSIS \fBiptables\-restore\fP [\fB\-chntvV\fP] [\fB\-w\fP \fIseconds\fP] -[\fB\-W\fP \fIusecs\fP] [\fB\-M\fP \fImodprobe\fP] [\fB\-T\fP \fIname\fP] +[\fB\-M\fP \fImodprobe\fP] [\fB\-T\fP \fIname\fP] [\fBfile\fP] .P \fBip6tables\-restore\fP [\fB\-chntvV\fP] [\fB\-w\fP \fIseconds\fP] -[\fB\-W\fP \fIusecs\fP] [\fB\-M\fP \fImodprobe\fP] [\fB\-T\fP \fIname\fP] +[\fB\-M\fP \fImodprobe\fP] [\fB\-T\fP \fIname\fP] [\fBfile\fP] .SH DESCRIPTION .PP
Signature · 1 line
2.40.0
Phil Sutter
reviewerPATCH v2 10/15 man: iptables-restore.8: Put 'file' in italics in synopsis
In reply to Phil SutterThe text has it this way already, be consistent.
--- iptables/iptables-restore.8.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
iptables/iptables-restore.8.in +2 -2
@@ -25,11 +25,11 @@ ip6tables-restore \(em Restore IPv6 Tables .SH SYNOPSIS \fBiptables\-restore\fP [\fB\-chntvV\fP] [\fB\-w\fP \fIseconds\fP] [\fB\-M\fP \fImodprobe\fP] [\fB\-T\fP \fIname\fP] -[\fBfile\fP] +[\fIfile\fP] .P \fBip6tables\-restore\fP [\fB\-chntvV\fP] [\fB\-w\fP \fIseconds\fP] [\fB\-M\fP \fImodprobe\fP] [\fB\-T\fP \fIname\fP] -[\fBfile\fP] +[\fIfile\fP] .SH DESCRIPTION .PP .B iptables-restore
Signature · 1 line
2.40.0
Phil Sutter
reviewerPATCH v2 11/15 man: iptables-restore.8: Start paragraphs in upper-case
In reply to Phil SutterAlso add a missing full stop in one spot.
--- iptables/iptables-restore.8.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
iptables/iptables-restore.8.in +2 -2
@@ -40,13 +40,13 @@ are used to restore IP and IPv6 Tables from data specified on STDIN or in specify \fIfile\fP as an argument. .TP \fB\-c\fR, \fB\-\-counters\fR -restore the values of all packet and byte counters +Restore the values of all packet and byte counters. .TP \fB\-h\fP, \fB\-\-help\fP Print a short option summary. .TP \fB\-n\fR, \fB\-\-noflush\fR -don't flush the previous contents of the table. If not specified, +Don't flush the previous contents of the table. If not specified, both commands flush (delete) all previous contents of the respective table. .TP \fB\-t\fP, \fB\-\-test\fP
Signature · 1 line
2.40.0
Phil Sutter
reviewerPATCH v2 12/15 man: Trivial: Missing space after comma
In reply to Phil Sutter--- iptables/iptables-restore.8.in | 2 +- iptables/iptables-save.8.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
iptables/iptables-restore.8.in +1 -1
@@ -82,7 +82,7 @@ from Rusty Russell. .br Andras Kis-Szabo <[email protected]> contributed ip6tables-restore. .SH SEE ALSO -\fBiptables\-apply\fP(8),\fBiptables\-save\fP(8), \fBiptables\fP(8) +\fBiptables\-apply\fP(8), \fBiptables\-save\fP(8), \fBiptables\fP(8) .PP The iptables-HOWTO, which details more iptables usage, the NAT-HOWTO, which details NAT, and the netfilter-hacking-HOWTO which details the
iptables/iptables-save.8.in +1 -1
@@ -62,7 +62,7 @@ Rusty Russell <[email protected]> .br Andras Kis-Szabo <[email protected]> contributed ip6tables-save. .SH SEE ALSO -\fBiptables\-apply\fP(8),\fBiptables\-restore\fP(8), \fBiptables\fP(8) +\fBiptables\-apply\fP(8), \fBiptables\-restore\fP(8), \fBiptables\fP(8) .PP The iptables-HOWTO, which details more iptables usage, the NAT-HOWTO, which details NAT, and the netfilter-hacking-HOWTO which details the
Signature · 1 line
2.40.0
Phil Sutter
reviewerPATCH v2 13/15 man: iptables-save.8: Clarify 'available tables'
In reply to Phil SutterThis appears to be confusing. Since a missing table is also not flushed ("restored") when feeding the dump into iptables-restore, such a restore call may be considered incomplete.
--- iptables/iptables-save.8.in | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
iptables/iptables-save.8.in +4 -1
@@ -52,7 +52,10 @@ restrict output to only one table. If the kernel is configured with automatic module loading, an attempt will be made to load the appropriate module for that table if it is not already there. .br -If not specified, output includes all available tables. +If not specified, output includes all available tables. No module loading takes +place, so in order to include a specific table in the output, the respective +module (something like \fBiptable_mangle\fP or \fBip6table_raw\fP) must be +loaded first. .SH BUGS None known as of iptables-1.2.1 release .SH AUTHORS
Signature · 1 line
2.40.0
Phil Sutter
reviewerPATCH v2 14/15 man: iptables-save.8: Fix --modprobe description
In reply to Phil Sutter- Consistently use 'modprobe' as option argument name
- Add a reference to modprobe man page
- Put the path in italics and the command in bold
---
Changes since v1:
- Non-bold "modprobe" and iptables-restore program name
--- iptables/iptables-save.8.in | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
iptables/iptables-save.8.in +4 -3
@@ -36,9 +36,10 @@ and are used to dump the contents of IP or IPv6 Table in easily parseable format either to STDOUT or to a specified file. .TP -\fB\-M\fR, \fB\-\-modprobe\fR \fImodprobe_program\fP -Specify the path to the modprobe program. By default, iptables-save will -inspect /proc/sys/kernel/modprobe to determine the executable's path. +\fB\-M\fR, \fB\-\-modprobe\fR \fImodprobe\fP +Specify the path to the modprobe(8) program. By default, +iptables-save will inspect \fI/proc/sys/kernel/modprobe\fP to determine +the executable's path. .TP \fB\-f\fR, \fB\-\-file\fR \fIfilename\fP Specify a filename to log the output to. If not specified, iptables-save
Signature · 1 line
2.40.0
Phil Sutter
reviewerPATCH v2 15/15 man: iptables-save.8: Start paragraphs in upper-case
In reply to Phil SutterAlso add a missing full stop.
--- iptables/iptables-save.8.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
iptables/iptables-save.8.in +2 -2
@@ -46,10 +46,10 @@ Specify a filename to log the output to. If not specified, iptables-save will log to STDOUT. .TP \fB\-c\fR, \fB\-\-counters\fR -include the current values of all packet and byte counters in the output +Include the current values of all packet and byte counters in the output. .TP \fB\-t\fR, \fB\-\-table\fR \fItablename\fP -restrict output to only one table. If the kernel is configured with automatic +Restrict output to only one table. If the kernel is configured with automatic module loading, an attempt will be made to load the appropriate module for that table if it is not already there. .br
Signature · 1 line
2.40.0
Phil Sutter
reviewerQuoted 7 lines · Phil Sutter
Thanks to the manpage-l10n project, we received several tickets listing a number of corrections and improvements to the different iptables man pages. This series implements what I considered valid and worth keeping.
Series applied.