# \[SOLVED\] Openvpn and IPV6

**URL:** <https://discuss.freedombox.org/t/solved-openvpn-and-ipv6/430>\
**Category:** Support\
**Created:** [October 10, 2019, 2:03pm UTC](https://discuss.freedombox.org/t/solved-openvpn-and-ipv6/430 "2019-10-10T14:03:15Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![koolok](https://discuss.freedombox.org/letter_avatar_proxy/v4/letter/k/c57346/32.png) [@koolok](https://discuss.freedombox.org/u/koolok)\
**Post date:** [October 10, 2019, 2:03pm UTC](https://discuss.freedombox.org/t/solved-openvpn-and-ipv6/430/1 "2019-10-10T14:03:15Z")

</div>

Hello,

I installed Openvpn and it works well thought IPV4.  
But I’m not able to make the connection if I’m on an IPV6 network.

Does anyone get this issue ?

---

<div class="post-metadata">

**Author:** ![hex-m](https://discuss.freedombox.org/letter_avatar_proxy/v4/letter/h/9de053/32.png) [@hex-m](https://discuss.freedombox.org/u/hex-m)\
**Post date:** [October 11, 2019, 3:14pm UTC](https://discuss.freedombox.org/t/solved-openvpn-and-ipv6/430/2 "2019-10-11T15:14:21Z")

</div>

It would help to have more information. I assume you want to connect with a GNU/Linux client from outside your home network to your FreedomBox, which is connected to your home router. I also assume the home router is NATing.

1. Can you `ping6` the IPv6 address of your router form outside? (don’t use the hostname to make sure it’s not a DNS problem)
2. Can you reach the port that you forwarded on your router? (e.g. `nc -vz <host> <port>`)
3. Does that connection reach your FreedomBox? (e.g. `tcpdump`)
4. What does the OpenVPN log on both machines say? (`journalctl -u NetworkManager`)

Regards,  
Hex

---

<div class="post-metadata">

**Author:** ![Sunil](https://discuss.freedombox.org/user_avatar/discuss.freedombox.org/sunil/32/8_2.png) [@Sunil](https://discuss.freedombox.org/u/Sunil)\
**Post date:** [October 14, 2019, 11:34pm UTC](https://discuss.freedombox.org/t/solved-openvpn-and-ipv6/430/3 "2019-10-14T23:34:32Z")

</div>

I have never tested OpenVPN over IPv6 properly. When I checked, it seems like OpenVPN with FreedomBox configuration is only listening on 0.0.0.0:1194 (not listening on IPv6 addresses). When I added the list `proto udp6` line to `/etc/openvpn/server/freedombox.conf` it started listening on `*:1194` this time and this should make connecting from IPv6 addresses possible.

@koolok, please try doing this. If this works, it is good opportunity for us to add proper IPv6 support in OpenVPN.

---

<div class="post-metadata">

**Author:** ![koolok](https://discuss.freedombox.org/letter_avatar_proxy/v4/letter/k/c57346/32.png) [@koolok](https://discuss.freedombox.org/u/koolok)\
**Post date:** [October 15, 2019, 9:13pm UTC](https://discuss.freedombox.org/t/solved-openvpn-and-ipv6/430/4 "2019-10-15T21:13:10Z")

</div>

Thanks @hex-m and @Sunil for your help.

I did what @Sunil propose and it worked perfectly !

---

<div class="post-metadata">

**Author:** ![haidar](https://discuss.freedombox.org/letter_avatar_proxy/v4/letter/h/96bed5/32.png) [@haidar](https://discuss.freedombox.org/u/haidar)\
**Post date:** [October 16, 2019, 6:22pm UTC](https://discuss.freedombox.org/t/solved-openvpn-and-ipv6/430/5 "2019-10-16T18:22:59Z")

</div>

I will mark this issue as solved.

---

<div class="post-metadata">

**Author:** ![dgj](https://discuss.freedombox.org/letter_avatar_proxy/v4/letter/d/7c8e57/32.png) [@dgj](https://discuss.freedombox.org/u/dgj)\
**Post date:** [November 14, 2019, 3:44pm UTC](https://discuss.freedombox.org/t/solved-openvpn-and-ipv6/430/6 "2019-11-14T15:44:49Z")

</div>

Sorry to revive an old thread.

I have done the above and from my home network I can connect to the openvpn server. However, when on another network I cannot. I assume I need to open the appropriate port on my modem/router.

- The router’s port forwarding interface asks for the local IP address. Is this one of the IPv6 addresses I find in Plinth under Network \> “Freedombox WAN” (which is in the external firewall zone)? Which one (the longer or shorter one)?

- Is the port 1194 (as for IPv4)?

Thanks!

---

<div class="post-metadata">

**Author:** ![Sunil](https://discuss.freedombox.org/user_avatar/discuss.freedombox.org/sunil/32/8_2.png) [@Sunil](https://discuss.freedombox.org/u/Sunil)\
**Post date:** [November 14, 2019, 4:42pm UTC](https://discuss.freedombox.org/t/solved-openvpn-and-ipv6/430/7 "2019-11-14T16:42:07Z")

</div>

> [@dgj](#):
>
> - The router’s port forwarding interface asks for the local IP address. Is this one of the IPv6 addresses I find in Plinth under Network \> “Freedombox WAN” (which is in the external firewall zone)? Which one (the longer or shorter one)?
> - Is the port 1194 (as for IPv4)?

You need ask your router to forward port 1194 with protocol UDP to your FreedomBox IPv4 address that looks like x.x.x.x. Make sure that FreedomBox’s IP address is static one (that is router gives it the same IP address every time). This can be done by ‘allocating’ the IP address to FreedomBox. Most router allows this. This should set you up for IPv4.

IPv6 if done right, you won’t need port forwarding because router don’t do NAT on them and give you a global IPv6 address that you can use from outside. Also, I don’t believe typically routers implement port forwarding for IPv6. If yours does, you can also setup port forwarding for that with long IP address.

---

<div class="post-metadata">

**Author:** ![dgj](https://discuss.freedombox.org/letter_avatar_proxy/v4/letter/d/7c8e57/32.png) [@dgj](https://discuss.freedombox.org/u/dgj)\
**Post date:** [November 14, 2019, 5:00pm UTC](https://discuss.freedombox.org/t/solved-openvpn-and-ipv6/430/8 "2019-11-14T17:00:11Z")

</div>

Thanks @Sunil. Some more detailed information:

- On the server I replaced `proto udp` with `proto udp6` in `/etc/openvpn/server/freedombox.conf`, then rebooted.

- On the client I added the long IPv6 address and changed `proto udp` to `proto udp6` to the `profile.ovpn` file. It now looks like:

> …  
> remote XXXX:XXXX:XXXX:XXXX:XXXX:XXX:XXX:XXXX 1194  
> proto udp6  
> …

When I run `sudo openvpn --configure profile.ovpn` I get the following information:

> Thu Nov 14 17:52:44 2019 OpenVPN 2.4.7 x86\_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] built on Feb 20 2019  
> Thu Nov 14 17:52:44 2019 library versions: OpenSSL 1.1.1d 10 Sep 2019, LZO 2.10  
> Thu Nov 14 17:52:44 2019 TCP/UDP: Preserving recently used remote address: [AF\_INET6]XXXX:XXXX:XXXX:XXXX:XXXX:XXX:XXX:XXXX:1194  
> Thu Nov 14 17:52:44 2019 Socket Buffers: R=[212992-\>212992] S=[212992-\>212992]  
> Thu Nov 14 17:52:44 2019 UDPv6 link local: (not bound)  
> Thu Nov 14 17:52:44 2019 UDPv6 link remote: [AF\_INET6]XXXX:XXXX:XXXX:XXXX:XXXX:XXX:XXX:XXXX:1194  
> Thu Nov 14 17:52:44 2019 write UDPv6: Network is unreachable (code=101)  
> Thu Nov 14 17:52:44 2019 Network unreachable, restarting  
> Thu Nov 14 17:52:44 2019 SIGUSR1[soft,network-unreachable] received, process restarting  
> Thu Nov 14 17:52:44 2019 Restart pause, 5 second(s)

Note I can connect to my Freedombox via the browser by typing the following in the URL panel: `https://[XXXX:XXXX:XXXX:XXXX:XXXX:XXX:XXX:XXXX]` (i.e., using the long IPv6 address found in `Plinth > System > Networks`).

Any suggestions?
