cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Bind to a specific source port?

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Fri, 19 Aug 2005 10:08:04 +0200 (CEST)

On Thu, 18 Aug 2005, Khoa Nguyen wrote:

> I would like cURL to bind to a specific source port. The command line
> doesn't seem to have an option for source port.

Neither does the library. You can make it bind the local connection end to a
specific IP address, but that's it.

> The reason I want to do this is that I can use iptables at the next-hop
> machine to SNAT source ports to several source IP addresses to simulate
> several clients. Any ideas how to accomplish this?

It will require a modification of libcurl to add such a feature, and a command
line switch added that would enable that feature.

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2005-08-19