LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

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

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


An example of my setup:
192.168.1.5 - Local IP of Fedora System, hosting SSH and Apache

192.168.1.1 - Local IP of Gateway 1
192.168.1.2 - Local IP of Gateway 2

3.3.3.3 - Internet IP of Gateway 1
4.4.4.4 - 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
jefro
Guru
 
Registered: Mar 2008
Posts: 11,549

Rep: Reputation: 1405Reputation: 1405Reputation: 1405Reputation: 1405Reputation: 1405Reputation: 1405Reputation: 1405Reputation: 1405Reputation: 1405Reputation: 1405
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
jlinkels
Senior Member
 
Registered: Oct 2003
Location: Bonaire
Distribution: Debian Lenny/Squeeze/Wheezy/Sid
Posts: 4,094

Rep: Reputation: 493Reputation: 493Reputation: 493Reputation: 493Reputation: 493
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.

jlinkels
 
  


Reply


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


All times are GMT -5. The time now is 12:06 AM.

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