Traffic arrives on the second NIC of a multi-homed server but replies leave through the first NIC and get dropped.
AdvancedTroubleshootingNetworking, DNS and firewalls
Answer
Likely causes → Asymmetric routing: the single default route sends replies out the wrong interface; rp_filter or upstream firewalls drop them.
Diagnose →
ip route; ip rule
sudo tcpdump -ni eth1 port 443 &
sudo tcpdump -ni eth0 port 443
sysctl net.ipv4.conf.all.rp_filter
Fix → Policy routing so replies from eth1's IP use eth1's gateway:
ip route add default via 10.0.2.1 dev eth1 table 100
ip rule add from 10.0.2.15 table 100
Persist via NetworkManager (ipv4.routing-rules) or netplan routing-policy. Set rp_filter=2 (loose) if needed.
Prevent → Document every multi-homed host's routing design.
More on Networking, DNS and firewalls
`curl http://10.0.1.20:8080` returns `curl: (7) Failed to connect to 10.0.1.20 port 8080: Connection refused`.BeginnerThe same request instead hangs and ends with `curl: (28) Failed to connect to 10.0.1.20 port 8080 after 130000 ms: Connection timed out`. How is this different from "refused"?Beginner`ping google.com` fails with `ping: google.com: Temporary failure in name resolution`, but `ping 8.8.8.8` works.Beginner`dig api.internal` works, but the application and `curl` fail with `Could not resolve host: api.internal`.Intermediate`/etc/resolv.conf` changes you made disappear after a reboot or a few minutes.BeginnerDNS lookups take exactly 5 seconds before succeeding.Intermediate