From 1d2a2e8b2929d3aa3f410aedcb8ce0561b166622 Mon Sep 17 00:00:00 2001 From: Tilo Spannagel Date: Fri, 3 Feb 2017 20:34:09 +0100 Subject: [PATCH 1/3] Added IPv6 support Signed-off-by: Tilo Spannagel --- bin/ovpn_genconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/ovpn_genconfig b/bin/ovpn_genconfig index 013e871..9a8443f 100755 --- a/bin/ovpn_genconfig +++ b/bin/ovpn_genconfig @@ -238,7 +238,7 @@ done [ ${#TMP_DNS_SERVERS[@]} -gt 0 ] && OVPN_DNS_SERVERS=("${TMP_DNS_SERVERS[@]}") # Server name is in the form "udp://vpn.example.com:1194" -if [[ "${OVPN_SERVER_URL:-}" =~ ^((udp|tcp)://)?([0-9a-zA-Z\.\-]+)(:([0-9]+))?$ ]]; then +if [[ "${OVPN_SERVER_URL:-}" =~ ^((udp|tcp|udp6|tcp6)://)?([0-9a-zA-Z\.\-]+)(:([0-9]+))?$ ]]; then OVPN_PROTO=${BASH_REMATCH[2]}; OVPN_CN=${BASH_REMATCH[3]}; OVPN_PORT=${BASH_REMATCH[5]}; From abdf537da5cf5153fd6a10afa01d7ef97751b9df Mon Sep 17 00:00:00 2001 From: Tilo Spannagel Date: Fri, 3 Feb 2017 21:15:41 +0100 Subject: [PATCH 2/3] Added IPv6 support to client script Signed-off-by: Tilo Spannagel --- bin/ovpn_getclient | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/bin/ovpn_getclient b/bin/ovpn_getclient index d2674da..f57686b 100755 --- a/bin/ovpn_getclient +++ b/bin/ovpn_getclient @@ -37,8 +37,15 @@ nobind dev $OVPN_DEVICE key-direction 1 remote-cert-tls server -remote $OVPN_CN $OVPN_PORT $OVPN_PROTO -$OVPN_ADDITIONAL_CLIENT_CONFIG + +remote $OVPN_CN $OVPN_PORT $OVPN_PROTO" + if [ "$OVPN_PROTO" == "udp6" ]; then + echo "remote $OVPN_CN $OVPN_PORT udp" + fi + if [ "$OVPN_PROTO" == "tcp6" ]; then + echo "remote $OVPN_CN $OVPN_PORT tcp" + fi + echo "$OVPN_ADDITIONAL_CLIENT_CONFIG " if [ "$mode" == "combined" ]; then echo " From 26635395b295e4def597ed39db5b740986b62642 Mon Sep 17 00:00:00 2001 From: Tilo Spannagel Date: Wed, 8 Feb 2017 16:20:31 +0100 Subject: [PATCH 3/3] README: Connect to the OpenVPN Server Over IPv6 --- docs/ipv6.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/ipv6.md b/docs/ipv6.md index ff2af45..00ddcb9 100644 --- a/docs/ipv6.md +++ b/docs/ipv6.md @@ -91,4 +91,11 @@ Fire up a web browser and attempt to navigate to [https://ipv6.google.com](https ## Connect to the OpenVPN Server Over IPv6 -Not implemented, yet. +This feature requires a docker daemon with working IPv6 support. + +This will allow connections over IPv4 and IPv6. + +Generate server configuration with the udp6 or tcp6 protocol: + + docker run -v $OVPN_DATA:/etc/openvpn --rm kylemanna/openvpn ovpn_genconfig -u udp6://VPN.SERVERNAME.COM + docker run -v $OVPN_DATA:/etc/openvpn --rm kylemanna/openvpn ovpn_genconfig -u tcp6://VPN.SERVERNAME.COM