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
220.127.116.11 - Internet IP of Gateway 1
18.104.22.168 - 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.
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.
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.
|All times are GMT -5. The time now is 10:17 PM.|