Multiple source IP addresses from one server
Is there a way to change which address is seen as the source without restarting networking, maybe per process or something? I assume this would involve changing the source address at the TCP level. The return traffic would be fine, as the server is set up to listen on all of the addresses. (I think my reasoning is correct here.)
Is there any way to do this?
4 Replies
wget(1) has a –bind-address option, that I think does what you're saying.
Edit: also, seems PHP's socket_bind() should work and not require running an external program.
curlsetopt($ch, CURLOPTINTERFACE, $ip);