Note: we are keeping these very old instructions around
until someone updates them, and this page contains many things now
that are no longer true with current versions. If you find a problem,
please report it to the mailing list. -- James Cameron,
2005-11-16.
PPTP + MPPE + RADIUS + MySQL
Requirements:
Should be present in most distributions these days: Caveats: MPPE encryption seems to be available with MS-CHAP authentication only. Not PAP and CHAP. This document assumes only MS-CHAP v2 is used. (As version 1 is totally broken securitywise.) PPP and kernel:
Note: patching the kernel is only required if you are using a kernel version below 2.6.15-rc1 -- James Cameron, 2005-11-16. Compile and install your kernel and modules. I take it everybody knows how to do this and update their lilo/grub/whatever bootloader.
Note: current versions of modutils already have these aliases, you may not need them. -- James Cameron, 2005-11-16. Now is as good a time as any to reboot with your MPPE enabled kernel. (Some docs tells you to install ppp before reboot. Reason unknown, it shouldn't matter.) Compile and install ppp. MPPE and ms-chapv2 support is compiled in by default. PoPToP: Compile and install. Nothing fancy needed, as it's pppd that does the magic. PoPToP and pppd Configuration:
In my /etc/pptpd.conf I have This is just for clarity, the default is off course /etc/ppp/options The clients get remoteip from radius, so we don't need it here as they will be overridden, but you could have them for clarity/confusion/easy testing without radius...
I only use mschap-v2, so my /etc/ppp/options.pptpd file is: Note: It might be "chapms" and not "mschap" as changes might be happening in the cvs. Note: nologfd option may need to be placed above the plugin line in order to prevent a serial line loopback event. -- James Cameron, 2005-08-15. The radius.so plugin uses the settings from radiusclient, so make sure:
/etc/radiusclient/servers contains the secret for your radius
server(s) If the radius is on localhost using the default freeradius secret (bad idea off course...) I think you must have the dictionary.microsoft file in /etc/radiusclient if you use ms-chap 1 or 2. It should be there by default. Set authserver and acctserver in /etc/radiusclient/radiusclient.conf if your radius server is not on the same machine as your poptop. This file sure makes splitting authentication and accounting between two radius servers very easy. Make sure both servers(if different) are listed in /etc/radiusclient/servers Freeradius: Compile and install. Also has all we need by default. Freeradius configuration: /etc/raddb/clients.conf: Should contain entries corresponding to the servers in /etc/radiusclient/servers for the client/NAS (our pptp server):
client 127.0.0.1 { /etc/raddb/radiusd.conf: This is the relevant parts of my radiusd.conf for authentication and accounting in MySQL. Thanks to Charles J. Boening (charlieb@cot.net) for this. Just remove the sql parts if you don't want them, and add files or unix module or something.
Modules { set the correct server, user and pass in /etc/raddb/sql.conf MySQL: Mysql configuration should be trival, and basically consists of:
Create a database called for example "radius" in mysql.
Fill it with the tables from the schema found in
mysql radius < /path/to/db_mysql.sql Populate your tables with usernames, passwords, reply items and so on. Consult the radius docs for more info. Windows Clients: Remember, you need 128 bit encryption support. Win98/95 users needs dun14 update. VPN connection properties: require encryption and allow ms-chap v2 protocol Good luck. ChangeLog
|