Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195
Rep:
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.