1

I entered the container and check which server are there.

$netstat -an|grep LISTEN

tcp6       0      0 :::9000                 :::*                    LISTEN 

then I try to connect

$curl http://127.0.0.1:9000
curl: (56) Recv failure: Connection reset by peer

 mmmm, tcp6 is ipv6? am I correct?? and how can I access to this?


I understood this is the ipv6 address. So I am trying to do like these below but invain.

$curl -g -6 'http://[::9000]/'
curl: (7) Couldn't connect to server

$curl -g 'http://[::9000]/'
curl: (7) Couldn't connect to server
whitebear
  • 11,200
  • 24
  • 114
  • 237
  • Duplicated with https://stackoverflow.com/questions/41843247/how-to-curl-using-ipv6-address – shawn May 26 '22 at 14:29
  • First, [yes it's listening on ipv6](https://unix.stackexchange.com/questions/120543/tcp6-in-the-output-netstat). Secondly "ipv6 localhost" came up with this useful link: https://stackoverflow.com/questions/40189084/what-is-ipv6-for-localhost-and-0-0-0-0 – msanford May 26 '22 at 14:29
  • Thank you I understood it is `IPv6`. `curl -g 'http://[::9000]/'` returns `curl: (7) Couldn't connect to server` does it correct `curl` command? – whitebear May 26 '22 at 15:38
  • Does this answer your question? [How to curl using IPv6 address?](https://stackoverflow.com/questions/41843247/how-to-curl-using-ipv6-address) – Luuk May 26 '22 at 15:51

0 Answers0