Re: Reverse tunnel and multiple interface

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Esteban Dauksis Ortolá
esteban@xxxxxxxxxxx
http://www.linkedin.com/in/estebandauksis

El 29/10/2008, a las 17:51, Christian Gagneraud escribió:

Hi all,

I have a box running embedded linux, which has 2 network interfaces, the first (eth0) is the "normal" interface, the other one (ppp0) is used as
a back-up link (in case eth0 is down, we still want to be able to
connect to the box).
The box is installed on the sea, few miles away from the shore, the box
access internet through eth0 which is connected to a transparent WIFI
bridge and finally to an ADSL router.


The ppp0 is a GPRS connection via a modem, as my provider doesn't allow
incoming connection, i need to set up a reverse tunnel if i want to be
able to connect remotely to the box.
I know i can set-up the reverse tunnel with something like "ssh -CNR
<middleport>:localhost:2222 middleuser@middleserver", we use this on
other projects that have only ppp0 to access internet, and it works
fine.


If the connect back system has a fix IP address you can put a host route througth ppp0 to your fix IP address

It is critical for us to be able to access the box 24/7, the services
provided by this box need a good bandwidth, that's why we need a
broadband connection. The ppp0 will be only used in case of
eth0/internet failure to investigate the problem(s).
Actually the WIFI link is the weakness of the system, the embedded WIFI bridge can fail due to various reason including misalignment (the system
can derived from its original position), corosion (sea water is a
killer), power supply failures, ....


I think, the key is in the other end,
Get another Managment ADSL,  with fix IP address so you can put 2 routes

to MNGMT_ADSL2_pub_IP dev ppp0
to 0.0.0.0 dev eth0

And in the other end you can have a multihomed box

Finally, my problem is that i would like to simply force the reverse
tunnel to use only ppp0. And at the same time i need the default route
to go through eth0 (that is needed for the main programs running on this
box)

So, this is what i would like to achieve:

 /----------- ppp0 --------| GPRS Modem |---{internet}
 |      /---- lo
 |      | /-- eth0 --------| ADSL router|---{internet}
 |      | |
 |      | |
 |  ssh daemon (2222), main apps
 |
 \-- ssh -CNR ...


I have the feeling that there's no way to tell ssh to make a reverse
tunnel through a specific interface and ignore the default route, and
that i will have to find a way via the kernel network set-up, and i have
no clue on how to do this. I don't want to use an automatic/redondant
route, because if my app try to use ppp0, then the link will be stucked,
because this app is bandwith hungry and anyway this app needs incoming
connections...

So, perhaps someone will come here with an idea using only ssh...

With best regards,
Chris

PS: Please CC me as i'm not subscribed to the list.





[Index of Archives]     [Open SSH Unix Development]     [Fedora Users]     [Fedora Desktop]     [Yosemite Backpacking]     [KDE Users]     [Gnome Users]

  Powered by Linux