On 28/03/07, Nathan Fain <[EMAIL PROTECTED]> wrote:
When sshd deals with port forwarding and tunneling it seems to re
 encapsulate the outgoing packets and use the default route for
 determining which interface or internet line to send it out on.  I

Your solution looks similar to what we have on our network as well -
two lines and two external addresses (one for each line) which map to
two different internal addresses on the Linux box (with one NIC). The
modems are routers with NAT, not bridged.

(We too need the packets to return through the same line from which
the other side talked to us even just so the NAT on the right modem
will know how to translate the addresses back).

The "normal" default route goes to one of the lines, the other is setup thus:

ifconfig eth0:10 10.1.1.27 netmask 0xff000000
ip rule add from 10.1.1.27 table conn2
ip route add table conn2 10.0.0.0/8 dev eth0
ip route add table conn2 default via 10.1.1.1
ip route flush cache

(ip addresses change to protect the innocent, eth0 also has an address
on 10.1.1.x network)

BTW - on Debian the package is called "iproute", not "iproute2".

Hope this helps,

--Amos

=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to