From e8eb1dda0c3335905b4e4e1e6694f5f85276f24c Mon Sep 17 00:00:00 2001 From: Sylvain Lamontagne Date: Tue, 20 Sep 2016 12:53:29 -0400 Subject: [PATCH 1/2] Added extra config doc in faqs and fixed an unlikely unbound variable --- bin/ovpn_genconfig | 2 +- docs/faqs.md | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/bin/ovpn_genconfig b/bin/ovpn_genconfig index 8df36d0..ca21514 100755 --- a/bin/ovpn_genconfig +++ b/bin/ovpn_genconfig @@ -226,7 +226,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)://)?([0-9a-zA-Z\.\-]+)(:([0-9]+))?$ ]]; then OVPN_PROTO=${BASH_REMATCH[2]}; OVPN_CN=${BASH_REMATCH[3]}; OVPN_PORT=${BASH_REMATCH[5]}; diff --git a/docs/faqs.md b/docs/faqs.md index 2247075..193943f 100644 --- a/docs/faqs.md +++ b/docs/faqs.md @@ -15,6 +15,11 @@ If it was all in one container, an upgrade would require a few steps to extract ## How do I set up a split tunnel? -Split tunnels are configurations where only some of the traffic from a client goes to the VPN, with the remainder routed through the normal non-VPN interfaces. You'll want to disable a default route (-d) when you generate the configuration, but still use NAT (-N) to keep network address translation enabled. +Split tunnels are configurations where only some of the traffic from a client goes to the VPN, with the remainder routed through the normal non-VPN interfaces. You'll want to disable a default route (-d) when you generate the configuration, but still use NAT (-N) to keep network address translation enabled. ovpn_genconfig -N -d ... + +## I need to add some extra configurations to openvpn.conf, How can I do that ? + +You can pass multiple '-e' options to ovpn_genconfig. For example, if you need to add 'duplicate-cn' and 'topology subnet' to the server configuration you could do something like this: + ovpn_genconfig -e 'duplicate-cn' -e 'topology subnet' -u udp://VPN.SERVERNAME.COM From 3f3a4ea9be97734f8a21a3175fa3f7d3844826c8 Mon Sep 17 00:00:00 2001 From: Sylvain Lamontagne Date: Tue, 20 Sep 2016 13:01:29 -0400 Subject: [PATCH 2/2] Fix Markdown for easier display --- docs/faqs.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/faqs.md b/docs/faqs.md index 193943f..b7df795 100644 --- a/docs/faqs.md +++ b/docs/faqs.md @@ -21,5 +21,6 @@ Split tunnels are configurations where only some of the traffic from a client go ## I need to add some extra configurations to openvpn.conf, How can I do that ? -You can pass multiple '-e' options to ovpn_genconfig. For example, if you need to add 'duplicate-cn' and 'topology subnet' to the server configuration you could do something like this: +You can pass multiple (**-e**) options to `ovpn_genconfig`. For example, if you need to add _'duplicate-cn'_ and _'topology subnet'_ to the server configuration you could do something like this: + ovpn_genconfig -e 'duplicate-cn' -e 'topology subnet' -u udp://VPN.SERVERNAME.COM