iptables manpage updates
The following changes since commit 3be599b62869f2437f499e2386008d73b8c2e71b:
extensions: libarpt_standard.t: Add a rule with builtin option masks (2023-11-09 15:55:33 +0100)
are available in the Git repository at:
https://git.inai.de/iptables master
for you to fetch changes up to 4b0c168a7b50032ba64f75565f73340fc447bfab:
man: more backslash-encoding of characters (2023-11-13 11:28:19 +0100)
----------------------------------------------------------------
Jan Engelhardt (7):
man: consistent use of \(em in Name sections
man: remove lone .nh command
man: repeal manual hyphenation
man: stop putting non-terminals in italic
man: copy synopsis markup from iptables.8 to arptables-nft.8
man: limit targets for -P option synopsis
man: more backslash-encoding of characters
extensions/libxt_CONNMARK.man | 4 +- extensions/libxt_NFLOG.man | 2 +- iptables/arptables-nft-restore.8 | 4 +- iptables/arptables-nft-save.8 | 2 +- iptables/arptables-nft.8 | 154 +++++++++++++++++++++------------------ iptables/ebtables-nft.8 | 4 +- iptables/iptables-apply.8.in | 4 +- iptables/iptables.8.in | 8 +- iptables/xtables-nft.8 | 16 ++-- iptables/xtables-translate.8 | 32 ++++---- utils/nfbpf_compile.8.in | 2 +- utils/nfnl_osf.8.in | 2 +- 12 files changed, 123 insertions(+), 111 deletions(-)
PATCH 1/7 man: consistent use of \(em in Name sections
--- iptables/arptables-nft-restore.8 | 2 +- iptables/arptables-nft-save.8 | 2 +- iptables/arptables-nft.8 | 2 +- iptables/ebtables-nft.8 | 2 +- iptables/iptables-apply.8.in | 2 +- utils/nfbpf_compile.8.in | 2 +- utils/nfnl_osf.8.in | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-)
iptables/arptables-nft-restore.8 +1 -1
@@ -20,7 +20,7 @@ .\" .\" .SH NAME -arptables-restore \- Restore ARP Tables (nft-based) +arptables-restore \(em Restore ARP Tables (nft-based) .SH SYNOPSIS \fBarptables\-restore .SH DESCRIPTION
iptables/arptables-nft-save.8 +1 -1
@@ -20,7 +20,7 @@ .\" .\" .SH NAME -arptables-save \- dump arptables rules to stdout (nft-based) +arptables-save \(em dump arptables rules to stdout (nft-based) .SH SYNOPSIS \fBarptables\-save\fP [\fB\-M\fP \fImodprobe\fP] [\fB\-c\fP] .P
iptables/arptables-nft.8 +1 -1
@@ -22,7 +22,7 @@ .\" .\" .SH NAME -arptables \- ARP table administration (nft-based) +arptables \(em ARP table administration (nft-based) .SH SYNOPSIS .BR "arptables " [ "-t table" ] " -" [ AD ] " chain rule-specification " [ options ] .br
iptables/ebtables-nft.8 +1 -1
@@ -24,7 +24,7 @@ .\" .\" .SH NAME -ebtables \- Ethernet bridge frame table administration (nft-based) +ebtables \(em Ethernet bridge frame table administration (nft-based) .SH SYNOPSIS .BR "ebtables " [ -t " table ] " - [ ACDI "] chain rule specification [match extensions] [watcher extensions] target" .br
iptables/iptables-apply.8.in +1 -1
@@ -6,7 +6,7 @@ .\" disable hyphenation .nh .SH NAME -iptables-apply \- a safer way to update iptables remotely +iptables-apply \(em a safer way to update iptables remotely .SH SYNOPSIS \fBiptables\-apply\fP [\-\fBhV\fP] [\fB-t\fP \fItimeout\fP] [\fB-w\fP \fIsavefile\fP] {[\fIrulesfile]|-c [runcmd]}\fP .SH "DESCRIPTION"
utils/nfbpf_compile.8.in +1 -1
@@ -1,7 +1,7 @@ .TH NFBPF_COMPILE 8 "" "@PACKAGE_STRING@" "@PACKAGE_STRING@" .SH NAME -nfbpf_compile \- generate bytecode for use with xt_bpf +nfbpf_compile \(em generate bytecode for use with xt_bpf .SH SYNOPSIS .ad l
utils/nfnl_osf.8.in +1 -1
@@ -1,7 +1,7 @@ .TH NFNL_OSF 8 "" "@PACKAGE_STRING@" "@PACKAGE_STRING@" .SH NAME -nfnl_osf \- OS fingerprint loader utility +nfnl_osf \(em OS fingerprint loader utility .SH SYNOPSIS .ad l
Signature · 1 line
2.42.1
PATCH 2/7 man: remove lone .nh command
In reply to Jan EngelhardtNo other manpage files use .nh, and I cannot see a reason iptables-apply would exceptionally need it.
--- iptables/iptables-apply.8.in | 2 -- 1 file changed, 2 deletions(-)
iptables/iptables-apply.8.in +0 -2
@@ -3,8 +3,6 @@ .\" Date: May 10, 2010 .\" .TH IPTABLES\-APPLY 8 "" "@PACKAGE_STRING@" "@PACKAGE_STRING@" -.\" disable hyphenation -.nh .SH NAME iptables-apply \(em a safer way to update iptables remotely .SH SYNOPSIS
Signature · 1 line
2.42.1
PATCH 3/7 man: repeal manual hyphenation
In reply to Jan Engelhardt--- iptables/arptables-nft.8 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
iptables/arptables-nft.8 +2 -2
@@ -303,8 +303,8 @@ Mangles Destination MAC Address to given value. Target of ARP mangle operation .BR "" ( DROP ", " CONTINUE " or " ACCEPT " -- default is " ACCEPT ). .SS CLASSIFY -This module allows you to set the skb->priority value (and thus clas- -sify the packet into a specific CBQ class). +This module allows you to set the skb->priority value (and thus +classify the packet into a specific CBQ class). .TP .BR "--set-class major:minor"
Signature · 1 line
2.42.1
PATCH 4/7 man: stop putting non-terminals in italic
In reply to Jan Engelhardt--- iptables/iptables.8.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
iptables/iptables.8.in +3 -3
@@ -49,11 +49,11 @@ iptables/ip6tables \(em administration tool for IPv4/IPv6 packet filtering and N .PP \fBiptables\fP [\fB\-t\fP \fItable\fP] \fB\-E\fP \fIold-chain-name new-chain-name\fP .PP -rule-specification = [\fImatches...\fP] [\fItarget\fP] +rule-specification := [matches...] [target] .PP -match = \fB\-m\fP \fImatchname\fP [\fIper-match-options\fP] +match := \fB\-m\fP \fImatchname\fP [per-match-options] .PP -target = \fB\-j\fP \fItargetname\fP [\fIper\-target\-options\fP] +target := \fB\-j\fP \fItargetname\fP [per-target-options] .SH DESCRIPTION \fBIptables\fP and \fBip6tables\fP are used to set up, maintain, and inspect the tables of IPv4 and IPv6 packet
Signature · 1 line
2.42.1
PATCH 5/7 man: copy synopsis markup from iptables.8 to arptables-nft.8
In reply to Jan Engelhardt--- iptables/arptables-nft.8 | 42 ++++++++++++++++++++++++++-------------- 1 file changed, 28 insertions(+), 14 deletions(-)
iptables/arptables-nft.8 +28 -14
@@ -24,20 +24,34 @@ .SH NAME arptables \(em ARP table administration (nft-based) .SH SYNOPSIS -.BR "arptables " [ "-t table" ] " -" [ AD ] " chain rule-specification " [ options ] -.br -.BR "arptables " [ "-t table" ] " -" [ RI ] " chain rulenum rule-specification " [ options ] -.br -.BR "arptables " [ "-t table" ] " -D chain rulenum " [ options ] -.br -.BR "arptables " [ "-t table" ] " -" [ "LFZ" ] " " [ chain ] " " [ options ] -.br -.BR "arptables " [ "-t table" ] " -" [ "NX" ] " chain" -.br -.BR "arptables " [ "-t table" ] " -E old-chain-name new-chain-name" -.br -.BR "arptables " [ "-t table" ] " -P chain target " [ options ] - +\fBarptables\fP [\fB\-t\fP \fItable\fP] {\fB\-A|\-D\fP} \fIchain\fP +\fIrule-specification\fP [options...] +.PP +\fBarptables\fP [\fB\-t\fP \fItable\fP] \fB\-I\fP \fIchain\fP [\fIrulenum\fP] +\fIrule-specification\fP +.PP +\fBarptables\fP [\fB\-t\fP \fItable\fP] \fB\-R\fP \fIchain rulenum +rule-specification\fP +.PP +\fBarptables\fP [\fB\-t\fP \fItable\fP] \fB\-D\fP \fIchain rulenum\fP +.PP +\fBarptables\fP [\fB\-t\fP \fItable\fP] {\fB\-F\fP|\fB\-L\fP|\fB\-Z\fP} +[\fIchain\fP [\fIrulenum\fP]] [\fIoptions...\fP] +.PP +\fBarptables\fP [\fB\-t\fP \fItable\fP] \fB\-N\fP \fIchain\fP +.PP +\fBarptables\fP [\fB\-t\fP \fItable\fP] \fB\-X\fP [\fIchain\fP] +.PP +\fBarptables\fP [\fB\-t\fP \fItable\fP] \fB\-P\fP \fIchain target\fP +.PP +\fBarptables\fP [\fB\-t\fP \fItable\fP] \fB\-E\fP \fIold-chain-name +new-chain-name\fP +.PP +rule-specification := [matches...] [target] +.PP +match := \fB\-m\fP \fImatchname\fP [per-match-options] +.PP +target := \fB\-j\fP \fItargetname\fP [per-target-options] .SH DESCRIPTION .B arptables is a user space tool, it is used to set up and maintain the
Signature · 1 line
2.42.1
PATCH 6/7 man: limit targets for -P option synopsis
In reply to Jan EngelhardtDo not suggest that -P could be used with arbitrary targets.
--- iptables/arptables-nft.8 | 2 +- iptables/iptables.8.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
iptables/arptables-nft.8 +1 -1
@@ -42,7 +42,7 @@ rule-specification\fP .PP \fBarptables\fP [\fB\-t\fP \fItable\fP] \fB\-X\fP [\fIchain\fP] .PP -\fBarptables\fP [\fB\-t\fP \fItable\fP] \fB\-P\fP \fIchain target\fP +\fBarptables\fP [\fB\-t\fP \fItable\fP] \fB\-P\fP \fIchain policy\fP .PP \fBarptables\fP [\fB\-t\fP \fItable\fP] \fB\-E\fP \fIold-chain-name new-chain-name\fP
iptables/iptables.8.in +1 -1
@@ -45,7 +45,7 @@ iptables/ip6tables \(em administration tool for IPv4/IPv6 packet filtering and N .PP \fBiptables\fP [\fB\-t\fP \fItable\fP] \fB\-X\fP [\fIchain\fP] .PP -\fBiptables\fP [\fB\-t\fP \fItable\fP] \fB\-P\fP \fIchain target\fP +\fBiptables\fP [\fB\-t\fP \fItable\fP] \fB\-P\fP \fIchain policy\fP .PP \fBiptables\fP [\fB\-t\fP \fItable\fP] \fB\-E\fP \fIold-chain-name new-chain-name\fP .PP
Signature · 1 line
2.42.1
PATCH 7/7 man: more backslash-encoding of characters
In reply to Jan Engelhardt"-" is the dash, "\-" is minus as we know, but groff lists some more
characters: "^" is "modifier circumflex" and "~" is "modifier tilde", which, too, need to be escaped for our use.
--- extensions/libxt_CONNMARK.man | 4 +- extensions/libxt_NFLOG.man | 2 +- iptables/arptables-nft-restore.8 | 2 +- iptables/arptables-nft.8 | 108 +++++++++++++++---------------- iptables/ebtables-nft.8 | 2 +- iptables/xtables-nft.8 | 16 ++--- iptables/xtables-translate.8 | 32 ++++----- 7 files changed, 83 insertions(+), 83 deletions(-)
extensions/libxt_CONNMARK.man +2 -2
@@ -8,7 +8,7 @@ Zero out the bits given by \fImask\fP and XOR \fIvalue\fP into the ctmark. Copy the packet mark (nfmark) to the connection mark (ctmark) using the given masks. The new nfmark value is determined as follows: .IP -ctmark = (ctmark & ~ctmask) ^ (nfmark & nfmask) +ctmark = (ctmark & \~ctmask) \^ (nfmark & nfmask) .IP i.e. \fIctmask\fP defines what bits to clear and \fInfmask\fP what bits of the nfmark to XOR into the ctmark. \fIctmask\fP and \fInfmask\fP default to
@@ -18,7 +18,7 @@ nfmark to XOR into the ctmark. \fIctmask\fP and \fInfmask\fP default to Copy the connection mark (ctmark) to the packet mark (nfmark) using the given masks. The new ctmark value is determined as follows: .IP -nfmark = (nfmark & ~\fInfmask\fP) ^ (ctmark & \fIctmask\fP); +nfmark = (nfmark & \~\fInfmask\fP) \^ (ctmark & \fIctmask\fP); .IP i.e. \fInfmask\fP defines what bits to clear and \fIctmask\fP what bits of the ctmark to XOR into the nfmark. \fIctmask\fP and \fInfmask\fP default to
extensions/libxt_NFLOG.man +1 -1
@@ -9,7 +9,7 @@ may subscribe to the group to receive the packets. Like LOG, this is a non-terminating target, i.e. rule traversal continues at the next rule. .TP \fB\-\-nflog\-group\fP \fInlgroup\fP -The netlink group (0\(en2^16\-1) to which packets are (only applicable for +The netlink group (0\(en2\^16\-1) to which packets are (only applicable for nfnetlink_log). The default value is 0. .TP \fB\-\-nflog\-prefix\fP \fIprefix\fP
iptables/arptables-nft-restore.8 +1 -1
@@ -22,7 +22,7 @@ .SH NAME arptables-restore \(em Restore ARP Tables (nft-based) .SH SYNOPSIS -\fBarptables\-restore +\fBarptables\-restore\fP .SH DESCRIPTION .PP .B arptables-restore
iptables/arptables-nft.8 +54 -54
271 lines not on this page · raw message
iptables/ebtables-nft.8 +1 -1
@@ -858,7 +858,7 @@ Log with the default logging options .TP .B --nflog-group "\fInlgroup\fP" .br -The netlink group (1\(en2^32\-1) to which packets are (only applicable for +The netlink group (1\(en2\^32\-1) to which packets are (only applicable for nfnetlink_log). The default value is 1. .TP .B --nflog-prefix "\fIprefix\fP"
iptables/xtables-nft.8 +8 -8
@@ -105,15 +105,15 @@ One basic example is creating the skeleton ruleset in nf_tables from the xtables-nft tools, in a fresh machine: .nf - root@machine:~# iptables\-nft \-L + root@machine:\~# iptables\-nft \-L [...] - root@machine:~# ip6tables\-nft \-L + root@machine:\~# ip6tables\-nft \-L [...] - root@machine:~# arptables\-nft \-L + root@machine:\~# arptables\-nft \-L [...] - root@machine:~# ebtables\-nft \-L + root@machine:\~# ebtables\-nft \-L [...] - root@machine:~# nft list ruleset + root@machine:\~# nft list ruleset table ip filter { chain INPUT { type filter hook input priority 0; policy accept;
@@ -175,12 +175,12 @@ To migrate your complete filter ruleset, in the case of \fBiptables(8)\fP, you would use: .nf - root@machine:~# iptables\-legacy\-save > myruleset # reads from x_tables - root@machine:~# iptables\-nft\-restore myruleset # writes to nf_tables + root@machine:\~# iptables\-legacy\-save > myruleset # reads from x_tables + root@machine:\~# iptables\-nft\-restore myruleset # writes to nf_tables .fi or .nf - root@machine:~# iptables\-legacy\-save | iptables-translate-restore | less + root@machine:\~# iptables\-legacy\-save | iptables\-translate\-restore | less .fi to see how rules would look like in the nft
iptables/xtables-translate.8 +16 -16
@@ -38,15 +38,15 @@ ruleset from \fBiptables(8)\fP, \fBip6tables(8)\fP and \fBebtables(8)\fP to The available commands are: .IP \[bu] 2 -iptables-translate +iptables\-translate .IP \[bu] -iptables-restore-translate +iptables\-restore\-translate .IP \[bu] 2 -ip6tables-translate +ip6tables\-translate .IP \[bu] -ip6tables-restore-translate +ip6tables\-restore\-translate .IP \[bu] 2 -ebtables-translate +ebtables\-translate .SH USAGE They take as input the original
@@ -69,38 +69,38 @@ Basic operation examples. Single command translation: .nf -root@machine:~# iptables-translate -A INPUT -p tcp --dport 22 -m conntrack --ctstate NEW -j ACCEPT +root@machine:\~# iptables\-translate \-A INPUT \-p tcp \-\-dport 22 \-m conntrack \-\-ctstate NEW \-j ACCEPT nft add rule ip filter INPUT tcp dport 22 ct state new counter accept -root@machine:~# ip6tables-translate -A FORWARD -i eth0 -o eth3 -p udp -m multiport --dports 111,222 -j ACCEPT +root@machine:\~# ip6tables\-translate \-A FORWARD \-i eth0 \-o eth3 \-p udp \-m multiport \-\-dports 111,222 \-j ACCEPT nft add rule ip6 filter FORWARD iifname eth0 oifname eth3 meta l4proto udp udp dport { 111,222} counter accept .fi Whole ruleset translation: .nf -root@machine:~# iptables-save > save.txt -root@machine:~# cat save.txt -# Generated by iptables-save v1.6.0 on Sat Dec 24 14:26:40 2016 +root@machine:\~# iptables\-save > save.txt +root@machine:\~# cat save.txt +# Generated by iptables\-save v1.6.0 on Sat Dec 24 14:26:40 2016 *filter :INPUT ACCEPT [5166:1752111] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [5058:628693] --A FORWARD -p tcp -m tcp --dport 22 -m conntrack --ctstate NEW -j ACCEPT +\-A FORWARD \-p tcp \-m tcp \-\-dport 22 \-m conntrack \-\-ctstate NEW \-j ACCEPT COMMIT # Completed on Sat Dec 24 14:26:40 2016 -root@machine:~# iptables-restore-translate -f save.txt -# Translated by iptables-restore-translate v1.6.0 on Sat Dec 24 14:26:59 2016 +root@machine:\~# iptables\-restore\-translate \-f save.txt +# Translated by iptables\-restore\-translate v1.6.0 on Sat Dec 24 14:26:59 2016 add table ip filter add chain ip filter INPUT { type filter hook input priority 0; } add chain ip filter FORWARD { type filter hook forward priority 0; } add chain ip filter OUTPUT { type filter hook output priority 0; } add rule ip filter FORWARD tcp dport 22 ct state new counter accept -root@machine:~# iptables-restore-translate -f save.txt > ruleset.nft -root@machine:~# nft -f ruleset.nft -root@machine:~# nft list ruleset +root@machine:\~# iptables\-restore\-translate \-f save.txt > ruleset.nft +root@machine:\~# nft \-f ruleset.nft +root@machine:\~# nft list ruleset table ip filter { chain INPUT { type filter hook input priority 0; policy accept;
Signature · 1 line
2.42.1
Florian Westphal
maintainerQuoted 8 lines · Jan Engelhardt
The following changes since commit
3be599b62869f2437f499e2386008d73b8c2e71b:extensions: libarpt_standard.t: Add a rule with builtin option masks (2023-11-09 15:55:33 +0100)
are available in the Git repository at:
https://git.inai.de/iptables master
Also pulled, thanks Jan.