0

I've mounted an EC2 instance based on Ubuntu LTS 16.4.

Instance is in a VPC and has IPv4 and IPv6 assigned. Security group allows output towards any IP address for IPv4 and v6 on port 22. (Same security group as other instances working fine with IPv6)

However, when I try to connect to BitBucket, IPv6 connection fails and only IPv4 works:

ssh -vvv -T git@bitbucket.org

OpenSSH_7.6p1 Ubuntu-4ubuntu0.3, OpenSSL 1.0.2n 7 Dec 2017

debug1: Reading configuration data /etc/ssh/ssh_config

debug1: /etc/ssh/ssh_config line 19: Applying options for *

debug2: resolving "bitbucket.org" port 22

debug2: ssh_connect_direct: needpriv 0

debug1: Connecting to bitbucket.org [2406:da00:ff00::22c2:513] port 22.

debug2: fd 3 setting O_NONBLOCK

debug1: connect to address 2406:da00:ff00::22c2:513 port 22: Connection timed out

debug1: Connecting to bitbucket.org [2406:da00:ff00::22c5:2ef4] port 22.

debug1: connect to address 2406:da00:ff00::22c5:2ef4 port 22: Connection timed out

debug1: Connecting to bitbucket.org [2406:da00:ff00::6b17:d1f5] port 22.

debug1: connect to address 2406:da00:ff00::6b17:d1f5 port 22: Connection timed out

debug1: Connecting to bitbucket.org [18.205.93.1] port 22.

debug1: Connection established.

As you can see, only IPv4 works.

I've triple-checked AWS config, but since it's the same as I use for others EC2 which works perfectly fine with Bitbucket in IPv6 mode, I think there is «something» wrong in my Ubuntu/network config.

Any idea where I can look ?

  • 1
    Check if you have a default v6 route in your VPC to the IGW (::/0) – ColtonCat Mar 20 at 17:16
  • Lack of route would probably result in different error, not a "connection timed out". It looks like you have a firewall somewhere along the way which filters out these IPv6 connections, blackhole route somewhere along the path or misconfigured router which doesn't respond with appropriate icmpv6 message. Can you ping and traceroute these IPv6 addresses? – Tomek Mar 23 at 11:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.