Skip to content

Commit

Permalink
Merge pull request dperson#225 from ap-wtioit/master-add_example_for_…
Browse files Browse the repository at this point in the history
…client_certs

README.md add example for client certs
  • Loading branch information
David Personette authored Mar 20, 2020
2 parents 893049a + 0a73e99 commit 94a33aa
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,35 @@ get from your VPN. You'll need to add the `--dns` command line option to the
--dns 8.8.4.4 -v /some/path:/vpn -d dperson/openvpn-client \
-v 'vpn.server.name;username;password'

### Run with client certificates

In case you want to use client certificates you just copy them into the /vpn
directory.

sudo cp /path/to/vpn.crt /some/path/vpn-ca.crt
sudo cp /path/to/client.crt /some/path/client.crt
sudo cp /path/to/client.key /some/path/client.key
sudo cp /path/to/vpn.conf /some/path/vpn.conf
sudo docker run -it --cap-add=NET_ADMIN --device /dev/net/tun --name vpn \
-v /some/path:/vpn -d dperson/openvpn-client

The vpn.conf should look like this:

client
dev tun
port 1194
proto udp

remote vpn.server.name 1194
nobind

ca /vpn/vpn-ca.crt
cert /vpn/client.crt
key /vpn/client.key

persist-key
persist-tun

# User Feedback

## Issues
Expand Down

0 comments on commit 94a33aa

Please sign in to comment.