How to specify which IP address to use for curl or wget commands

Useful when you try to send a request from cPanel shell from your Dedicated IP address

For curl you need to use –interface to specify IP address

Example:

curl --interface 11.22.33.44 http://alltime.pp.ua/

For wget you need to use –bind-address to set IP from which you need to send a request

wget --bind-address=192.0.2.116 http://alltime.pp.ua/

Source: man for curl and wget

Similar Posts:

Leave a Reply

Your email address will not be published. Required fields are marked *