I have a few Node.JS and TypeScript application. Some uses SNMP and other internal services. None of them have any specific bind/sourceAddresssettings.
I see services binding to the wrong interface and have the wrong source IP.
To my understanding this is selected by the Linux operating system, but I'm unsure how I can change it back.
I have multiple interfaces.
Some of the services in my scripts sends packets to 10.8.7.10 on interface ens4.
When I run ip route get 10.8.7.10 I do get the right response, e.g. 10.8.7.10 dev ens4 src 10.8.7.4 uid 1006.
But when I tshark my traffic I see that packets with destination 10.8.7.10 comes from 100.0.10.11 which is on a completely different interface.
And packets with destination 10.8.7.10 tries to answer to 10.8.7.4 but gets Destination unreachable (Port unreachable) as if my service is not listening.
I've tried manually to put in ip route add 10.8.7.10 dev ens4 src 10.8.7.4. But didn't change anything.
How can I check and fix such a challenge?