Problem with nginx and ipv6

Posted June 21, 2016 6.7k views


I’ve followed the tutorial to enable ipv6 for an existing droplet. I’ve also added the following lines in the config file:

listen [::]:80;

listen [::]:443 ssl;

listen [::]:443;

When I execute netstat it seems that nginx is listening:
sudo netstat -tulpan | grep nginx
tcp 0 0* LISTEN 2321/nginx

tcp 0 0* LISTEN 2321/nginx

tcp6 0 0 :::443 :::* LISTEN 2321/nginx

tcp6 0 0 :::80 :::* LISTEN 2321/nginx

However, if I do a web site test reachability, I obtain this:

AAAA DNS record 2001:8d8:1000:80fd:ad4e:243c:5161:1818
IPv6 web server web server is unreachable : Connection timed out
IPv6 DNS server

Could anybody help me?? I don’t know what I’ve done wrong.

Thanks in advance.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
2 answers

Hai, have you resolved this issue? the /etc/systemctl.conf file has the value net.ipv6.bindv6only=1 , but still it failed to reach. I guess something with the nginx compilation that doesn’t support ipv6

Please, check if you have turned on your bindv6only:

$ sysctl -a | grep bindv6only # check if it's 0 then
$ vim /etc/sysctl.conf (editing to provide the content "net.ipv6.bindv6only = 1")
$ sysctl -p