Created
July 3, 2017 07:34
-
-
Save morteza-mori/0f52bb356c625ec2a9f451d885dc397a to your computer and use it in GitHub Desktop.
open vpn
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
OpenVPN Config | |
apt-get install openvpn easy-rsa | |
mkdir /etc/openvpn/easy-rsa | |
cp -rf /usr/share/easy-rsa/* /etc/openvpn/easy-rsa | |
Edit the vars file in order to create certificates information: | |
nano /etc/openvpn/easy-rsa/vars | |
cd /etc/openvpn/easy-rsa | |
source vars | |
./clean-all → Cleans everything in keys | |
./build-ca | |
./build-key-server MYSERVER-VPN | |
Client add and configuration: | |
source ./vars | |
./build-key CLIENT-NAME | |
./build-dh | |
Copy server related files in order to run the server: | |
cd keys/ | |
cp dh2048.pem ca.crt MYSERVER-VPN.crt MYSERVER-VPN.key /etc/openvpn | |
Configuring Server: | |
cp /usr/share/doc/openvpn/examples/sample-config-files/server.conf.gz | |
/etc/openvpn/ | |
gzip -d /etc/openvpn/server.conf.gz | |
nano server.conf → Edit carefully | |
Client Config File: | |
cp /usr/share/doc/openvpn/examples/sample-config-files/client.conf | |
/etc/openvpn/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment