rss feed Twitter Page Facebook Page Github Page Stack Over Flow Page

VPN into a Secure Environment in Ubuntu

VPN (virtual private network) extends a private network and the resources contained in the network across public networks like the Internet. It enables a host computer to send and receive data across shared or public networks as if it were a private network with all the functionality, security and management policies of the private network.[1] This is done by establishing a virtual point-to-point connection through the use of dedicated connections, encryption, or a combination of the two.

source: http://en.wikipedia.org/wiki/Virtual_private_network

Ubuntu does not come with the VPN tool and for those who needs it, here's what to do.

Install Java JDK

sudo apt-get install openjdk-7-jdk icedtea-7-plugin

Install Juniper VPN Software

mkdir ~/juniper_temp
cd ~/juniper_temp
wget https://github.com/udomsak/juniper-ncui/raw/master/ncLinuxApp.jar
jar xf ncLinuxApp.jar
chmod +x ./getx509certificate.sh
./getx509certificate.sh IP_OF_THE_SECURE_ENV ~/.vpn-secure.crt
chmod go-rwx ~/.vpn-secure.crt
chmod a+x ./ncsvc

Run

Run this in a console, it will ask you for your password (don't run it in the background) It will keep running until you stop it.

sudo ./ncsvc -h IP_OF_THE_SECURE_ENV -u username -f ~/.vpn-secure.crt

Once the password is entered, the connection will be now open to the secure environment. Simply open a new console and type:

ssh IP_OF_THE_SECURE_ENV

Then to close the connection from the secure environment, simply hit control-c from the process that was running in the other console.