A simple routing question
rol at Robert-Eckardt.de
Sun Feb 5 10:37:11 UTC 2017
currently I'm trying to solve a problem that, as I see from
studying the archives, pops up on and off again. Yet, I was
unable to find a solution.
A local network connects to the internet using two providers
with routers (AVM FritzBox) that do the IPv4-NATing and a
server (FreeBSD 11.0-RELEASE with RADIX_MPATH und ipfw) as
part of the inner firewall (see the illustration below).
ns.provider1.de | | ns.provider2.de
The default routes of Server point to both routers and static
routes are defined e.g. for the respective name servers.
Requests to domain1 are answred correctly, requests to domain2
try their way via Router1 as ECMP routing does not take into
account, where the connection originated from.
However, packets of connections coming in via Router2 must
also be returned via Router2.
(I mainly care for TCP, but UDP would also be interesting.)
Is there a solution to this scenario in FreeBSD?
Please help me and other people seeking a solution to solve this
problem by describing a way to configure the server appropriately
or show that the problem cannot be solved in the given setting.
More information about the freebsd-questions