1

My server runs on Ubuntu. I can ping my IPv6 address from external sites. When I test my domain name in https://ipv6-test.com/validate.php I get checks for AAAA DNS record, IPv6 DNS server, and IPv6 web server. The check for IPv6 server comes with a note: "cannot identify web server".

My server code:

package main

import (
  "log"
  "net/http"
)

func main() {
  fs := http.FileServer(http.Dir("./html"))
  http.Handle("/", fs)
  err := http.ListenAndServe(":80", nil)
  if err != nil {
    log.Fatal(err)
  }
}

Like in this question Golang IPv6 server, I can load my web page by domain name, by ip address, but not by IPv6 address (http://[2607:f1c0:1801:1b4::1]).

When I run

sudo ss -6lp

I get

Netid State Recv-Q Send-Q Local Address:Port Peer Address:Port tcp LISTEN 0 128 *:http : users:(("go_webserver",pid=131015,fd=5))

me@localhost:~$ sudo netstat -an
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State
tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN
tcp        0      0 127.0.0.53:53           0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN
tcp        0    448 1.2.3.4:22          11.12.13.14:49978      ESTABLISHED
tcp6       0      0 :::10000                :::*                    LISTEN
tcp6       0      0 :::21                   :::*                    LISTEN
tcp6       0      0 :::22                   :::*                    LISTEN

Yevgeniy Gendelman
  • 1,095
  • 1
  • 9
  • 18
  • This might be related to IPv6 link-local address not supported by browsers. Refer https://stackoverflow.com/a/46881540/5821408 – shmsr Dec 17 '20 at 17:27
  • I don't think this is the problem. I changed the server to http.ListenAndServe("[2607:f1c0:1801:1b4::1]:80", and tried to access the page by domain name, and it didn't work – Yevgeniy Gendelman Dec 18 '20 at 13:10

1 Answers1

1

does your client machine where you are trying to access the site from browser have ipv6 support? you can check it with ping6 google.com ?

arun
  • 61
  • 2
  • I think this could be it! ping -6 ipv6.google.com and ping -6 google.com both fail. ipv6 is enabled in networking in control panel and in firewall. 'ipconfig' shows Link-local IPv6 Address. It could be that my problem is described here: https://superuser.com/questions/435471/why-is-ipv6-ping-failing-to-access-google-com . I didn't get it to work yet. – Yevgeniy Gendelman Dec 18 '20 at 13:51
  • 1
    it seems like your ISP(internet service provider) doesn't have ipv6 enabled for your network. One way to get an global unicast ipv6 address is to use a free tunnel broker like https://tunnelbroker.net/. in this case, your machine should have a public ipv4 address for the tunnel broker to reach your machine. – arun Dec 19 '20 at 15:14