I have created a virtual interface using

ifconfig eth0:1 netmask upNow I'm sending a request to a server via the virtual interface using curl:

curl --interface works fine and my app shows the source ip as, 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
But this fails:curl --interface
For to reach, I added it to the route table.
What do I need to configure so that is reachable from

Check Solution