Skip to content

Commit ad6fefc

Browse files
authored
Merge pull request #7 from SloCompTech/develop
Improved IPv6 support & finalized client mode support
2 parents 00e1d13 + 229d223 commit ad6fefc

File tree

13 files changed

+70
-20
lines changed

13 files changed

+70
-20
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Changelog
22

3+
### 2.0.3 - Improved IPv6 support & finalized client mode support
4+
5+
- Added some IPv6 settings to examples
6+
- Sleep interval on crash
7+
- Outsourced server specific config to `system-server.conf`
8+
- Added parameter `MODE` so you can choose **client** mode instead of server (to not include server specific options)
9+
310
### 2.0.2 - Added multi-instance support
411

512
- Added `TUNNEL_INTERFACE` to set interface name (in case of multiple containers)

CONTRIBUTING.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ Sections:
4242
up # After interface is up
4343
tls-verify # Check certificate
4444
system.conf # System OpenVPN config file (do not edit, unless instructed)
45-
include-conf.conf # File that includes all configuration files (automatically generated)
45+
system-server.conf # System OpenCPN server specific file (do not edit, unless instructed)
46+
system-client.conf # System OpenCPN client specific file (do not edit, unless instructed)
47+
dynamic.conf # File that links all config files together (automatically generated)
4648
pki
4749
ca.crt # CA certificate
4850
certs by serial # Certs by Serial ID

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ services:
6767
|**Parameter**|**Function**|
6868
|:-----------:|:----------:|
6969
|`-e FAIL_MODE=hard`|Restart whole container on error|
70+
|`-e MODE=client`|Set docker mode (valid values: *empty*,server,client; default: server), set to client in case you use container as client|
7071
|`-e PUID=1000`|for UserID - see below for explanation|
7172
|`-e PGID=1000`|for GroupID - see below for explanation|
7273
|`-e PERSISTENT_INTERFACE=true`|Enable persistent TUN interface|
@@ -147,7 +148,14 @@ For more infromation see:
147148

148149
### Client mode
149150

150-
Just put *.ovpn* file in `/config/openvpn/config` and restart container.
151+
1. Run container to get config structure `docker run -it --rm -v PATH:/config slocomptech/openvpn`.
152+
2. Make sure you **don't** have following options specified in your *.ovpn* file
153+
- dev
154+
- user
155+
- group
156+
- anything that is already specified in *system.conf*
157+
3. Put *.ovpn* file in `config/openvpn/config` in your volume.
158+
4. Start conatiner with `-e MODE=client`.
151159

152160
## Troubleshooting
153161

root/defaults/example/config/basic_nat_ipv6/client/client.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
client
1010
dev tun0
1111
proto $PROTO
12+
#proto udp6 # Uncomment this to use IPv6 to connect to server
1213
nobind
1314

1415
# Remote info

root/defaults/example/config/basic_nat_ipv6/config/server.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
# Basic info
99
proto $PROTO
10+
#proto udp6 # Uncomment this so server is accessible over IPv6
1011
port $PORT
1112

1213
# Network info (local VPN network)

root/defaults/example/config/basic_nat_wlp_ipv6/client/client.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
client
1010
dev tun0
1111
proto $PROTO
12+
#proto udp6 # Uncomment this to use IPv6 to connect to server
1213
nobind
1314

1415
# Remote info

root/defaults/example/config/basic_nat_wlp_ipv6/config/server.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
# Basic info
99
proto $PROTO
10+
#proto udp6 # Uncomment this so server is accessible over IPv6
1011
port $PORT
1112

1213
# Network info (local VPN network)

root/defaults/example/config/basic_routed_ipv6/client/client.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
client
1010
dev tun0
1111
proto $PROTO
12+
#proto udp6 # Uncomment this to use IPv6 to connect to server
1213
nobind
1314

1415
# Remote info

root/defaults/example/config/basic_routed_ipv6/config/server.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
# Basic info
99
proto $PROTO
10+
#proto udp6 # Uncomment this so server is accessible over IPv6
1011
port $PORT
1112

1213
# Network info (local VPN network)
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#
2+
# System OpenVPN config file - server specific
3+
#
4+
# @see https://community.openvpn.net/openvpn/wiki/Openvpn24ManPage
5+
#
6+
# DO NOT EDIT THIS FILE, if you are unsure what to do,
7+
# place your config file in openvpn directory
8+
#
9+
10+
# Server hooks
11+
client-connect "/usr/local/bin/run_hooks client-connect"
12+
client-disconnect "/usr/local/bin/run_hooks client-disconnect"
13+
learn-address "/usr/local/bin/run_hooks learn-address"
14+
tls-verify "/usr/local/bin/run_hooks tls-verify"
15+
16+
# Client config directory
17+
client-config-dir /config/openvpn/ccd
18+
19+
# Certificate revocation list
20+
crl-verify /config/pki/crl.pem
21+
22+
#
23+
# For username & password authentication uncomment bellow
24+
#
25+
#auth-user-pass-verify "/app/bin/run_hooks via-env"
26+
27+
# Username & password authentication optional
28+
#--auth-user-pass-optional

0 commit comments

Comments
 (0)