A shell script to install VPN using SoftEther and Transmission CLI Torrent Client on Ubuntu 14.04 for use on Digital Ocean
- Execution for installation and setup
sudo su
wget ayush.sachdev.me/DigitalOceanVPN
sh DigitalVPN
- Once the script starts running, follow the prompts. At
Setup VPN Softether manually now
-
Press 3 and type
check
-
If all goes well, type
quit
-
Press 1 to select "Management of VPN Server or VPN Bridge"
-
Press Enter without typing anything to connect to the localhost server
-
Again press Enter without inputting anything to connect to server by server admin mode.
-
Then use command below to change admin password
ServerPasswordSet
-
Create a Virtual Hub named VPN using the command
HubCreate VPN
-
Next you will be asked to enter an administrator password for the hub. This password will be used whenever you are not logged in as server admin mode, and you want to manage that specific hub.
-
Now select the Virtual Hub you created using this command
Hub VPN
-
Enable SecureNAT using
SecureNatEnable
-
Create a user named Ayush using the command
UserCreate ayush
-
To set a password for Ayush, type
UserPasswordSet ayush
-
To enable IPsecEnable type
IPsecEnable
-
Enable L2TP over IPsec Server Function: Choose yes to enable L2TP VPN over IPSec with pre-shared key encryption. Now you can make VPN connections to this server using iPhone, Android, Windows, and Mac OS X devices.
-
Enable Raw L2TP Server Function: This will enable L2TP VPN for clients with no IPSec encryption.
-
Enable EtherIP / L2TPv3 over IPsec Server Function: Routers which are compatible with EtherIP / L2TPv3 over IPsec can connect to this server by enabling this function.
-
Pre Shared Key for IPsec: Enter a pre-shared key to use with L2TP VPN.
-
Default Virtual HUB in a case of omitting the HUB on the Username: Users must specify the Virtual Hub they are trying to connect to by using Username@TargetHubName as their username when connecting. This option specifies which Virtual Hub to be used if the user does not provide such information. In our case enter VPN.
-
Get Fully Qualified Domain Name (FQDN) using
hostname -f
-
Generate a server for SSL using
ServerCertRegenerate [FQDN]
-
Export the SSL certificate using
ServerCertGet ~/cert.cer
-
Enable SSTP using
SstpEnable yes
-
Enable OpenVPN using
OpenVpnEnable yes /PORTS:1194
-
Export OpenVPN config using
OpenVpnMakeConfig ~/my_openvpn_config.zip
-
Copy the link shown and enter the password
-
Hit control-C to stop dropbox sync:
^C
-
You can use
dropbox.py help
to control the Dropbox sync