How to specify the IP address on curl?
38,546
You should be able to use
curl --interface zz.zz.zz.zz http://example.com/
Author by
yarek
Updated on July 09, 2022Comments
-
yarek almost 2 years
My server has 5 different external IPs (all working)
I added them by using:
ip addr add xx.xx.xx.xx/32 dev eth0 ip addr add yy.yy.yy.yy/32 dev eth0 ip addr add zz.zz.zz.zz/32 dev eth0
How can I should curl to use either zz.zz.zz.zz IP address ?