I have a Linux box with a couple of 3G/HSDPA modems, seen as network connections, and i would like to get each to connect to a server over SSH. The server could be the same server, and i would need each 3G modem and network to connect to the server once... For example: 2 Modems (10.4.5.6 with GW 10.4.5.1 and 10.5.6.7 with GW 10.5.6.1, since most 3G modems give internal network IP addresses, but could be anything...). server is at 1.2.3.4. the Linux box should be able to connect to server 1.2.3.4 twice.... once though the 5.1 GW and once though the 6.1 GW. Is it possible to set this up?
Asked
Active
Viewed 568 times
2
-
Look for a bonding howto, like on http://unixfoo.blogspot.de/2007/10/yet-to-add.html – ott-- Jul 06 '12 at 08:57
-
Bonding is not possible for this set-up... bonding only works (tell me if i am wrong here) if the network cards are on the same network, eg, a machine with 4GigE connections to a single switch. in this case, the IPs i am given are dynamic, on different subnets, have different gateways, dns, etc... would be nice if it worked, but it wont... – TiernanO Jul 06 '12 at 09:06
-
possible duplicate of [Force an application to use a specific network interface](http://superuser.com/questions/181882/force-an-application-to-use-a-specific-network-interface) – Bobby Jul 06 '12 at 09:10
-
Arrrr...crap, that is for OSX...might still work, though. – Bobby Jul 06 '12 at 09:11
-
it looks like it could work, technically, but since the server is going to have the same IP, only one route would actually be used... If i had 2 IPs on the server, which for 2 connections is not a problem, but for more, they could be, then routing would do the job... – TiernanO Jul 06 '12 at 09:29
-
If I see that correctly, you could try to set up aliases for the server and route via that. – Bobby Jul 06 '12 at 14:01
-
i have created 2 aliases in the hosts file on an unbuntu box ssh1 and ssh2. i then used
dev eth0> and the – TiernanO Jul 06 '12 at 14:30dev eth1> but when i ssh into ssh1, it tells me i am logged in though ETH1's IP, and when i ssh into ssh2 i get the same info... or am i doing something wrong? CNAMEs? -
@TiernanO Hi, I've done such setup with iproute mainly because of other requirements, what you are doing should work. If you still have this issue paste your `route -n` output I'll gladly help you out. – Valor Oct 08 '12 at 22:00
-
[How can I open different browsers' windows with different network adapters?](https://superuser.com/q/1515856/432690). You want to use `ssh`, not a browser, but the core problem is the same, isn't it? – Kamil Maciorowski Aug 03 '22 at 07:13