LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Accepting connectionx from 2 DSL lines (https://www.linuxquestions.org/questions/linux-networking-3/accepting-connectionx-from-2-dsl-lines-763770/)

Jouxte 10-22-2009 12:21 PM

Accepting connectionx from 2 DSL lines
 
Hi all,

we have a 2 DSL connections at the office. On is the "main" and the other is the "backup". If I open a port on both DSL routers (for example port 5900 to 192.168.1.10) I can then use this port to reach a Windows computer (with vnc in my example). Nice, I then can log in my Windows server from either DSL connection. If one is out of order, the other one saves me half an hour driving by night.

But for a Linux server, this is another story :-)
If I open the ssh port on both DSL routers, both pointing to my Linux server, I can only log in from the "main" DSL connection. I presume because this is the default route, then the packets from the backup connection reach Linux, but Linux send answers using the main connection. Then my external computer don't understand because the packets are NATed (the source ip address is unexpected, in the point of view of the external computer).

I tested to add 2 default routes. No success. Only the first one is used.

My question is: how to tell Linux to send packets to the same router they come ?

janoszen 10-25-2009 04:15 AM

Source routing
 
I guess what you need is source routing. You must configure your routes per connection and drop the default route.


All times are GMT -5. The time now is 12:54 AM.