freevpn --> bash script 09-30-2016, 03:57 AM
#1
d0ntjump -->
--> here is a script i wrote to easily establish a free vpn connection.
--> you can visit --> www.vpnbook.com <-- and check it out yourself. [it's great for browsing & such but doesn't support p2p]
--> follow the instructions below and you will have a free vpn in no time!
preconditions --> first you will need to install wget, figlet, lolcat & openvpn if they aren't already installed with your linux distro.
--> w/debian --> sudo apt-get install wget figlet lolcat openvpn
--> figlet & lolcat are strictly 4 eye candy.
opt 1 --> create a folder in your 'home/user' directory and name it 'vpn' or whatever you desire/please.
--> copy & paste the script below into a text editor of your choosing.
--> save the script as 'freevpn' in the folder 'vpn' or whatever you named it.
--> go to --> http://www.vpnbook.com/freevpn <-- and download the files 'US1 OpenVPN Certificate Bundle' & 'US2 OpenVPN Certificate Bundle'.
--> now you will need to extract/unzip the files into the same 'vpn folder or whatever you named it.
opt 2 --> download the attachment and extract/unzip the file into your 'home/user' directory.
here is an example of the hierarchy/structure you should have -->
home --> user --> vpn --> freevpn (script)
vpnbook-us1-tcp80.ovpn
vpnbook-us1-tcp443.ovpn
vpnbook-us1-udp53.ovpn
vpnbook-us1-udp25000.ovpn
vpnbook-us2-tcp80.ovpn
vpnbook-us2-tcp443.ovpn
vpnbook-us2-udp53.ovpn
vpnbook-us2-udp25000.ovpn
next --> from terminal/bash you will need to change the permissions and add the 'x' execution privilege.
--> navigate to folder where the script is and run the commands below.
--> w/debian --> sudo chmod +x freevpn
--> w/debian --> sudo chmod 755 freevpn <-- use this command as needed and accordingly.
--> you will need to alter the file path in the code to reference your user directory.
--> anywhere in the code that says 'sudo openvpn /home/user/vpn/' you will need to change the 'user' path to your own.
--> example --> sudo openvpn /home/billybob/vpn/vpnbook-us1-tcp80.ovpn
--> all you need to do now is execute the script with ./freevpn
--> the script is self explanatory...
--> enjoy!
#!/bin/bash
#------------------------------------------------------------
# author --> d0ntjump
# description --> creates a vpn connection using openvpn
# requirments --> wget, figlet, lolcat & openvpn
#------------------------------------------------------------
figlet "freevpn" | lolcat
sudo echo
echo "username --> vpnbook"
# the username never changes
echo "password -->" && wget -q -O- http://www.vpnbook.com/freevpn | grep Password
# the password changes from time to time --> command above will grab current password
# output will duplicate
echo
echo "enter/choose which configuration to use -->"
echo
echo "(1) --> vpnbook-us1-tcp80.ovpn"
echo "(2) --> vpnbook-us1-tcp443.ovpn"
echo "(3) --> vpnbook-us1-udp53.ovpn"
echo "(4) --> vpnbook-us1-udp25000.ovpn"
echo "(5) --> vpnbook-us2-tcp80.ovpn"
echo "(6) --> vpnbook-us2-tcp443.ovpn"
echo "(7) --> vpnbook-us2-udp53.ovpn"
echo "(8) --> vpnbook-us2-udp25000.ovpn"
echo
read configuration
echo
if [ $configuration == "1" ]
then
sudo openvpn /home/user/vpn/vpnbook-us1-tcp80.ovpn
elif [ $configuration == "2" ]
then
sudo openvpn /home/user/vpn/vpnbook-us1-tcp443.ovpn
elif [ $configuration == "3" ]
then
sudo openvpn /home/user/vpn/vpnbook-us1-udp53.ovpn
elif [ $configuration == "4" ]
then
sudo openvpn /home/user/vpn/vpnbook-us1-udp25000.ovpn
elif [ $configuration == "5" ]
then
sudo openvpn /home/user/vpn/vpnbook-us2-tcp443.ovpn
elif [ $configuration == "6" ]
then
sudo openvpn /home/user/vpn/vpnbook-us2-udp53.ovpn
elif [ $configuration == "7" ]
then
sudo openvpn /home/user/vpn/vpnbook-us2-udp25000.ovpn
elif [ $configuration == "8" ]
then
sudo openvpn /home/user/vpn/vpnbook-us2-tcp443.ovpn
fi
--> here is a script i wrote to easily establish a free vpn connection.
--> you can visit --> www.vpnbook.com <-- and check it out yourself. [it's great for browsing & such but doesn't support p2p]
--> follow the instructions below and you will have a free vpn in no time!
preconditions --> first you will need to install wget, figlet, lolcat & openvpn if they aren't already installed with your linux distro.
--> w/debian --> sudo apt-get install wget figlet lolcat openvpn
--> figlet & lolcat are strictly 4 eye candy.
opt 1 --> create a folder in your 'home/user' directory and name it 'vpn' or whatever you desire/please.
--> copy & paste the script below into a text editor of your choosing.
--> save the script as 'freevpn' in the folder 'vpn' or whatever you named it.
--> go to --> http://www.vpnbook.com/freevpn <-- and download the files 'US1 OpenVPN Certificate Bundle' & 'US2 OpenVPN Certificate Bundle'.
--> now you will need to extract/unzip the files into the same 'vpn folder or whatever you named it.
opt 2 --> download the attachment and extract/unzip the file into your 'home/user' directory.
here is an example of the hierarchy/structure you should have -->
home --> user --> vpn --> freevpn (script)
vpnbook-us1-tcp80.ovpn
vpnbook-us1-tcp443.ovpn
vpnbook-us1-udp53.ovpn
vpnbook-us1-udp25000.ovpn
vpnbook-us2-tcp80.ovpn
vpnbook-us2-tcp443.ovpn
vpnbook-us2-udp53.ovpn
vpnbook-us2-udp25000.ovpn
next --> from terminal/bash you will need to change the permissions and add the 'x' execution privilege.
--> navigate to folder where the script is and run the commands below.
--> w/debian --> sudo chmod +x freevpn
--> w/debian --> sudo chmod 755 freevpn <-- use this command as needed and accordingly.
--> you will need to alter the file path in the code to reference your user directory.
--> anywhere in the code that says 'sudo openvpn /home/user/vpn/' you will need to change the 'user' path to your own.
--> example --> sudo openvpn /home/billybob/vpn/vpnbook-us1-tcp80.ovpn
--> all you need to do now is execute the script with ./freevpn
--> the script is self explanatory...
--> enjoy!
#!/bin/bash
#------------------------------------------------------------
# author --> d0ntjump
# description --> creates a vpn connection using openvpn
# requirments --> wget, figlet, lolcat & openvpn
#------------------------------------------------------------
figlet "freevpn" | lolcat
sudo echo
echo "username --> vpnbook"
# the username never changes
echo "password -->" && wget -q -O- http://www.vpnbook.com/freevpn | grep Password
# the password changes from time to time --> command above will grab current password
# output will duplicate
echo
echo "enter/choose which configuration to use -->"
echo
echo "(1) --> vpnbook-us1-tcp80.ovpn"
echo "(2) --> vpnbook-us1-tcp443.ovpn"
echo "(3) --> vpnbook-us1-udp53.ovpn"
echo "(4) --> vpnbook-us1-udp25000.ovpn"
echo "(5) --> vpnbook-us2-tcp80.ovpn"
echo "(6) --> vpnbook-us2-tcp443.ovpn"
echo "(7) --> vpnbook-us2-udp53.ovpn"
echo "(8) --> vpnbook-us2-udp25000.ovpn"
echo
read configuration
echo
if [ $configuration == "1" ]
then
sudo openvpn /home/user/vpn/vpnbook-us1-tcp80.ovpn
elif [ $configuration == "2" ]
then
sudo openvpn /home/user/vpn/vpnbook-us1-tcp443.ovpn
elif [ $configuration == "3" ]
then
sudo openvpn /home/user/vpn/vpnbook-us1-udp53.ovpn
elif [ $configuration == "4" ]
then
sudo openvpn /home/user/vpn/vpnbook-us1-udp25000.ovpn
elif [ $configuration == "5" ]
then
sudo openvpn /home/user/vpn/vpnbook-us2-tcp443.ovpn
elif [ $configuration == "6" ]
then
sudo openvpn /home/user/vpn/vpnbook-us2-udp53.ovpn
elif [ $configuration == "7" ]
then
sudo openvpn /home/user/vpn/vpnbook-us2-udp25000.ovpn
elif [ $configuration == "8" ]
then
sudo openvpn /home/user/vpn/vpnbook-us2-tcp443.ovpn
fi
(This post was last modified: 10-20-2016, 03:57 AM by d0ntjump.)
![[Image: giphy.gif]](https://media.giphy.com/media/epRoTgGfkLpxS/giphy.gif)




![[+]](https://sinister.li/images/modern/collapse_collapsed.png)











