Tuesday, November 20, 2012

Linux VPN Client Configuration

If you wish to connect to a Windows VPN Server from Linux, something like this would work

File:/etc/ppp/peers/myvpn

remotename myvpn
linkname myvpn
ipparam myvpn
pty "pptp [IP-Addr-of-Windows-VPN-Server] --nolaunchpppd"
name [User-Name]
require-mppe
refuse-eap
noauth
file /etc/ppp/options.pptp

File:/etc/ppp/chap-secrets

# Secrets for authentication using CHAP
# client   server  secret   IP addresses

[UserName] myvpn [MyVPN-Password] *

This file is used for setting up routing (will be different for your network) after the VPN connection is established. File:/etc/ppp/ip-up.d/my-vpn-up

#!/bin/bash

route add -net 10.0.0.0/8 ppp0

This is the final script that must be run to establish the VPN connection. File:/bin/vpn_connect.sh

#!/bin/bash

nohup pon myvpn nodetach >/dev/null 2>&1 &

No comments :

Post a Comment