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 det开发者_Go百科ails. I would like my receiver to see eth1 instead of eth0.
Is this possible?
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.
精彩评论