Difference between revisions of "VPN"
Jump to navigation
Jump to search
Rafahsolis (talk | contribs) |
Rafahsolis (talk | contribs) m (Protected "VPN" ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite))) |
(No difference)
| |
Revision as of 04:19, 7 April 2015
VPN provider
Private Intenet Access: Private Internet Acess
Linux Connection
In order to connect using Linux you need to install openvpn
sudo apt-get install openvpn
Download and extract the openvpn configuration files:
openVPN config files and cert
#!/bin/bash
WORKING_DIR=$( pwd )
clear
echo "Select Server to connect:"
echo
declare -a servers
cnt=1
for entry in "$search_dir"$( pwd )/*.ovpn
do
echo "$cnt) $entry" | sed "s#${WORKING_DIR}/##" | sed 's#.ovpn##'
servers[${#servers[@]}+1]=$(echo "$entry" | sed "s#${WORKING_DIR}/##" | sed 's#.ovpn##')
cnt=$(( cnt + 1))
done
read option_selection
clear
echo "Connecting to: ${servers[$option_selection]}"
echo "Username: PUT_YOUR_USERNAME_HERE_IF_YOU_WHANT_TO_HAVE_FAST_ACCESS_WHEN_PROMT"
echo "Password: PUT_YOUR_PASSWORD_HERE_IF_YOU_WHANT_TO_HAVE_FAST_ACCESS_WHEN_PROMT"
#tmp=$(echo "'${vms[$vm]}'")
config_file="${servers[$option_selection]}.ovpn"
sudo openvpn --config "${config_file}"
Create an alias for the script
echo 'alias vpn="PATH_TO_SCRIPT"' >> ~/.bash_alias && . ~/.bash_alias