routing for multiple isp's and portforwarding
From: Joni (joni_at_nospam.local)
Date: 11/17/05
- Next message: Alessandro: "Adsl-start says 'connected' but the net is inaccessible"
- Previous message: Stephan Herz: "Re: During booting:Illegal UART type: undefined"
- Next in thread: EricT: "Re: routing for multiple isp's and portforwarding"
- Reply: EricT: "Re: routing for multiple isp's and portforwarding"
- Reply: Ken: "Re: routing for multiple isp's and portforwarding"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 17 Nov 2005 11:58:07 +0100
Hi all,
I have a linux machine that acts as a router for a LAN. the machine has
3 interfaces connected to it: one LAN and two isp connections. The setup
is something similar as the lartc (see
http://lartc.org/howto/lartc.rpdb.multiple-links.html), differing only
in that I setup the regular main routing table and only one additional
table (not two).
The routing is setup in such a way that an incoming connection through
isp1 is answered through external interface 1 and an incoming connection
through isp2 is answered through external interface 2, which works great!
However, I need to forward (nat), for instance, port 25 for both
incoming isp lines to a mailserver on the LAN with a local ip address.
For the main routing table I would do this with iptables similar like this:
iptables -t nat -A PREROUTING -p TCP -d $ext_ip --dport 25 -j DNAT --to
192.168.0.2
However for the alternative table this doesn't work, since the packets
won't go through the routing table. I thought of using a POSTROUTING
table, but that wont work either, because I assume once it has gone
through the routing table the source address will be a local IP address
(192.168.0.1 from the router) and it won't be able to distuingish
through what isp connection to send it to...
Does anyone know a solution for this?
Thanks,
Jonathan
- Next message: Alessandro: "Adsl-start says 'connected' but the net is inaccessible"
- Previous message: Stephan Herz: "Re: During booting:Illegal UART type: undefined"
- Next in thread: EricT: "Re: routing for multiple isp's and portforwarding"
- Reply: EricT: "Re: routing for multiple isp's and portforwarding"
- Reply: Ken: "Re: routing for multiple isp's and portforwarding"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|