Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 08-26-2010, 01:29 PM   #1
LQ Newbie
Registered: May 2009
Distribution: Fedora Core
Posts: 1

Rep: Reputation: 0
One NIC, One IP, Multiple Gateways

An example of my setup: - Local IP of Fedora System, hosting SSH and Apache - Local IP of Gateway 1 - Local IP of Gateway 2 - Internet IP of Gateway 1 - Internet IP of Gateway 2

I'm trying to forward ports 22 (ssh) and 80 (http) to the Fedora Server through BOTH gateways, both pointing to the same local IP of the server.

The problem is the server is only accepting incoming connections from which ever gateway is set to be the default gateway.

Any idea on how I could accomplish this while using only one IP for the Fedora server? I know I could set up multiple IPs and multiple gateways for those IPs to resolve this.
Old 08-26-2010, 07:45 PM   #2
Registered: Mar 2008
Posts: 16,883

Rep: Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498
You seem to be trying to defy the rules of tcp/ip. You can only have one path to and fro.

I may not fully understand what you are trying to do also.
Old 08-26-2010, 08:54 PM   #3
Senior Member
Registered: Oct 2003
Location: Bonaire
Distribution: Debian Wheezy/Jessie/Stretch/Sid, Linux Mint DE
Posts: 4,610

Rep: Reputation: 689Reputation: 689Reputation: 689Reputation: 689Reputation: 689Reputation: 689
It is not accepting connections on just the IP that is set as default gateway. But it can only send back packages over the default gw. And if the package did not come in over that interface it will still be sent back thru the default gw and that doesn't work.

I remember there is a solution for that in the LARTC (Linux Advanced Routing and Traffic Control). I think it had something to do with that a packet coming in over the other interface got a mark, and when it was to send back, another routing table was used to route it correctly. Look for load balancing or source routing. It is in that section of the LARTC.



Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple ips/gateways one NIC - Routing gsaminath Linux - Newbie 4 05-27-2009 02:28 AM
NIC, iSCSI, multiple gateways b1f30 Linux - Networking 1 07-04-2008 06:20 PM
Multiple IP address/gateways single nic 1192bo Linux - Networking 2 11-15-2005 07:51 AM
Red Hat 7.3 and multiple gateways on multiple interfaces bluefmc Linux - Networking 2 11-19-2004 05:01 PM
multiple ips, multiple gateways, one interface drpixel Linux - Networking 6 12-04-2002 12:56 AM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 11:59 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration