Access EC2 instance via ipv6

0

My AWS ec2 instance is accessible via ipv4, but I want to replace it by ipv6. I followed the instructions under https://4sysops.com/archives/assign-an-ipv6-address-to-an-ec2-instance-dual-stack/ to configure ipv6, but it is not working: via ping6 <ipv6>, it says the network is not accessible, same when I enter [<ipv6>] in the browser. When I open the ipv4 address in the browser, it works. Any idea why I can't access the instance via ipv6?

My configuration on AWS:

CIDR associated to VPC: Enter image description here Enter image description here

CIDR is also associated to subnet: Enter image description here

Routing table of VPC: Enter image description here

Inbound security rules: Enter image description here

Instance has an ipv6: Enter image description here

On the instance itself, there is a nginx server which redirects requests to a shiny webserver (https://posit.co/download/shiny-server/). The nginx configuration looks like this: Enter image description here

tadaki
asked 20 days ago128 views
1 Answer
2
Accepted Answer

Hello.

Do you have Nginx configured to listen to IPv6?
https://nginx.org/en/docs/http/ngx_http_core_module.html#listen

For example, if you add "listen [::]:80;" as shown below, port 80 will be able to listen on IPv6.

server {
    listen [::]:80;
    listen 80;
    server_name example.com;
    # example setting
}

Also, does the ISP you use support IPv6?
If your ISP does not support IPv6, you will not be able to access it even if you have attached IPv6 on EC2.

profile picture
EXPERT
answered 20 days ago
profile picture
EXPERT
reviewed 20 days ago
profile picture
EXPERT
reviewed 20 days ago
  • That was the missing part, thank you :)

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions