In my server, I have two ethernet cards:
enp0s17, local IP
192.168.0.7, router's public address
enp0s18, local IP
172.16.0.7, router's public address
On both networks, any incoming traffic of the two public IPs is routed to the server. So, actually any SSH, HTTP etc. going to
x.x.x.x should be forwarded to
192.168.0.7 and any traffic to
y.y.y.y should be forwarded to
Unfortunately, this is only working for one of them at once. Sometimes (after dis- and reconnecting the server to internet e.g. after reboot) this works for
enp0s17 and sometimes for
enp0s18 but never for both at the same time. (So, both routers are routing properly, seems to be an issue of the server.)
Same issue applies for outgoing traffic tested with
curl --interface enp0s1X ....
On the other hand, any local traffic is routing properly. In both networks, the server is always available on it's local IPs.
Does anyone have an idea what might cause this issue or how to solve it?
For testing purpose I completely disabled the firewall, so, this shouldn't be the problem.
(Both interfaces are using IPv6 prefix delegation too but I just left it out as it's working properly.)
Both routers are Ubiquiti EdgeRouters. IPs are statically given by the DHCP servers on the routers. Network configuration is done using
netplan. Using Ubuntu 20.04.
network: version: 2 renderer: networkd ethernets: enp0s17: dhcp4: yes dhcp6: yes enp0s18: dhcp4: yes dhcp6: yes