If your system is of Ubuntu (newer version ), you can follow this link to setup your VPN

 

1. Add the line below to file /etc/ppp/options.pptp:


nodefaultroute

2. create or add lines to file /etc/ppp/chap-secrets, which holds usernames and passwords:

$USERNAME PPTP $PASSWORD *

3. create a file named /etc/ppp/peers/ecevpn with the following content:

pty "pptp 128.100.241.58 --nolaunchpppd"
name $USERNAME
remotename PPTP
require-mppe-128
file /etc/ppp/options.pptp
ipparam ecevpn

4. Create a file named /etc/ppp/ip-up.d/static_route as following:

----------------------------------------------------------
#!/bin/bash
#These variables are for the use of the scripts run by run-parts
#PPP_IFACE="$1";
#PPP_TTY="$2";
#PPP_SPEED="$3";
#PPP_LOCAL="$4";
#PPP_REMOTE="$5";
#PPP_IPPARAM="$6";
if [ "${PPP_IPPARAM}" = "ecevpn" ]; then
route add -net 128.100.7.0/24 gw ${PPP_REMOTE} dev ${PPP_IFACE}
route add -net 128.100.9.0/24 gw ${PPP_REMOTE} dev ${PPP_IFACE}
route add -net 128.100.10.0/24 gw ${PPP_REMOTE} dev ${PPP_IFACE}
route add -net 128.100.11.0/24 gw ${PPP_REMOTE} dev ${PPP_IFACE}
route add -net 128.100.12.0/24 gw ${PPP_REMOTE} dev ${PPP_IFACE}
route add -net 128.100.15.0/24 gw ${PPP_REMOTE} dev ${PPP_IFACE}
route add -net 128.100.23.0/24 gw ${PPP_REMOTE} dev ${PPP_IFACE}
route add -net 128.100.24.0/24 gw ${PPP_REMOTE} dev ${PPP_IFACE}
route add -net 128.100.51.0/24 gw ${PPP_REMOTE} dev ${PPP_IFACE}
route add -net 128.100.138.0/24 gw ${PPP_REMOTE} dev ${PPP_IFACE}
route add -net 128.100.221.0/24 gw ${PPP_REMOTE} dev ${PPP_IFACE}
route add -net 128.100.244.0/24 gw ${PPP_REMOTE} dev ${PPP_IFACE}
fi
------------------------

5. Change the file mode of /etc/ppp/ip-up.d/static_route to executable

chmod 755 /etc/ppp/ip-up.d/static_route

6. start the vpn connection using the pon command:


pon ecevpn