I have a VPS with a /64 IPv6 assigned to it. When I try to curl using one of the IPs in the block, this is the error I get:
curl --interface '2a02:c207:2010:1077::2' http://example.com
curl: (45) bind failed with errno 99: Cannot assign requested address
What exactly do I need to do to fix this? Shouldn't I be able to use any IP on the machine when logged in as root?
Basically I just need the ability to curl using any IPv6 assigned to the VPS.
0 in December 2013. curl has had IPv6 support since January 2001.
The basic restrictions for SSH over an IPv4 transport apply to SSH over an IPv6 transport. The use of locally stored usernames and passwords is the only user authentication mechanism supported by SSH over an IPv6 transport. TACACS+ and RADIUS user authentication mechanisms are not supported over an IPv6 transport.
Activity 8 - Ping an Internet Host by IPv6 Address To test IPv6 Internet connectivity: Type ping 2001:4860:4860::8888 and press Enter. Observe the results. If you see replies indicating success, you have IPv6 Internet connectivity.
after some testing, I find the following command works:
$ curl -g -6 'http://[fe80::3ad1:35ff:fe08:cd%eth0]:80/'
interface 'eth0' is the interface with ipv6 enabled, so you may need to replace it with something else.
and just in case, the telnet command to test ipv6:
$ telnet -6 fe80::3ad1:35ff:fe08:cd%eth0 80
From man curl
--interface specify interface e.g. eth0:1
curl --interface eth0 -g -6 'http://[2606:2800:220:1:248:1893:25c8:1946]:80/index.html' -H 'Host: www.example.com'
It feels like you are expecting curl to manipulate your machine's interfaces to add-and-then-use a specific /128 ? If you want that you will probably have to write your own shell wrapper.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With