In my earlier post (OpenVPN in Ubuntu 14.04) I have gone through the steps to install OpenVPN in Ubuntu; that was only for IPv4. To enable IPv6 in OpenVPN do the followings:
OpenVPN Server IP : 2001:df2:ee00:ee00::10/64
2001:df2:ee00:abcd::/64
has been routed to the OpenVPN server host. That mean users connected via OpenVPN will get one prefix from 2001:df2:ee00:abcd::/64
block.
Step 1: We need to edit OpenVPN configuration file and enable IPv6 tunnel service
vi /etc/openvpn/server.conf
Add the following :
server-ipv6 2001:0df2:ee00:abcd::/64
tun-ipv6
push tun-ipv6
ifconfig-ipv6 2001:0df2:ee00:abcd::1 2001:0df2:ee00:abcd::2
push "route-ipv6 2001:0df2:ee00:ee00::2/64"
push "route-ipv6 2000::/3"
Step 2: Enable IPv6 forwarding:
echo 1 > /proc/sys/net/ipv6/conf/all/forwarding
Step 3: Reload OpenVPN Service
/etc/init.d/openvpn restart
Try connect your OpenVPN client. Test the IPv6 reachablity by accessing http://test-ipv6.com/
Note:
1. To make IPv6 forwarding persistent remember, in /etc/sysctl.conf
uncomment:
net.ipv6.conf.all.forwarding = 1
2. Make sure that you route 2001:df2:ee00:abcd::/64
to you OpenVPN Server. I have done this from my cisco router
ipv6 route 2001:df2:ee00:abcd::/64 2001:df2:ee00:ee00::10