Linux – how to manually setup pptp vpn in linux

linuxpptpUbuntuvpn

I tried to setup the pptp vpn in ubuntu i.e

 /etc/ppp/peers/myvpn

Its contents are

pty "pptp <host> --nolaunchpppd"
name myusername
remotename myvpn
linkname myvpn 
ipparam myvpn
usepeerdns
require-mppe
file /etc/ppp/options.pptp

But using this settings i can establish the tunnel and I even get the private IP of the VPN network , but I cannot ssh into any machine or not even ping to any other machine except for itself.

Best Answer

Your machine is probably using the wrong interface to send out packets to machines in the VPN. After establishing the VPN tunnel, you usually have to set a route for the VPN:

ip r add $VPN-net via $Peer dev $VPN-device

e.g.:

ip r add 10.3.0.0/17 via 10.30.100.40 dev ppp0
Related Topic