# IPv6 connection between Amazon EC2 Instance



## imrozx (Jun 17, 2013)

Hi all, I try to set up _an_ IPv6 tunnel broker in _an_ Amazon EC2 instance. Normally I can do it by configuring the tunnel broker for each of the instance*s* and this works perfectly. But the problem is, I have more than ten instance*s* that need to be configured with _an_ IPv6 tunnel. HE only provide*s* five tunnel*s* per account. And for FreeNet6 using the anonymous tunnel broker will cause the IP to change if I turn off the instance.

So I try to configure router advertisement (RTADVD). *T*he problem is it seems that Amazon EC2 does not support IPv6 network*s* in their virtual network although all my instance*s* are able to communicate perfectly using IPv4. I did a link-local ping test and nothing works. I got a_n_ idea where I tunnel each of the instance*s* to the master IPv6 which act*s* as a gateway through the HE tunnel. Well its works perfectly.

A hiccup I encountered is that I have to keep ping_ing_ each of the instance*s* from the gateway so that the tunnel*s* will stay alive. *T*his is not a problem for me. The problem arise*s* when I try to set up multiple tunnel*s* to each of the instance*s*. I need to configure each of the tunnel interface*s* for a gateway with an IPv6 addresses and this lead*s* to multiple IPv6 address*es* that arrive at the same host (my gateway). *B*elow are my configuration*s*. I hope someone who is knowledgeable is willing to help me. Thanks.

IPv6 tunnel gateway configuration. (FreeBSD) 


```
ifconfig gif1 create
ifconfig gif1 tunnel 10.0.0.103 10.0.0.101
ifconfig gif1 inet6 2001:470:36:add::1 2001:470:36:add::2 prefixlen 128
ifconfig gif1 up

ifconfig gif2 create
ifconfig gif2 tunnel 10.0.0.103 10.0.0.102
ifconfig gif2 inet6 2001:470:36:add::1:1 2001:470:36:add::3 prefixlen 128
ifconfig gif2 up
```

*T*his will go on till until gif20 so I have 21 IPv6 address*es* pointing to my gateway. I hope someone can help me fix this. Thank you.


----------

