When using --interface [local interface] an (numerical) IPv6 address in the URL, curl will bind the local end first to the interface which very well can be IPv4 and then it tries to connect to the IPv6 host. This makes the connect to never connect.
Example:
curl --interface eth1 http://[2a00:1a28:1200:9::2]/ -v
Binding to the correct IP version is tricky as this probably also happens if the URL just resolves to an IPv6 host. We should investigate changing how the local binding is done. At the very least, we should detect the mismatch at run-time and bail out instead of trying to do something that simply never will work.
Reported-by: John Jemiolo
Bug report originally posted here: http://curl.haxx.se/mail/archive-2014-11/0018.html
Patrick Monnerat commited 9081014c2c467 that's supposed to fix this, closing this issue.
Just pushed an update that should fix this issue.
https://github.com/bagder/curl/commit/9081014c2c467077723d5ae1d0081003b3eb3504
Please try. Thanks.