[CentOS] outside ssh connection from two different ISP's

Gordon Messmer gordon.messmer at gmail.com
Mon Nov 10 22:35:01 UTC 2014


On 11/10/2014 02:11 PM, Frank Cox wrote:
> However, the outside ssh connection works only if the computer's gateway assignment matches the router that I'm connecting to.  I suspect that I have to set up some sort of routing assignment to tell the computer to reply to the gateway that the ssh connection request came in on if it doesn't match the current gateway assignment, but I have no idea how to do that.

What you're describing is multi-homing, and it's fairly complex. You'll 
need to 1) create routing tables for each ISP, 2) mark incoming NEW 
connections based on the MAC of the router that forwarded the new 
connection, and 3) create ip rules to associate a connection with the 
correct routing table.

This article partially covers what you need to do, and might get you 
started:
https://blogs.oracle.com/networking/entry/advance_routing_for_multi_homed

You might also consider using Shorewall to manage the tables and rules 
rather than handling that yourself:
http://shorewall.net/MultiISP.html





More information about the CentOS mailing list