I have created a virtual interface using
ifconfig eth0:1 192.168.50.10 netmask 255.255.255.0 upNow I'm sending a request to a server via the virtual interface using curl:
curl --interface 192.168.50.10 http://192.168.50.1:8080/myhostedappThis works fine and my app shows the source ip as 192.168.50.10, but if the server is on a different subnet, and reachable from the physical interface (eth0), the connection times out.
So this works (via the physical interface):curl http://10.10.50.1:8080/myhostedapp.
But this fails:curl --interface 192.168.50.10 http://10.10.50.1:8080/myhostedapp.
For 10.10.50.1 to reach 192.168.50.10, I added it to the route table.
What do I need to configure so that 10.10.50.1 is reachable from 192.168.50.10?