Sabtu, 21 Mei 2011

VPN Setup using the cCommand line



VPN (Virtual Private Network) lets you establish a secure connection over the non-secure Internet, e.g. from a notebook to an office server.

Getting a VPN to work requires general knowledge on networks, and it may require some specific knowledge on routers, firewalls and VPN protocols.

In order to use VPN on Ubuntu, you need to make sure that support for the required VPN protocol is installed. Several VPN protocols exist:

PPTP (Microsoft VPN)

sudo apt-get install network-manager-pptp

Cisco VPN

sudo apt-get install network-manager-vpnc

OpenVPN

sudo apt-get install network-manager-openvpn

IPSec VPN

Not covered on this page, so far

Usage
Click on the network-manager in the system tray

Choose VPN Connections -> Configure VPN
Click Add

You might have to restart the network-manager to get the added VPN connection on the list (killall nm-applet; nm-applet &)
Now the VPN connection should be shown in the network-manager.

VPN Setup using the cCommand line
Run the following:

sudo apt-get install pptp-linux

Create file /etc/ppp/peers/YOUR_COMPANY with this content:
pty "pptp YOUR_VPN_GATEWAY --nolaunchpppd"
debug
nodetach
logfd 2
noproxyarp
ipparam YOUR_COMPANY
remotename YOUR_COMPANY
name YOUR_DOMAIN_OR_SERVER_NAME\\YOUR_VPN_LOGIN
require-mppe-128
nobsdcomp
nodeflate
lock
noauth
refuse-eap
refuse-chap
refuse-mschap

Add to /etc/ppp/chap-secrets:
YOUR_DOMAIN_OR_SERVER_NAME\\YOUR_VPN_LOGIN * YOUR_VPN_PASSWORD *

Create file /etc/ppp/ip-up.d/add-subnet with content similar to:
[ "$PPP_IPPARAM" = "YOUR_COMPANY" ] || exit 0
route add -net 192.168.100.0/24 dev $PPP_IFACE

In the above line, adjust subnet values (192.168.100.0/24) if needed

Then run:
sudo chmod a+x /etc/ppp/ip-up.d/add-subnet

- Connect to VPN: sudo pon YOUR_COMPANY To disconnect, press Ctrl+C or close the terminal.

- If you do not want to see VPN connection debug output, in file /etc/ppp/peers/YOUR_COMPANY delete 3 lines: debug nodetach logfd 2

In this case, “pon YOUR_COMPANY” will run as a background process. Use “poff YOUR_COMPANY” to disconnect.

Tidak ada komentar:

Posting Komentar

.::BY JUMBHO MY AT HOME IN THE JEPARA CITY OF BEAUTIFUL::.