Skip to content

Instantly share code, notes, and snippets.

@codenoid
Created August 22, 2017 14:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codenoid/931dab08af37f110de35ae7d9a2577f7 to your computer and use it in GitHub Desktop.
Save codenoid/931dab08af37f110de35ae7d9a2577f7 to your computer and use it in GitHub Desktop.
curl set outgoing ip
Changelog Development Documentation Download libcurl Mailing Lists News
cURL / Mailing Lists / curl-users / Single Mail
curl-users
FW: Specifying a IP address to curl
This message: [ Message body ] [ More options ]
Related messages: [ Next message ] [ Previous message ] [ Maybe in reply to ] [ Next in thread ] [ Replies ]
From: Sagar Saibi <sagar.saibi_at_patni.com>
Date: Fri, 4 Mar 2005 18:08:48 +0530
I wanted to download using the specified IP address.
The command line used earlier is:
curl -v3 -P "167.68.0.67" -sc COOKIE
"http://courtgate.coca.co.clark.nv.us/DistrictCourt/asp/CaseNo.asp" >
/dev/null
The --interface option results into error. Here is the commandline and log
detail:
curl -v3 --interface "167.68.0.67" -sc COOKIE
"http://courtgate.coca.co.clark.nv.us/DistrictCourt/asp/CaseNo.asp" >
/dev/null
* About to connect() to webproxy port 80
* getaddrinfo(3) failed for 167.68.0.66:0
* Couldn't bind to '167.68.0.66'
* Closing connection #0
~Sagar S
-----Original Message-----
From: Daniel Stenberg [mailto:daniel-curl_at_haxx.se]
Sent: Friday, March 04, 2005 4:59 PM
To: sagar.saibi_at_patni.com; curl tool talk
Cc: 'Anand Singh'
Subject: Re: Specifying a IP address to curl
On Fri, 4 Mar 2005, Sagar Saibi wrote:
> I want to download a web page with a specific IP (167.68.1.66).
You mean you want to fetch from that IP
curl http://167.68.1.66/
or use it as source-IP?
curl --interface 167.68.1.66 [URL]
> Using -p option to specify IP it gives me connection error.
-p enables proxytunnel. How would that help you?
> But if am I using -P option it downloads the web page.
-P enables FTP PORT. I don't see how that helps you either.
> And with the -v3 option it gives me the following log :
-v and -3 are two options.
> About to connect() to webproxy port 80
> Connected to webproxy.int.westgroup.com (163.231.227.49) port 80
>
> How come this is connecting me to a different IP address.
Different than what? Can you show us a full command line?
> Can somebody please confirm whether the -P option is using my specified IP
> address.
It does if you transfer with FTP and the given IP is the one you want the
server to contact you back on. Otherwise it doesn't.
--
Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se
Dedicated custom curl help for hire: http://haxx.se/curl.html
http://www.patni.com
World-Wide Partnerships. World-Class Solutions.
_____________________________________________________________________
This e-mail message may contain proprietary, confidential or legally
privileged information for the sole use of the person or entity to
whom this message was originally addressed. Any review, e-transmission
dissemination or other use of or taking of any action in reliance upon
this information by persons or entities other than the intended
recipient is prohibited. If you have received this e-mail in error
kindly delete this e-mail from your records. If it appears that this
mail has been forwarded to you without proper authority, please notify
us immediately at netadmin_at_patni.com and delete this mail.
_____________________________________________________________________
http://www.patni.com
World-Wide Partnerships. World-Class Solutions.
_____________________________________________________________________
This e-mail message may contain proprietary, confidential or legally
privileged information for the sole use of the person or entity to
whom this message was originally addressed. Any review, e-transmission
dissemination or other use of or taking of any action in reliance upon
this information by persons or entities other than the intended
recipient is prohibited. If you have received this e-mail in error
kindly delete this e-mail from your records. If it appears that this
mail has been forwarded to you without proper authority, please notify
us immediately at netadmin_at_patni.com and delete this mail.
_____________________________________________________________________
Received on 2005-03-04
This message: [ Message body ]
Next message: Daniel Stenberg: "Re: FW: Specifying a IP address to curl"
Previous message: Daniel Stenberg: "Re: Specifying a IP address to curl"
Maybe in reply to: Sagar Saibi: "Specifying a IP address to curl"
Next in thread: Daniel Stenberg: "Re: FW: Specifying a IP address to curl"
Reply: Daniel Stenberg: "Re: FW: Specifying a IP address to curl"
Contemporary messages sorted: [ by date ] [ by thread ] [ by subject ] [ by author ] [ by messages with attachments ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment