# MPPE easy as 123?

## orviwan

I've been having a bit of a nightmare trying to get PPTP working with MPPE.

If I disable MPPE in PPTP I can connect via VPN fine, but I would really like to enable encryption.

I tried for ages to get the MPPE option available in menuconfig, but was unsuccessful. I read another topic which said to load PPP as a module, which then shows ppp_mppe.o in modprobe.

```
root@gentorv ppp # modprobe -l

/lib/modules/2.4.22-gentoo-r5/kernel/drivers/net/3c59x.o

/lib/modules/2.4.22-gentoo-r5/kernel/drivers/net/bsd_comp.o

/lib/modules/2.4.22-gentoo-r5/kernel/drivers/net/ppp_async.o

/lib/modules/2.4.22-gentoo-r5/kernel/drivers/net/ppp_deflate.o

/lib/modules/2.4.22-gentoo-r5/kernel/drivers/net/ppp_generic.o

/lib/modules/2.4.22-gentoo-r5/kernel/drivers/net/ppp_mppe.o

/lib/modules/2.4.22-gentoo-r5/kernel/drivers/net/ppp_synctty.o

/lib/modules/2.4.22-gentoo-r5/kernel/drivers/net/slhc.o

/lib/modules/2.4.22-gentoo-r5/kernel/lib/zlib_deflate/zlib_deflate.o
```

I feel like I've been going round in circles. Some posts say you need to patch the kernel and patch pppd. The pppd config says it now supports MPPE without any kernel modifications.

Can anyone help?

pppd version 2.4.2b3

2.4.22-gentoo-r5 emerged from sys-kernel/gentoo-sources

pptpd PoPToP v1.1.3

----------

## orviwan

a bit more info, would be grateful for any help.

```
Feb 12 20:25:10 [pptpd] MGR: Manager process started

Feb 12 20:25:16 [pptpd] CTRL: Client 192.168.0.111 control connection started

Feb 12 20:25:16 [pptpd] CTRL: Starting call (launching pppd, opening GRE)

Feb 12 20:25:17 [pptpd] GRE: Discarding duplicate packet

Feb 12 20:25:18 [pptpd] CTRL: Ignored a SET LINK INFO packet with real ACCMs!

Feb 12 20:25:19 [pptpd] GRE: read(fd=5,buffer=804da60,len=8196) from PTY failed: status = -1 error = Input/output error

Feb 12 20:25:19 [pptpd] CTRL: PTY read or GRE write failed (pty,gre)=(5,8)

Feb 12 20:25:19 [pptpd] CTRL: Client 192.168.0.111 control connection finished
```

----------

## froke

I'm having some of the same problems trying to get connected to my vpn at school.  However, mine required encryption.

In my peers file, I have the line 

```
require-mppe-128
```

but that gives me an error 

```
/usr/sbin/pppd: In file /etc/ppp/peers/unr-options: unrecognized option 'require-mppe-128' 
```

So I think I need to somehow get MPPE support compiled into ppp.  I do have PPP support as a module in the kernel, do I need MPPE support in the kernel also??

----------

## froke

I'm also getting an error 

```
Unsupported protocol 0x2145 received
```

Which i looked up and it is for MPPC.  It means that my client doesn't support MPPC, but the server is not using MPPC.  So why am i getting this error code?

There was one other report of this same thing on the sourceforge discussions, but it has not been answered in a number of months.  The difference is my VPN server is Win-based and the one in the article is FreeBSD. Weird.

Of course the network techs at the school will not do anything about the problem, since the VPN works fine in Windows.

----------

## Moofed

I have mppe vpn working with my laptop, but there was a lot of trial and error.  I assume you've already found this page, it is very helpful.

I had to use the patches here (kernel and pppd) to make it work, however I'm on gentoo-dev-sources-2.6.2 so maybe you wont need all the patches.  I'm using pptpconfig to manage the connection which provides a nice gui interface.

My uni's vpn uses mppe but enabling it in pptpconfig causes the same "unrecognized option 'require-mppe-128'" you had.  But it seems to be enabled automatically at connection time, so all is well.

----------

## froke

I tried the MPPE/MPPC patches but they failed, probably because they are for the vanilla sources and i have gentoo-sources. 

Anyway, I got a newer version of PPP, 2.4.2, which has support for the 'require-mppe-128' option.  I just have to wait til I'm back at school to try it out.

dlpierce - Could you perhaps post your /etc/ppp/peers/ file and /etc/ppp/options.ppp ? Just so I have something to compare mine with.

----------

## orviwan

My problem seems to of moved on a bit now.

I updated my kernel to 2.6.1 and applied the MPPE patch: linux-2.6.1-mppe-mppc-0.98.patch and enabled MPPE in menuconfig.

I've updated my pppd to: pppd version 2.4.2b3

```
root@gentorv src # modinfo ppp_mppe_mppc

author:         Jan Dubiec <jdx@slackware.pl>

description:    MPPE/MPPC encryption/compression module for Linux

license:        Dual BSD/GPL

vermagic:       2.6.1 preempt PENTIUMIII gcc-3.3

depends:        ppp_generic
```

I now get this in my pppd log

```
Feb 15 00:44:14 [pppd] pppd 2.4.2b3 started by root, uid 0

Feb 15 00:44:14 [pppd] Using interface ppp1

Feb 15 00:44:14 [pppd] Connect: ppp1 <--> /dev/pts/3

Feb 15 00:44:17 [pppd] MPPE required, but kernel has no support.

Feb 15 00:44:17 [pppd] CHAP peer authentication succeeded for orv

Feb 15 00:44:17 [pppd] Connection terminated.

Feb 15 00:44:17 [pppd] Connect time 0.1 minutes.

Feb 15 00:44:17 [pppd] Sent 0 bytes, received 0 bytes.

Feb 15 00:44:17 [pppd] Connect time 0.1 minutes.

Feb 15 00:44:17 [pppd] Sent 0 bytes, received 0 bytes.

Feb 15 00:44:17 [pppd] Exit.
```

Anyone have any ideas?

----------

## orviwan

Ah, applying a patch to pppd helped, but now I get

```
Feb 15 01:12:26 [pppd] pppd 2.4.2b3 started by root, uid 0

Feb 15 01:12:26 [pppd] Using interface ppp1

Feb 15 01:12:26 [pppd] Connect: ppp1 <--> /dev/pts/5

Feb 15 01:12:28 [pppd] found interface eth0 for proxy arp

Feb 15 01:12:28 [pppd] local  IP address 192.168.0.1

Feb 15 01:12:28 [pppd] remote IP address 192.168.0.201

Feb 15 01:12:28 [pppd] LCP terminated by peer (5M-Mqo^@<M-Mt^@^@^BM-f)

Feb 15 01:12:31 [pppd] Connection terminated.

Feb 15 01:12:31 [pppd] Connect time 0.1 minutes.

Feb 15 01:12:31 [pppd] Sent 202 bytes, received 787 bytes.

Feb 15 01:12:31 [pppd] Connect time 0.1 minutes.

Feb 15 01:12:31 [pppd] Sent 202 bytes, received 787 bytes.

Feb 15 01:12:31 [pppd] Exit.
```

----------

## froke

Could you please explain how you applied the patch to pppd???

----------

## orviwan

I think i copied the patch to the ppp-2.4.2/pppd directory, then ran 

patch -p0 -i ./ppp-2.4.2-stdopt-mppe-mppc-0.82.patch

----------

## froke

But did you have to re-emerge ppp? Or compile it yourself?  If so, how do you get it to play nicely with portage?

----------

## orviwan

I downloaded the source, patched it then did configure, make, make install.

But I still can't get it to work, I get that LCP error above.

----------

## froke

Have you looked up that error?  I think LCP stands for L? Control Protocol.

----------

## ptfoof

LCP stands for Link Control Protocol

----------

## McManus

the trick that worked for me (as far as getting mppe to work) is adding the line:

```
mppe required,stateless
```

----------

