Reputation: 6768
I have eth0 and eth1. I am creating a simple tcp program with gsoap. the endpoint is 1.2.3.4.
The endpoint receives my data, but the IP of eth0 is shown in the sender details. I would like my receiver to see eth1 instead of eth0.
Is this possible?
Upvotes: 1
Views: 461
Reputation: 84239
Use the bind(2)
call to select the source IP, or create an explicit route(8)
to the server via eth1
. Second option is probably preferable since you don't need to modify the client source code.
Upvotes: 4