Über externen Server routen

Einrichten des lokalen Netzes, Verbindung zu anderen Computern und Diensten.
Antworten
Salem
Beiträge: 3
Registriert: 24.01.2009 05:37:42

Über externen Server routen

Beitrag von Salem » 31.10.2009 02:08:36

Hallo,

eine kleine Routingfrage.

Aktuell sieht meine iptables-Regel folgendermaßen aus:

Code: Alles auswählen

iptables -t nat -A PREROUTING -d 92.x.x.x -j DNAT --to 10.0.0.10
iptables -t nat -A POSTROUTING -s 10.0.0.10 -j SNAT --to 92.x.x.x
Den Traffic des Clients mit der IP 10.0.0.10 möchte ich nun aber über einen externen Server routen. Wie stelle ich so etwas in der Praxis an? Es soll quasi der komplette Traffic über einen externen Server geroutet werden.

Danke

rendegast
Beiträge: 15041
Registriert: 27.02.2006 16:50:33
Lizenz eigener Beiträge: MIT Lizenz

Re: Über externen Server routen

Beitrag von rendegast » 31.10.2009 15:57:36

'man iptables'
ROUTE
This is used to explicitly override the core network stack's routing
decision. mangle table.

--oif ifname
Route the packet through `ifname' network interface

--iif ifname
Change the packet's incoming interface to `ifname'

--gw IP_address
Route the packet via this gateway

...
Wenn nur mitgeschnitten werden soll, dann so?:
...
--continue
Behave like a non-terminating target and continue traversing the
rules. Not valid in combination with `--iif' or `--tee'

--tee Make a copy of the packet, and route that copy to the given des-
tination. For the original, uncopied packet, behave like a non-
terminating target and continue traversing the rules. Not valid
in combination with `--iif' or `--continue'
mfg rendegast
-----------------------
Viel Eifer, viel Irrtum; weniger Eifer, weniger Irrtum; kein Eifer, kein Irrtum.
(Lin Yutang "Moment in Peking")

Antworten