# PPTP routing problem

## m3th0s

I am trying to connect from the wired network of my university to the internet via the PPTP VPN of the university.

The pptpclient connects, but I can't ping anything except the gateway and some other local ips from the university,

but DNS resolving works.

When I try to connect via the macbook of my brother, everything works fine, though.

Something strange I noticed is, that by default, there are added two identical gateways with different metrics.

And what does Error: an inet prefix is expected rather than "/sbin/ip". mean?

before i start the vpn:

#route

```

Kernel IP routing table

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface

10.28.32.0      *               255.255.255.0   U     1      0        0 eth0

loopback        -               255.0.0.0       !     0      -        0 -

default         10.28.32.254    0.0.0.0         UG    0      0        0 eth0

default         10.28.32.254    0.0.0.0         UG    202    0        0 eth0

```

my config:

#cat /etc/ppp/peers/MY

```

pty "pptp login.zfn.wlan --nolaunchpppd"

name my_username

remotename PPTP

nobsdcomp

nomppe-stateful

defaultroute

defaultmetric 300

refuse-pap

refuse-chap

refuse-mschap

require-mschap-v2

refuse-eap

require-mppe-40

nomppe-128

ktune

file /etc/ppp/options.pptp

ipparam MY

```

starting the conection:

# pon MY nodetach debug

```

using channel 1

Using interface ppp0

Connect: ppp0 <--> /dev/pts/4

Error: an inet prefix is expected rather than "/sbin/ip".

sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0xb2651ec9> <pcomp> <accomp>]

rcvd [LCP ConfReq id=0x1 <asyncmap 0x0> <auth chap MS-v2> <magic 0x5b929b80> <pcomp> <accomp>]

sent [LCP ConfAck id=0x1 <asyncmap 0x0> <auth chap MS-v2> <magic 0x5b929b80> <pcomp> <accomp>]

rcvd [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0xb2651ec9> <pcomp> <accomp>]

rcvd [LCP EchoReq id=0x0 magic=0x5b929b80]

sent [LCP EchoRep id=0x0 magic=0xb2651ec9]

rcvd [CHAP Challenge id=0x58 <f654d1559b3f624a0a99e930432f863e>, name = "login7"]

Warning - secret file /etc/ppp/chap-secrets has world and/or group access

sent [CHAP Response id=0x58 <c55be833757f15a29b2d7a415b7edc140000000000000000704692389735c384555d922e79ca2e3f728836b12822a9c600>, name = "my_username"]

rcvd [CHAP Success id=0x58 "S=7B69BC5FB4576FEC7A0D5DC9397086ED62BD9707"]

CHAP authentication succeeded

sent [CCP ConfReq id=0x1 <mppe +H -M -S +L -D -C>]

rcvd [CCP ConfReq id=0x1 <mppe +H -M +S +L -D -C>]

sent [CCP ConfNak id=0x1 <mppe +H -M -S +L -D -C>]

rcvd [CCP ConfAck id=0x1 <mppe +H -M -S +L -D -C>]

rcvd [CCP ConfReq id=0x2 <mppe +H -M -S +L -D -C>]

sent [CCP ConfAck id=0x2 <mppe +H -M -S +L -D -C>]

MPPE 40-bit stateless compression enabled

sent [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr 0.0.0.0>]

rcvd [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr 134.102.112.27>]

sent [IPCP ConfAck id=0x1 <compress VJ 0f 01> <addr 134.102.112.27>]

rcvd [IPCP ConfNak id=0x1 <addr 134.102.112.41>]

sent [IPCP ConfReq id=0x2 <compress VJ 0f 01> <addr 134.102.112.41>]

rcvd [IPCP ConfAck id=0x2 <compress VJ 0f 01> <addr 134.102.112.41>]

local  IP address 134.102.112.41

remote IP address 134.102.112.27

Script /etc/ppp/ip-up started (pid 2526)

Script /etc/ppp/ip-up finished (pid 2526), status = 0x0

```

after the vpn connection is established:

# route

```

Kernel IP routing table

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface

login7.wlan.uni *               255.255.255.255 UH    0      0        0 ppp0

10.28.32.0      *               255.255.255.0   U     1      0        0 eth0

loopback        -               255.0.0.0       !     0      -        0 -

default         10.28.32.254    0.0.0.0         UG    0      0        0 eth0

default         10.28.32.254    0.0.0.0         UG    202    0        0 eth0

default         login7.wlan.uni 0.0.0.0         UG    300    0        0 ppp0

```

----------

## mr.sande

Have you checked your dns servers? If you put "usepeerdns" in you /etc/ppp/peers/MY, the proper dns servers gets appended to /etc/resolv.conf. (EDIT: sorry, didnt see the part about dns working fine)

EDIT: From what I understood you connect to your university via vpn to get internet, I do the same thing. What got it working for me was doing 

```
route add default ppp0
```

after the connection is established.

Hope it helps.

----------

