VPN

Revision 12 as of 2009-06-01 13:19:53

Clear message

VPN setup on Ubuntu Feisty (7.04) and later

In order to use VPN on Ubuntu Feisty, you need to install support for the VPN protocol:

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

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

When using Kubuntu Feisty (7.04)

You have to install the additional package

network-manager-gnome

Please refer to WifiDocs/NetworkManager under VPN support for more information.

Commandline

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.

VPN Setup on 8.10

I stole these instructions from http://ubuntuforums.org/showpost.php?p=7089396&postcount=196. This is for connecting to a Microsoft VPN.

You need to install 2 packages:

  • network-manager-pptp
  • pptp-linux

If you do the first, it will install the second as a dependency.

Open Network Configuration (System, Preferences, Network Configuration). Highlight your VPN connection, hit Edit.

At IPv4 Settings Tab: choose method Automatic (VPN).

At VPN Tab:

  1. input the IP address of the target computer.
  2. input your user name. Leave all else blank, unless you are tunneling to a domain, then enter the domain name where indicated.
  3. hit Advanced button.

At Authentication:

  1. UNcheck PAP (because PAP means to allow unsecured passage - this is the source of "no shared shared secrets")
  2. Check CHAP, MSCHAP and MSCHAPv2.

At Security and Compression:

  1. Check Use Point-to-point encryption (MPPE)
  2. Select 128-bit (most secure).
  3. Check Allow stateful encryption.

At Echo: check Allow PPP echo packets. Leave all else blank. Hit OK, OK to save and get out.