Last active
December 19, 2015 11:59
-
-
Save jnyryan/5951807 to your computer and use it in GitHub Desktop.
Set up the basics for OpenVPN on an Ubuntu 12.04 desktop.
This file contains hidden or 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
| #!/bin/sh | |
| ################################################### | |
| # Install OpenVPN | |
| ################################################### | |
| sudo apt-get install -y openvpn bridge-utils network-manager-openvpn | |
| # This allows you to import settings into network-manager | |
| # http://askubuntu.com/questions/187511/how-can-i-use-a-ovpn-file-with-network-manager | |
| sudo apt-get install network-manager-openvpn-gnome | |
| ################################################### | |
| # Set up the certs for Open VPN | |
| ################################################### | |
| echo "Cleanup" | |
| sudo rm -rf /etc/openvpn/certs | |
| sudo rm -rf /etc/openvpn/keys | |
| sudo rm -rf /etc/openvpn/* | |
| echo "Creating Folders" | |
| sudo mkdir -p /etc/openvpn/certs | |
| sudo mkdir -p /etc/openvpn/keys | |
| # Download and extract you keys and certs | |
| echo "Copying certs and keys" | |
| sudo cp ./*.crt /etc/openvpn/certs | |
| sudo cp ./*.key /etc/openvpn/keys | |
| sudo cp ./FullyRouted-UK.opvn /etc/openvpn/FullyRouted-UK.config | |
| echo "Setting permissions" | |
| sudo chmod 644 /etc/openvpn/certs/*.crt | |
| sudo chmod 644 /etc/openvpn/keys/*.key | |
| sudo chmod 644 /etc/openvpn/*.config | |
| ls -l /etc/openvpn/certs | |
| ls -l /etc/openvpn/keys | |
| ls -l /etc/openvpn | |
| echo "Done" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment