Networking Forums

Networking Forums > Computer Networking > Linux Networking > ISP Cutover - Multip NICs on NATed Linux Box

Reply
Thread Tools Display Modes

ISP Cutover - Multip NICs on NATed Linux Box

 
 
ecross@gmail.com
Guest
Posts: n/a

 
      04-10-2006, 06:45 PM
I am cutting over to a new ISP and have I have a linux box on my
internal network which has a reverse NAT to its ssh port. I'm in a
situation where I'd like the box to be available concurrently to both
the current public IP address and the new public IP address for a two
week duration.

The box now has only a single NIC card. I have setup a second firewall
created for the new ISP connection.

I like to add a secondary NIC card, eth1, and configure it to route
through the second firewall to the internet. However, I feel I may
have a routing issue, as my eth0 NIC is routing out through the current
firewall to the internet.

Is there a way to setup routing so that the box will respond to ssh on
both public IP addresses?

Thanks,

-Eric

 
Reply With Quote
 
 
 
 
Andrew Gideon
Guest
Posts: n/a

 
      04-10-2006, 08:36 PM
On Mon, 10 Apr 2006 11:45:52 -0700, ecross wrote:

> Is there a way to setup routing so that the box will respond to ssh on
> both public IP addresses?


With source-based routing, you can have packets sent by your machine with
a NEWIP source address routed to the new router and packets with an OLDIP
source address router to the old router.

You can use /sbin/ip to do this, but there may be a more friendly way;
it's been a long time since I played with this. For example:

/sbin/ip rule add from NEWIP to default table 5
/sbin/ip route add to default via NEWROUTER table 5

sets up a route table which does what you need for NEWIP.

I did a quick search on source-based routing, and I see that iptables can
also be used to do this. So that's another possible approach.

This article:
http://www.linuxjournal.com/article/7291

appears to discuss my solution in more detail.

I've no idea whether ip or iptables is the better approach.

- Andrew

 
Reply With Quote
 
ecross@gmail.com
Guest
Posts: n/a

 
      04-13-2006, 05:57 PM
Thanks for your reply Andrew. I ended up following this very clear
guide here:

http://www.tldp.org/HOWTO/Adv-Routin...ple-links.html

Good stuff.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
VPN to a server behind a firewall on NATed network yaro137 Windows Networking 7 05-19-2009 11:05 AM
Unable to get ssh through nated iptables gaur_ms@yahoo.co.in Linux Networking 1 12-18-2005 11:53 AM
I would like to know about Linux Network, can I do with single PC with two NICs? GS Linux Networking 2 05-30-2005 05:33 AM
3 nics in linux box (iptables) Jeremy Linux Networking 6 05-05-2005 02:50 PM
Linux router w/3 nics - need help with routing bob Linux Networking 2 11-01-2003 10:39 PM



1 2 3 4 5 6 7 8 9 10 11