Merge pull request #215 from tilosp-docker/dev
Connect to the OpenVPN Server over IPv6
This commit is contained in:
commit
7627f8e9f9
@ -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]};
|
||||
|
@ -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 "
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user