Skip to content

Commit bf9f58f

Browse files
committed
Reverted Github flavored markdown Shell syntax highlighting.
Sorry again for the inconvenience.
1 parent 2d16231 commit bf9f58f

8 files changed

+31
-71
lines changed

README.md

+8-22
Original file line numberDiff line numberDiff line change
@@ -18,48 +18,34 @@ a corresponding [Digital Ocean Community Tutorial](http://bit.ly/1AGUZkq).
1818

1919
* Create the `$OVPN_DATA` volume container, i.e. `OVPN_DATA="ovpn-data"`
2020

21-
```Shell
22-
docker run --name $OVPN_DATA -v /etc/openvpn busybox
23-
```
21+
docker run --name $OVPN_DATA -v /etc/openvpn busybox
2422

2523
* Initialize the `$OVPN_DATA` container that will hold the configuration files and certificates
2624

27-
```Shell
28-
docker run --volumes-from $OVPN_DATA --rm kylemanna/openvpn ovpn_genconfig -u udp://VPN.SERVERNAME.COM
29-
docker run --volumes-from $OVPN_DATA --rm -it kylemanna/openvpn ovpn_initpki
30-
```
25+
docker run --volumes-from $OVPN_DATA --rm kylemanna/openvpn ovpn_genconfig -u udp://VPN.SERVERNAME.COM
26+
docker run --volumes-from $OVPN_DATA --rm -it kylemanna/openvpn ovpn_initpki
3127

3228
* Start OpenVPN server process
3329

3430
- On Docker [version 1.2](http://blog.docker.com/2014/08/announcing-docker-1-2-0/) and newer
3531

36-
```Shell
37-
docker run --volumes-from $OVPN_DATA -d -p 1194:1194/udp --cap-add=NET_ADMIN kylemanna/openvpn
38-
```
32+
docker run --volumes-from $OVPN_DATA -d -p 1194:1194/udp --cap-add=NET_ADMIN kylemanna/openvpn
3933

4034
- On Docker older than version 1.2
4135

42-
```Shell
43-
docker run --volumes-from $OVPN_DATA -d -p 1194:1194/udp --privileged kylemanna/openvpn
44-
```
36+
docker run --volumes-from $OVPN_DATA -d -p 1194:1194/udp --privileged kylemanna/openvpn
4537

4638
* Generate a client certificate without a passphrase
4739

48-
```Shell
49-
docker run --volumes-from $OVPN_DATA --rm -it kylemanna/openvpn easyrsa build-client-full CLIENTNAME nopass
50-
```
40+
docker run --volumes-from $OVPN_DATA --rm -it kylemanna/openvpn easyrsa build-client-full CLIENTNAME nopass
5141

5242
* Retrieve the client configuration with embedded certificates
5343

54-
```Shell
55-
docker run --volumes-from $OVPN_DATA --rm kylemanna/openvpn ovpn_getclient CLIENTNAME > CLIENTNAME.ovpn
56-
```
44+
docker run --volumes-from $OVPN_DATA --rm kylemanna/openvpn ovpn_getclient CLIENTNAME > CLIENTNAME.ovpn
5745

5846
* Create an environment variable with the name DEBUG and value of 1 to enable debug output (using "docker -e").
5947

60-
```Shell
61-
docker run --volumes-from $OVPN_DATA -d -p 1194:1194/udp --privileged -e DEBUG=1 kylemanna/openvpn
62-
```
48+
docker run --volumes-from $OVPN_DATA -d -p 1194:1194/udp --privileged -e DEBUG=1 kylemanna/openvpn
6349

6450
## How Does It Work?
6551

docs/advanced.md

+8-12
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,14 @@ The [`ovpn_genconfig`](/bin/ovpn_genconfig) script is intended for simple config
77
* Refer to the Quick Start document, and substitute `--volumes-from $OVPN_DATA` with `-v /path/on/host/openvpn0:/etc/openvpn`
88
* Quick example that is likely to be out of date, but here's how to get started:
99

10-
```Shell
11-
mkdir openvpn0
12-
cd openvpn0
13-
docker run --rm -v $PWD:/etc/openvpn kylemanna/openvpn ovpn_genconfig -u udp://VPN.SERVERNAME.COM:1194
14-
docker run --rm -v $PWD:/etc/openvpn -it kylemanna/openvpn ovpn_initpki
15-
vim openvpn.conf
16-
docker run --rm -v $PWD:/etc/openvpn -it kylemanna/openvpn easyrsa build-client-full CLIENTNAME nopass
17-
docker run --rm -v $PWD:/etc/openvpn kylemanna/openvpn ovpn_getclient CLIENTNAME > CLIENTNAME.ovpn
18-
```
10+
mkdir openvpn0
11+
cd openvpn0
12+
docker run --rm -v $PWD:/etc/openvpn kylemanna/openvpn ovpn_genconfig -u udp://VPN.SERVERNAME.COM:1194
13+
docker run --rm -v $PWD:/etc/openvpn -it kylemanna/openvpn ovpn_initpki
14+
vim openvpn.conf
15+
docker run --rm -v $PWD:/etc/openvpn -it kylemanna/openvpn easyrsa build-client-full CLIENTNAME nopass
16+
docker run --rm -v $PWD:/etc/openvpn kylemanna/openvpn ovpn_getclient CLIENTNAME > CLIENTNAME.ovpn
1917

2018
* Start the server with:
2119

22-
```Shell
23-
docker run -v $PWD:/etc/openvpn -d -p 1194:1194/udp --privileged kylemanna/openvpn
24-
```
20+
docker run -v $PWD:/etc/openvpn -d -p 1194:1194/udp --privileged kylemanna/openvpn

docs/backup.md

+2-6
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,10 @@ I'd recommend encrypting the archive with something strong (e.g. gpg or openssl
1111

1212
## Backup to Archive
1313

14-
```Shell
15-
docker run --volumes-from $OVPN_DATA --rm busybox tar -cvf - -C /etc openvpn | xz > openvpn-backup.tar.xz
16-
```
14+
docker run --volumes-from $OVPN_DATA --rm busybox tar -cvf - -C /etc openvpn | xz > openvpn-backup.tar.xz
1715

1816
## Restore to New Container
1917

2018
Assumes an existing container named `$OVPN_DATA` to extract the data over the top.
2119

22-
```Shell
23-
xzcat openvpn-backup.tar.xz | docker run --name $OVPN_DATA -v /etc/openvpn -i busybox tar -xvf - -C /etc
24-
```
20+
xzcat openvpn-backup.tar.xz | docker run --name $OVPN_DATA -v /etc/openvpn -i busybox tar -xvf - -C /etc

docs/clients.md

+3-7
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@ If you have more than a few clients, you will want to generate and update your c
1515

1616
Execute the following to generate the configuration for all clients:
1717

18-
```Shell
19-
docker run --rm -it --volumes-from $OVPN_DATA --volume /tmp/openvpn_clients:/etc/openvpn/clients kylemanna/openvpn ovpn_getclient_all
20-
```
18+
docker run --rm -it --volumes-from $OVPN_DATA --volume /tmp/openvpn_clients:/etc/openvpn/clients kylemanna/openvpn ovpn_getclient_all
2119

2220
After doing so, you will find the following files in each of the `$cn` directories:
2321

@@ -32,9 +30,7 @@ After doing so, you will find the following files in each of the `$cn` directori
3230

3331
Revoke `client1`'s certificate and generate the certificate revocation list (CRL):
3432

35-
```Shell
36-
docker run --rm -it --volumes-from $OVPN_DATA kylemanna/openvpn easyrsa revoke client1
37-
docker run --rm -it --volumes-from $OVPN_DATA kylemanna/openvpn easyrsa gen-crl
38-
```
33+
docker run --rm -it --volumes-from $OVPN_DATA kylemanna/openvpn easyrsa revoke client1
34+
docker run --rm -it --volumes-from $OVPN_DATA kylemanna/openvpn easyrsa gen-crl
3935

4036
The OpenVPN server will read this change every time a client connects (no need to restart server) and deny clients access using revoked certificates.

docs/debug.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@ Random things I do to debug the containers.
77
* Create a shell in the running docker container (aka namespace) with [nsenter](https://github.com/jpetazzo/nsenter)
88
* If you don't have nsenter/docker-enter, you can mount the data container and modify it with
99

10-
```Shell
11-
docker run --rm -it --volumes-from $OVPN_DATA kylemanna/openvpn bash -l
12-
```
10+
docker run --rm -it --volumes-from $OVPN_DATA kylemanna/openvpn bash -l
1311

1412
## Stream OpenVPN Logs
1513

docs/docker.md

+2-6
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,11 @@ After **re-logging in** verify the group membership using the id command. The ex
4141

4242
Run a Debian jessie docker container:
4343

44-
```Shell
45-
docker run --rm -it debian:jessie bash -l
46-
```
44+
docker run --rm -it debian:jessie bash -l
4745

4846
Once inside the container you'll see the `root@<container id>:/#` prompt signifying that the current shell is in a Docker container. To confirm that it's different from the host, check the version of Debian running in the container:
4947

50-
```Shell
51-
cat /etc/issue.net
52-
```
48+
cat /etc/issue.net
5349

5450
Expected result:
5551

docs/paranoid.md

+3-5
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,8 @@ As mentioned in the [backup section](/docs/backup.md), there are good reasons to
44

55
Execute the following commands. Note that you might want to change the volume `$PWD` or use a data docker container for this.
66

7-
```Shell
8-
docker run --rm -t -i -v $PWD:/etc/openvpn kylemanna/openvpn ovpn_genconfig -u udp://VPN.SERVERNAME.COM
9-
docker run --rm -t -i -v $PWD:/etc/openvpn kylemanna/openvpn ovpn_initpki
10-
docker run --rm -t -i -v $PWD:/etc/openvpn kylemanna/openvpn ovpn_copy_server_files
11-
```
7+
docker run --rm -t -i -v $PWD:/etc/openvpn kylemanna/openvpn ovpn_genconfig -u udp://VPN.SERVERNAME.COM
8+
docker run --rm -t -i -v $PWD:/etc/openvpn kylemanna/openvpn ovpn_initpki
9+
docker run --rm -t -i -v $PWD:/etc/openvpn kylemanna/openvpn ovpn_copy_server_files
1210

1311
The [`ovpn_copy_server_files`](/bin/ovpn_copy_server_files) script puts all the needed configuration in a subdirectory which defaults to `$OPENVPN/server`. All you need to do now is to copy this directory to the server and you are good to go.

docs/static-ips.md

+4-10
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,19 @@ The docker image is setup for static client configuration on the 192.168.254.0/2
66

77
1. Create a client specific configuration:
88

9-
```Shell
10-
echo "ifconfig-push 192.168.254.1 192.168.254.2" | docker run --volumes-from $OVPN_DATA -i --rm kylemanna/openvpn tee /etc/openvpn/ccd/CERT_COMMON_NAME
11-
ifconfig-push 192.168.254.1 192.168.254.2
12-
```
9+
$ echo "ifconfig-push 192.168.254.1 192.168.254.2" | docker run --volumes-from $OVPN_DATA -i --rm kylemanna/openvpn tee /etc/openvpn/ccd/CERT_COMMON_NAME
10+
ifconfig-push 192.168.254.1 192.168.254.2
1311

1412
2. Wait for client to reconnect if necessary
1513

1614
## Advanced Admin
1715

1816
Login to the data volume with a `bash` container, note only changes in /etc/openvpn will persist:
1917

20-
```Shell
21-
docker run --volumes-from $OVPN_DATA -it --rm kylemanna/openvpn bash -l
22-
```
18+
docker run --volumes-from $OVPN_DATA -it --rm kylemanna/openvpn bash -l
2319

2420
## Upgrading from Old OpenVPN Configurations
2521

2622
If you're running an old configuration and need to upgrade it to pull in the ccd directory run the following:
2723

28-
```Shell
29-
docker run --volumes-from $OVPN_DATA --rm kylemanna/openvpn ovpn_genconfig
30-
```
24+
docker run --volumes-from $OVPN_DATA --rm kylemanna/openvpn ovpn_genconfig

0 commit comments

Comments
 (0)