Curl requests by binding to different IP address

From time to time I need to use Curl to test websites and sometimes I need to make the request come from a different IP address, other than the server’s default IP.  Note, the IP address you use must be active on your server.  To do this, use the following syntax:

curl --interface xxx.xxx.xxx.xxx -s http://www.sysadminvalley.com

Make sure that you substitute xxx.xxx.xxx.xxx with the IP address you want to use.

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.


Switch to our mobile site