Skip to contentSkip to conversation

update for ROUTE target in Netfilter-Extension HOWTO [ENG][FR]

PATCH In review Cédric de Launois 2 participants 2 messages Sep 20, 2002 – Sep 21, 2002 netfilter

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 update for ROUTE target in Netfilter-Extension HOWTO [ENG][FR]

Fabrice,

Here are two patches to update the Netfilter-Extension HOWTO, concerning the ROUTE target.

The first one [netfilter-extensions-HOWTO.sgml.PATCH] is against the english version of the sgml master.
The second patch is against [netfilter-extensions-HOWTO.sgml.PATCH-FR] is against the french version.

Cédric

netfilter-extensions-HOWTO.sgml renamed from netfilter-extensions-HOWTO.sgml.orig +8 -11
@@ -1093,8 +1093,6 @@
 Send the packet directly through the interface with the name specified.
 <tag>--ifindex index</>
 Send the packet directly through the interface with the index specified.
-This is Useful when you want to remove a rule with an interface which doesn't
-exist anymore (e.g. a tunnel which has been destroyed).
 </descrip>
 
 <p>
@@ -1106,7 +1104,7 @@
 
 <p>
 A solution is to simply reroute packets with destination port 22 to the
-computer having the same IP as the router and hosting the ssh service,
+computer having the same IP as the router, and hosting the ssh service,
 thanks to this ROUTE target and an ipip tunnel.
 
 <p>
@@ -1130,22 +1128,21 @@
 would add the following rules :
 
 <tscreen><verb>
-# iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 22 -j ROUTE --iface tunl1
-# iptables -A PREROUTING -t nat -i tunl1 --j ROUTE --iface eth0
+# iptables -A PREROUTING -t mangle -i eth0 -p tcp --dport 22 -j ROUTE --iface tunl1
+# iptables -A PREROUTING -t mangle -i tunl1 --j ROUTE --iface eth0
 
 # iptables -L PREROUTING -t nat
 Chain PREROUTING (policy ACCEPT)
 target     prot opt source               destination         
-ROUTE      tcp  --  anywhere             anywhere           tcp dpt:ssh ROUTE iface tunl1(7) 
-ROUTE      all  --  anywhere             anywhere           ROUTE iface eth0(3) 
+ROUTE      tcp  --  anywhere             anywhere           tcp dpt:ssh ROUTE iface tunl1 
+ROUTE      all  --  anywhere             anywhere           ROUTE iface eth0
 </verb></tscreen>
 
 <p>
 The first rule is for rerouting packet coming from the Internet, and the second
-one is for rerouting all packets coming from the host. The value shown inside parentheses
-after the interface name is the interface index. We use the nat table
-because this table provides a PREROUTING hook, but this does not imply any packet
-alteration. 
+one is for rerouting all packets coming from the host. The ROUTE target can only
+be inserted inside the mangle table, in the PREROUTING chain.
+
 
 <sect>New connection tracking patches
 <p>
netfilter-extensions-HOWTO.sgml renamed from netfilter-extensions-HOWTO.sgml.orig +7 -9
@@ -1129,7 +1129,7 @@
 
 <p>
 Une solution est de simplement rerouter les paquets dont le port de destination est 22
-vers l'ordinateur ayant la même adresse que le routeur, et habritant le serveur ssh.
+vers l'ordinateur ayant la même adresse que le routeur, et hébergeant le serveur ssh.
 Ceci peut se faire grâce à cette target ROUTE, en utilisant un tunnel IPIP.
 
 <p>
@@ -1153,23 +1153,21 @@
 les règles suivantes :
 
 <tscreen><verb>
-# iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 22 -j ROUTE --iface tunl1
-# iptables -A PREROUTING -t nat -i tunl1 --j ROUTE --iface eth0
+# iptables -A PREROUTING -t mangle -i eth0 -p tcp --dport 22 -j ROUTE --iface tunl1
+# iptables -A PREROUTING -t mangle -i tunl1 --j ROUTE --iface eth0
 
 # iptables -L PREROUTING -t nat
 Chain PREROUTING (policy ACCEPT)
 target     prot opt source               destination         
-ROUTE      tcp  --  anywhere             anywhere           tcp dpt:ssh ROUTE iface tunl1(7) 
-ROUTE      all  --  anywhere             anywhere           ROUTE iface eth0(3) 
+ROUTE      tcp  --  anywhere             anywhere           tcp dpt:ssh ROUTE iface tunl1
+ROUTE      all  --  anywhere             anywhere           ROUTE iface eth0
 </verb></tscreen>
 
 <p>
 La première règle reroute les paquets venant de l'Internet et les envoie dans le tunnel.
 La seconde règle reroute vers l'Internet tous les paquets venant de l'hôte (c'est-à-dire
-les paquets sortant du tunnel). La valeur indiquée entre parenthèses après le nom
-de l'interface est l'index de celle-ci. Nous utilisons la table nat parce qu'elle
-fournit une chaîne PREROUTING, mais ceci n'implique aucunement une modification des
-paquets.
+les paquets sortant du tunnel). Cette target ne peut être insérée que dans la table
+'mangle', dans la chaîne PREROUTING.
 
 <sect>Les nouveaux patches de suivi de connexion
 <p>
#1 lore raw

Hello Cédric,

Quoted 7 lines · Cédric de Launois

Fabrice,
Here are two patches to update the Netfilter-Extension HOWTO, concerning the ROUTE target.
The first one [netfilter-extensions-HOWTO.sgml.PATCH] is against the english version of the sgml master.
The second patch is against [netfilter-extensions-HOWTO.sgml.PATCH-FR] is against the french version.

Thanks a lot. Applied.

Have a nice day,

Fabrice.
--
Fabrice MARIE
Senior R&D Engineer
Celestix Networks
http://www.celestix.com/

"Silly hacker, root is for administrators"
-Unknown