connection with PPTP fails

I’m trying to connect to a VPN with PPTP. When entering the command sudo /usr/sbin/pptp <server> name <user> password <PW> &

I get

anon warn[open_inetsock:pptp_callmgr.c:329]: connect: No route to host
anon fatal[callmgr_main:pptp_callmgr.c:127]: Could not open control connection to <IP>
anon fatal[open_callmgr:pptp.c:479]: Call manager exited with error 256
anon fatal[main:pptp.c:357]: Child process died

But I can ping the server.

It worked one single time and I have no idea why…

I am using this script btw:



sudo sudo pkill /usr/sbin/pptp
# create the ppp0 interface
sudo /sbin/route del -host $VPNHOST
sudo /sbin/route add $VPNHOST $INTERFACE
sudo /usr/sbin/pptp $VPNHOST name $USER password $PASSWORD &
sudo sleep 20
sudo /sbin/route add default ppp0
sudo /sbin/route del -host $VPNHOST ppp0

Can you show us the routing table prior to executing ‘sudo /usr/sbin/pptp $VPNHOST name $USER password $PASSWORD &’?

Here’s another CLI approach that might work for you

When I try the linked approach I get:

using channel 4Using interface ppp0
Connect: ppp0 <--> /dev/pts/3
Script pptp --nolaunchpppd finished (pid 2335), status = 0x0
Modem hangup
Connection terminated.

The routing table:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface         UG    0      0        0 enp2s0 UH    0      0        0 enp2s0   U     1      0        0 enp2s0