Skip to content

🔒 OpenVPN server in a Docker container complete with an EasyRSA PKI CA

License

Notifications You must be signed in to change notification settings

mounforjs/docker-openvpn

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

INSTRUCTIONS

1. Define volume name variable

OVPN_DATA="docker-openvpn_ovpn-data"

2. Create the volume

docker volume create --name $OVPN_DATA

3. Generate configuration

(It will ask for a phase to define keys. You can use any type of word)

docker-compose run -v $OVPN_DATA:/etc/openvpn --rm vpn ovpn_genconfig -u udp:https://vpn.dummydomain.click

docker-compose run -v $OVPN_DATA:/etc/openvpn --rm vpn ovpn_initpki

  • This is goign to ask for phrase key. Put whatever phrase you want.
  • Then is going to ask for the host name, Type in the domain you have setup for this server (vpn.dummydomain.click)

4. Generate client files

docker-compose run -v $OVPN_DATA:/etc/openvpn --rm vpn easyrsa build-client-full CLIENTNAME nopass

docker-compose run -v $OVPN_DATA:/etc/openvpn --rm vpn ovpn_getclient CLIENTNAME > CLIENTNAME.ovpn

This last command is going to generate the client configuration file that will allow you to connect from your PC or mobile device. The fle gets created in the same directory from where you are executing it.

About

🔒 OpenVPN server in a Docker container complete with an EasyRSA PKI CA

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages

  • Shell 98.3%
  • Dockerfile 1.7%