1

I have 14.04 LTS installed on my laptop (VMWare image) and I establish a VPN connection to my home. All that works fine, but when I want to use ssh on my laptop the VPN connection dies immediately.

How do I get ssh to work over a VPN connection?

I don't have this problem with a Windows 7 guest connecting to the same VPN server.

I see these errors in the syslog:

May 26 08:30:51 ubuntu pptp[6284]: nm-pptp-service-6262 log[logecho:pptp_ctrl.c:677]: Echo Request received.
May 26 08:30:51 ubuntu pptp[6284]: nm-pptp-service-6262 log[ctrlp_rep:pptp_ctrl.c:251]: Sent control packet type is 6 'Echo-Reply'
May 26 08:30:51 ubuntu pptp[6284]: nm-pptp-service-6262 log[logecho:pptp_ctrl.c:677]: Echo Reply received.
May 26 08:31:30 ubuntu pptp[6272]: nm-pptp-service-6262 warn[decaps_gre:pptp_gre.c:331]: short read (-1): Message too long
May 26 08:31:30 ubuntu pptp[6284]: nm-pptp-service-6262 log[callmgr_main:pptp_callmgr.c:234]: Closing connection (unhandled)
May 26 08:31:30 ubuntu pptp[6284]: nm-pptp-service-6262 log[ctrlp_rep:pptp_ctrl.c:251]: Sent control packet type is 12 'Call-Clear-Request'
May 26 08:31:30 ubuntu pptp[6284]: nm-pptp-service-6262 log[call_callback:pptp_callmgr.c:79]: Closing connection (call state)
May 26 08:31:30 ubuntu pppd[6266]: Modem hangup
May 26 08:31:30 ubuntu pppd[6266]: Connect time 1.6 minutes.
May 26 08:31:30 ubuntu pppd[6266]: Sent 6871 bytes, received 6572 bytes.
May 26 08:31:30 ubuntu pppd[6266]: MPPE disabled
0

Try to make vpn connection with this script, not with NM.

Maybe on this way all will work.

Create file with some name and put in

nano name_of_script

script

#!/bin/bash
function routeadd {
    route add -host xxx.xxx.xxx.xxx dev ppp0
    route add -net xxx.xxx.xxx.xxx/xx dev ppp0
}
function makepptp {
   echo pty \"pptp xxx.xxx.xxx.xxx --nolaunchpppd\" >> /etc/ppp/peers/vpn;
   echo remotename PPTP >> /etc/ppp/peers/vpn;
   echo require-mppe-128 >> /etc/ppp/peers/vpn;
   echo file /etc/ppp/options.pptp >> /etc/ppp/peers/vpn;
   echo ipparam vpn >> /etc/ppp/peers/vpn;
pppd call vpn &
}
if [ -a /etc/ppp/chap-secrets ];
        then
        rm /etc/ppp/chap-secrets
    echo $1 PPTP $2 '*' >> /etc/ppp/chap-secrets;
else
    echo $1 PPTP $2 '*' >> /etc/ppp/chap-secrets;
fi

if [ -e /etc/ppp/peers/vpn ];
    then
    rm /etc/ppp/peers/vpn;
    echo name $1 >> /etc/ppp/peers/vpn;
    makepptp;
    sleep 8;
    routeadd;
else
    echo name $1 >> /etc/ppp/peers/vpn;
    makepptp;
    sleep 8;
    routeadd;
fi

In script change you host ip and add network or/and host witch you wish to connect via vpn

Usage:

sudo /path_to_script/name_of_script username password

note: set execute permision to script

  • This isn't working for me. Couple issues. 1. I don't know what to put for the two route add lines, so I don't believe I have the correct routing. 2. The ppp0 dies on it's own after a couple minutes. I see a syslog msg about closing control connection due to missing echo reply – Zoran May 27 '14 at 21:21
  • ans: 1. In route lines you put network or host witch you wish to connect via vpn e.g. route add -host 10.10.10.10 dev ppp0 or route add -net 192.168.5.0/24 dev ppp0 2. Probably because do not have traffic via vpn. – 2707974 May 28 '14 at 6:30
0

I had the same problem and the following approach worked for me:

"Use Point-to-Point encryption(MPPE)" must be selected

Note: one or more of MSCHAP authentication methods should be selected before.

Of course this is dependent to your VPN server settings as well.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.