Skip to contentSkip to conversation

iptables manpage: Update protocol list for MASQUERADE and REDIRECT

PATCH New Mart Frauenlob 1 participant 1 message Apr 8, 2013 netfilter

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iptables manpage: Update protocol list for MASQUERADE and REDIRECT

Hello,

this patch updates the list of protocols valid for the --to-ports option of the MASQUERADE and REDIRECT targets.

If I read the source correctly (no C programmer), icmp is also valid. In that case the error message for !portok is missing icmp.

What does one specify, what is mapped with --to-ports and -p icmp?

Best regards

Mart

P.S. Is it ok to base on master, or should I use stable/next?

Quoted 1 line

From 8e78fab467dbca6d1e27218cc4db091545a49027 Mon Sep 17 00:00:00 2001

From: Mart Frauenlob <[email protected]>
Date: Mon, 8 Apr 2013 13:11:49 +0200
Subject: [PATCH] manpage: Update protocol list for MASQUERADE and REDIRET.

---
 extensions/libip6t_MASQUERADE.man |    6 +++---
 extensions/libipt_MASQUERADE.man  |    6 +++---
 extensions/libipt_REDIRECT.man    |    6 +++---
 3 files changed, 9 insertions(+), 9 deletions(-)
extensions/libip6t_MASQUERADE.man +3 -3
index c63d826..b5b7677 100644
@@ -16,10 +16,10 @@ any established connections are lost anyway).
 This specifies a range of source ports to use, overriding the default
 .B SNAT
 source port-selection heuristics (see above).  This is only valid
-if the rule also specifies
-\fB\-p tcp\fP
+if the rule also specifies one of the following protocols:
+.B tcp, udp, dccp, sctp
 or
-\fB\-p udp\fP.
+.B icmp.
 .TP
 \fB\-\-random\fP
 Randomize source port mapping
extensions/libipt_MASQUERADE.man +3 -3
index 2dae964..807ddbd 100644
@@ -16,10 +16,10 @@ any established connections are lost anyway).
 This specifies a range of source ports to use, overriding the default
 .B SNAT
 source port-selection heuristics (see above).  This is only valid
-if the rule also specifies
-\fB\-p tcp\fP
+if the rule also specifies one of the following protocols:
+.B tcp, udp, dccp, sctp
 or
-\fB\-p udp\fP.
+.B icmp.
 .TP
 \fB\-\-random\fP
 Randomize source port mapping
extensions/libipt_REDIRECT.man +3 -3
index 90ab19d..635ddd4 100644
@@ -12,10 +12,10 @@ destination IP to the primary address of the incoming interface
 \fB\-\-to\-ports\fP \fIport\fP[\fB\-\fP\fIport\fP]
 This specifies a destination port or range of ports to use: without
 this, the destination port is never altered.  This is only valid
-if the rule also specifies
-\fB\-p tcp\fP
+if the rule also specifies one of the following protocols:
+.B tcp, udp, dccp, sctp
 or
-\fB\-p udp\fP.
+.B icmp.
 .TP
 \fB\-\-random\fP
 If option
Signature · 1 line
1.7.2.5