# PPTP VPN with MS encryption

## asiobob

Hello,

I'm atm a mandrake user looking to convert after college finishes (3 weeks for me   :Laughing: 

Like most college students I get internet access via VPN with MS "MPPE" encryption. On mandrake I used a script to build me a kernel mod for MPPE support (from pptp http://pptpclient.sourceforge.net/ followin Redhat instructions), then I installed the "pptp-client" app, then I installed pptp-php-gtk which is a nice GUI to create connections and it has an option to "assign DNS automatically" (otherwise a file has to be edited with the CMD version) and has most common routing schemes inbuilt.

All of the above works nicely on mdk. I'm new to linux, but I'm comfortable with the gentoo install instructions for a stage 2 install

Questions:

1. Does gentoo's kernel come with MPPE support? if not is there an emerge script for creating a kernel mod? if not I guess I can just use http://prdownloads.sourceforge.net/poptop/kernelmod-0.7.1.tar.gz?download the script in that URL to make a mod for me... just thought a emerge would be nice or is there other suggestions

2. installing pptp-client is easy as I believe there is an ebuild for it, but I can't find/see a ebuild for pptp-php-gtk (which is a GUI written in php/gtk) the actual source is found at http://prdownloads.sourceforge.net/pptpclient/pptp-php-gtk-20030505.tar.gz

is there an ebuild?

cheers for any help

----------

## djf_jeff

For the kernel mod, I think you must compile it yourself, but it is easy. Just follow the instruction here : 

http://pptpclient.sourceforge.net/howto-redhat-90-build.phtml

Just dont make an rpm for this.

And for php-gtk, I think there is no ebuild for it. Maybe you can try make one or compile it yourself with the instruction included in the package.

----------

## dma

```
*  net-dialup/pptpclient

      Latest version available: 1.3.1

      Latest version installed: [ Not Installed ]

      Size of downloaded files: 210 kB

      Homepage:    http://pptpclient.sourceforge.net/

      Description: Linux client for PPTP
```

From my installation:

```
root@laureate:/var/tmp/portage# grep -i PPP /proc/config

CONFIG_PPP=m

CONFIG_PPP_ASYNC=m

CONFIG_PPPOE=m
```

This should give you everything you need, provided your kernel has PPP support:

```
USE="crypt" emerge ppp pptpclient
```

ppp_mppe.o seems to taint the kernel because they forgot to specify GPL as the license for some dumb reason.

Also: for your daily dose of LOL:

http://samba.org/ppp/features.html

 *Quote:*   

> ppp is an implementation of (PPP) Point-to-Point Protocol for Unix systems. 
> 
> Some features of ppp include 
> 
> * works sometimes 

 

----------

## asiobob

oh excellent so doing 

```

USE="crypt" emerge ppp pptpclient

```

will install pptp client with MPPE support.

the kernel is tainted because the MPPE part is BSD licence I think

----------

## Wishmaster

Hi,

at the moment i'm trying to connect to a vpn server with mppe. 

I have a strange problem. The Connection establishes:

```

Establishing a PPTP connection with the command pptp xxx.xxx.xxx.xxx call SE ..

.. connection successfully activated using interface ppp2. Your local address is 172.16.60.2, and the remote address is 172.16.60.1.

Adding routes with commands ..

route add default dev ppp2

route add -net 172.16.0.0 dev ppp2 netmask 255.255.0.0

```

An ipconfig, shows that there is a device ppp2. But it transmits (btw. tries to transmit) many data (about 10 MB per second). The data does not really  passes the ppp0 device (to internet). After a few seconds the connection hangs up. 

Anybody has an idea? I really need it!

Bye,

Wishmaster

----------

## asiobob

assuming your are routing everything to the tunnel make sure your connection to the VPN server is not been routed into itself as well!!

----------

## Wishmaster

Yes, exactly that was the Problem. For further Details read out [1].

Thx for help!

Now the connection works, but only for a few minutes, then data transfers times out. The connections itself doesn't hang up.

Any further idea?

Bye,

Wishmaster

[1] http://pptpclient.sourceforge.net/howto-diagnosis.phtml#routing

----------

## asiobob

okay that sounds like a MTU/MRU issue.

set the MTU and MTU to around 100 in pppd (point to point demon)

```

mtu 1000 mru 1000

```

I actually use mandrake and I use the pptp-php-gtk "GUI" client and in it there's a section for setting options for the pppd. I've never actually used the pptp-client to set my connection up but I suspect there is a way to pass  those options to pppd.

----------

## asiobob

ahh you can set the two options in the "peers" file for the tunnel, or in the options file...

hope that helps. It happens because the data transfer is over the MTU/MRU units. if it stuffs up work only with the MTU part, a value of 1000 is meant to work, keep going higher if you want till the problem reappears

----------

## Wishmaster

Yes, I've read about this on the Webpage, but these two values (i use webmin to configure the connection) are set as default (in '/etc/ppp/options.pptp'). 

Now I've set it in '/etc/ppp/peers/...' additionaly and try if it works.

Thx for the hint!

Bye,

Wishmaster

----------

## Wishmaster

So, here is my Testresult:

The connection establishes, everything works find for a few minutes and then the connection times out. Theres no disconnect or output of an failure. 

At first a ping works fine, but then pings and connections does not work through the tunnel.

Does anybody has an idea why?

Bye,

Wishmaster

----------

## asiobob

if its not MTU/MRU problem discussed before have you tried the MTU discovery problem...

http://pptpclient.sourceforge.net/howto-diagnosis.phtml#connections_freeze

 *Quote:*   

> Problem: TCP connections using the PPTP Client host as a hop in the route (such as via normal routing, NAT or IP masquerading) freeze once they attempt to transfer large amounts of data.

 

What sort of connection is the tunel going through? DSL?

----------

## Wishmaster

Yes, i use an DSL connection. I've tried it with the iptables command and with setting the mtu to 1000 in the configuration file of the roaring penguin, which i use for my DSL connection. But nothing changes.

But you are right with your idea about problems when transmitting large amounts of data. I've made an ssh connection through the tunnel and tried to copy a file with scp, and after 50 KB the connection freezes.

But I don't know a solution!  :Sad: 

I hope you hava another hint?

Bye,

Wishmaster

P.S.: Thx for your patient help!

----------

## asiobob

following the previous pptp link, I've come across 

http://lartc.org/howto/lartc.cookbook.mtu-mss.html

 which may be of some help...

For me the MTU setting fixed this connection.

You might also want to chat with the developer directly, he helped me heaps when I couldn't get it to work, get on IRC (FREENODE) and and join #pptp its his part of his job to provide support do he's in the channel from 8am to 5pm Australian Eastern Time

http://pptpclient.sourceforge.net/contact.phtml

the above page has the irc connection details + local time for the developer...

----------

## Wishmaster

Ok, thx for that tip, i will try to reach someone!

Bye,

Wishmaster

----------

## Oopsz

 *ASIO_BOB wrote:*   

> oh excellent so doing 
> 
> ```
> 
> USE="crypt" emerge ppp pptpclient
> ...

 

that's a bug, BSD licensed source shouldn't taint your kernel..  

http://www.ussg.iu.edu/hypermail/linux/kernel/0110.1/index.html#751

----------

