Skip to contentSkip to conversation

document multiport invert option

PATCH In review Phil Oester 3 participants 3 messages Sep 8, 2004 – Sep 9, 2004 netfilter

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 document multiport invert option

The man/-h pages for multiport don't document that you can use inversion. This can be confusing, since multiport uses '! --port x' instead of '--dport ! x' like tcp/udp.

This closes bugzilla #143

Phil

extensions/libip6t_multiport.c +5 -5
diff -ru ipt-orig/extensions/libip6t_multiport.c ipt-new/extensions/libip6t_multiport.c
@@ -13,13 +13,13 @@
 {
 	printf(
 "multiport v%s options:\n"
-" --source-ports port[,port,port...]\n"
-" --sports ...\n"
+" [!] --source-ports port[,port,port...]\n"
+" [!] --sports ...\n"
 "				match source port(s)\n"
-" --destination-ports port[,port,port...]\n"
-" --dports ...\n"
+" [!] --destination-ports port[,port,port...]\n"
+" [!] --dports ...\n"
 "				match destination port(s)\n"
-" --ports port[,port,port]\n"
+" [!] --ports port[,port,port]\n"
 "				match both source and destination port(s)\n",
 IPTABLES_VERSION);
 }
extensions/libip6t_multiport.man +3 -3
diff -ru ipt-orig/extensions/libip6t_multiport.man ipt-new/extensions/libip6t_multiport.man
@@ -4,16 +4,16 @@
 or
 .BR "-p udp" .
 .TP
-.BR "--source-ports " "\fIport\fP[,\fIport\fP[,\fIport\fP...]]"
+.BR "[!] --source-ports " "\fIport\fP[,\fIport\fP[,\fIport\fP...]]"
 Match if the source port is one of the given ports.  The flag
 .B --sports
 is a convenient alias for this option.
 .TP
-.BR "--destination-ports " "\fIport\fP[,\fIport\fP[,\fIport\fP...]]"
+.BR "[!] --destination-ports " "\fIport\fP[,\fIport\fP[,\fIport\fP...]]"
 Match if the destination port is one of the given ports.  The flag
 .B --dports
 is a convenient alias for this option.
 .TP
-.BR "--ports " "\fIport\fP[,\fIport\fP[,\fIport\fP...]]"
+.BR "[!] --ports " "\fIport\fP[,\fIport\fP[,\fIport\fP...]]"
 Match if the both the source and destination ports are equal to each
 other and to one of the given ports.
extensions/libipt_mport.c +5 -5
diff -ru ipt-orig/extensions/libipt_mport.c ipt-new/extensions/libipt_mport.c
@@ -13,13 +13,13 @@
 {
 	printf(
 "mport v%s options:\n"
-" --source-ports port[,port:port,port...]\n"
-" --sports ...\n"
+" [!] --source-ports port[,port:port,port...]\n"
+" [!] --sports ...\n"
 "				match source port(s)\n"
-" --destination-ports port[,port:port,port...]\n"
-" --dports ...\n"
+" [!] --destination-ports port[,port:port,port...]\n"
+" [!] --dports ...\n"
 "				match destination port(s)\n"
-" --ports port[,port:port,port]\n"
+" [!] --ports port[,port:port,port]\n"
 "				match both source and destination port(s)\n",
 IPTABLES_VERSION);
 }
extensions/libipt_mport.man +3 -3
diff -ru ipt-orig/extensions/libipt_mport.man ipt-new/extensions/libipt_mport.man
@@ -4,16 +4,16 @@
 or
 .BR "-p udp" .
 .TP
-.BR "--source-ports " "\fIport\fP[,\fIport\fP[,\fIport\fP...]]"
+.BR "[!] --source-ports " "\fIport\fP[,\fIport\fP[,\fIport\fP...]]"
 Match if the source port is one of the given ports.  The flag
 .B --sports
 is a convenient alias for this option.
 .TP
-.BR "--destination-ports " "\fIport\fP[,\fIport\fP[,\fIport\fP...]]"
+.BR "[!] --destination-ports " "\fIport\fP[,\fIport\fP[,\fIport\fP...]]"
 Match if the destination port is one of the given ports.  The flag
 .B --dports
 is a convenient alias for this option.
 .TP
-.BR "--ports " "\fIport\fP[,\fIport\fP[,\fIport\fP...]]"
+.BR "[!] --ports " "\fIport\fP[,\fIport\fP[,\fIport\fP...]]"
 Match if the both the source and destination ports are equal to each
 other and to one of the given ports.
extensions/libipt_multiport.c +5 -5
diff -ru ipt-orig/extensions/libipt_multiport.c ipt-new/extensions/libipt_multiport.c
@@ -13,13 +13,13 @@
 {
 	printf(
 "multiport v%s options:\n"
-" --source-ports port[,port,port...]\n"
-" --sports ...\n"
+" [!] --source-ports port[,port,port...]\n"
+" [!] --sports ...\n"
 "				match source port(s)\n"
-" --destination-ports port[,port,port...]\n"
-" --dports ...\n"
+" [!] --destination-ports port[,port,port...]\n"
+" [!] --dports ...\n"
 "				match destination port(s)\n"
-" --ports port[,port,port]\n"
+" [!] --ports port[,port,port]\n"
 "				match both source and destination port(s)\n",
 IPTABLES_VERSION);
 }
extensions/libipt_multiport.man +3 -3
diff -ru ipt-orig/extensions/libipt_multiport.man ipt-new/extensions/libipt_multiport.man
@@ -4,16 +4,16 @@
 or
 .BR "-p udp" .
 .TP
-.BR "--source-ports " "\fIport\fP[,\fIport\fP[,\fIport\fP...]]"
+.BR "[!] --source-ports " "\fIport\fP[,\fIport\fP[,\fIport\fP...]]"
 Match if the source port is one of the given ports.  The flag
 .B --sports
 is a convenient alias for this option.
 .TP
-.BR "--destination-ports " "\fIport\fP[,\fIport\fP[,\fIport\fP...]]"
+.BR "[!] --destination-ports " "\fIport\fP[,\fIport\fP[,\fIport\fP...]]"
 Match if the destination port is one of the given ports.  The flag
 .B --dports
 is a convenient alias for this option.
 .TP
-.BR "--ports " "\fIport\fP[,\fIport\fP[,\fIport\fP...]]"
+.BR "[!] --ports " "\fIport\fP[,\fIport\fP[,\fIport\fP...]]"
 Match if the both the source and destination ports are equal to each
 other and to one of the given ports.
#1 lore raw
Quoted 5 lines · Phil Oester

The man/-h pages for multiport don't document that you can use inversion. This can be confusing, since multiport uses '! --port x' instead of '--dport ! x' like tcp/udp.

This closes bugzilla #143

I believe neither multiport or mport has invert support, they don't complain when you add a inverted rule but the resulting rule won't be inverted so I'm not going to apply this patch.

Signature · 1 line
/Martin
#2 lore raw
Quoted 10 lines · Martin Josefsson
Quoted 5 lines · Phil Oester

The man/-h pages for multiport don't document that you can use inversion. This can be confusing, since multiport uses '! --port x' instead of '--dport ! x' like tcp/udp.

This closes bugzilla #143

I believe neither multiport or mport has invert support, they don't complain when you add a inverted rule but the resulting rule won't be inverted so I'm not going to apply this patch.

Though, multiport and mport should have invert support, right? So you may add this support to your patch, phil. :-)

Herve

Signature · 4 lines
 _
(°=  Hervé Eychenne
//)
v_/_ WallFire project:  http://www.wallfire.org/