By roshanbaliga
Hi, I recently turned on IPv6 addresses on one of our droplets hosted in Bangalore. I added a new AAAA entry for this IPv6 address, in addition to the A entry. I now have 2 entries (addresses are obscured here): A Record: @ 139.59.XX.YY 600 seconds AAAA record: @ 2400:6180:100:WW::XXX:YYYY 1 Hour
While I am able to load the website on my browser using https (or http which gets redirected to https), I get a webserver unreachable when I test IPv6 connectivity using http://ipv6-test.com/validate.php
Here are some commands I ran on the server to debug the issue, but I couldn’t find anything wrong:
sudo netstat -tulpan | grep nginx tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN 2705/nginx -g daemo tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 2705/nginx -g daemo tcp6 0 0 :::443 :::* LISTEN 2705/nginx -g daemo tcp6 0 0 :::80 :::* LISTEN 2705/nginx -g daemo
ufw status Status: inactive
sudo sysctl -a | grep bindv6only (I explicitly set this to 1 ) net.ipv6.bindv6only = 1 sysctl: reading key “net.ipv6.conf.all.stable_secret” sysctl: reading key “net.ipv6.conf.default.stable_secret” sysctl: reading key “net.ipv6.conf.eth0.stable_secret” sysctl: reading key “net.ipv6.conf.eth1.stable_secret” sysctl: reading key “net.ipv6.conf.lo.stable_secret” sysctl: reading key “net.ipv6.conf.lxdbr0.stable_secret”
This is my nginx config (/etc/nginx/sites-enabled/default)
server { listen 80; listen [::]:80 ipv6only=on; server_name example.com www.example.com; rewrite ^(.*) https://example.com$1 permanent; }
server { listen 443 ssl; listen [::]:443 ipv6only=on; server_name example.com;
ssl_certificate example.com.pem; ssl_certificate_key example.com.key;
: : : }
Am I missing something here?
Best, Roshan
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Thank you very much @jtittle, with your instructions. Which I judiciously followed I was able to resolve this issue. I wish I could give you more than 1 like on this Q&A thread. :D. I knew I made the right decision choosing DO!!
First off great job @jtittle, I really appreciate your consistency and care at handling this issue for @roshanbaliga .
I am currently facing the same issue. So I’ve gone through the tutorial on https://www.digitalocean.com/community/tutorials/how-to-enable-ipv6-for-digitalocean-droplets#enabling-ipv6-on-an-existing-droplet
But I’m stuck here where I have to sudo nano /etc/network/interfacesand add a section for my ipv6 address. Instead I get this file:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# Source interfaces
# Please check /etc/network/interfaces.d before changing this file
# as interfaces may have been defined in /etc/network/interfaces.d
# See LP: #1262951
source /etc/network/interfaces.d/*.cfg
I have gone through installing nginx and letsencrypt.
here is my nginx server settings:
server {
listen 80 ;
listen [::]:80 ;
listen 443 ssl http2 ;
listen [::]:443 ssl http2 ;
root /var/www/example.com/html;
server_name example.com www.example.com;
include snippets/ssl-example.com.conf;
include snippets/ssl-params.conf;
location ~ /.well-known {
allow all;
}
}
Thanks in advance.
The only other issue that I can think of would be that NGINX may not be compiled with IPv6 support. Whether or not this is the case depends on the version of NGINX you’re running. The latest versions don’t require the compile option --with-ipv6, however, prior to the newer releases, older version of NGINX did.
You can check the compile options by running the following command from the CLI:
nginx -V
Which will detail every option that NGINX was compiled with for your build. If your version is 1.10.x or 1.11.x, you don’t need that compile option as it’s deprecated. If you’re build is older and it doesn’t show up when running the above, then your build of NGINX may not support IPv6 connections and that’d be why you’re unable to verify it.
The downside is that if you are running an older version and there’s not a newer version in the repo, then the best option is doing a source compile where you’ll have to define each option that NGINX should be compile with.
If that’s the route needed, I can help you there. I actually have a copy & paste solution to help with that, but before doing something like that, you’d need to backup any data in /etc/nginx that you don’t want destroyed (i.e. server block files for your website(s)) as we’d be deleting everything there and starting from scratch.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.