Uso:
curl --interface 23.54.xx.102 'https://api.ipify.org?format=json' {"ip":"23.54.xx.102"}
Da página do manual curl:
--interface <name> Perform an operation using a specified interface. You can enter interface name, IP address or host name. An example could look like: curl --interface eth0:1 http://www.netscape.com/ If this option is used several times, the last one will be used.