I tried a few ways but they seem to be confusing curl.

root@testt:~# curl localhost:8080
<h1>Hello world!</h1>

<p>Boom Bam Splat</p>
root@testt:~# curl ::1:8080
curl: (3) IPv6 numerical address used in URL without brackets
root@testt:~# curl [::1]:8080
curl: (3) [globbing] bad range specification in column 2
  • 1
    I know you have selected an answer, but since there are similarities between the two answers here, can you please clarify which specific command worked for you? Mar 5, 2015 at 7:22
  • 2
    Thanks for giving the answers earlier! I was genuinely hard pressed for which to accept since they were both so concise and whatnot, though I chose the other since that user is just starting out compared to you and answered first. Regardless, just using the - g option was sufficient.
    – hak8or
    Mar 5, 2015 at 7:34

2 Answers 2


Looking at the suggestions — and breakdown of common errors in this blog post — perhaps you should try this.

curl -g -6 "http://[::1]:8080/" 

The -g seems to be the magical key to get this working. As explained on the curl man page:

This option switches off the "URL globbing parser". When you set this option, you can specify URLs that contain the letters {}[] without having them being interpreted by curl itself. Note that these letters are not normal legal URL contents but they should be encoded according to the URI standard.

And the -6 means to use IPv6 only:

If libcurl is capable of resolving an address to multiple IP versions (which it is if it is IPv6-capable), this option tells libcurl to resolve names to IPv6 addresses only.

But reading that functionality description, it seems like -6 is not really needed for a pure IPv6 address; only if one is using curl on a hostname that has an IPv4 and IPv6 address connected to it so it would prefer the IPv6. Just something to note.


From "curl --manual", I found this:

curl -g "http://[2001:1890:1112:1::20]/"


curl "http://[2001:1890:1112:1::20]/"

So, for the address you're asking about, try:

curl -g "http://[::1]:8080/"

However, you may want to run:

curl -V

and see if IPv6 shows up on the line that says "Features" (the third line, not counting extra lines from word wrapping). I found my version didn't. cURL download page has various links for operating systems, including curl 7.41.0 download site (which is currently the latest version) for Microsoft Windows. That page has multiple executables (available for Microsoft Windows); the first one I found did not support IPv6. But the two described as "ipv6-sspi-spnego-winssl" (one for x86 and one for x64) did : curl -V did show IPv6. So be careful about which package you download.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.