[ previous ] [ next ] [ threads ]
 
 From:  Morten Winther <freebsd at mwi dot dk>
 To:  m0n0wall at lists dot m0n0 dot ch, m0n0wall dash dev at lists dot m0n0 dot ch
 Subject:  External script auth to mpd - PPTP
 Date:  Sun, 06 Feb 2005 22:25:06 +0100
Hi

I've downloaded the image and modified a few things to allow external 
script auth.

vpn.inc changed:
$mpdsecret = "*\t\"!/usr/local/www/getpaswd.php\"\n";

This will call the script and expect the password back. However, mpd 
don't get it right.


getpaswd.php script added - My script is just a test script to send a 
test password:
--------------------------------------------
#!/usr/local/bin/php
<?php

if(trim($_SERVER['argv'][1]) != '-y' && trim($_SERVER['argv'][1]) != '-n')
 print "detvirker";

exit(0);

?>
--------------------------------------------

However, I get this error:

Feb 6 13:17:17     mpd: [pt0] CHAP: rec'd RESPONSE #1
Feb 6 13:17:17     mpd: Name: "Administrator"
Feb 6 13:17:17     mpd: Peer name: "Administrator"
Feb 6 13:17:17     mpd: Invoking external auth program: 
/usr/local/www/getpaswd.php Administrator
Feb 6 13:17:17     mpd: Invalid response
Feb 6 13:17:17     mpd: [pt0] CHAP: sending FAILURE
Feb 6 13:17:17     mpd: [pt0] exec: /usr/local/www/getpaswd.php -n 
Administrator
Feb 6 13:17:17     mpd: [pt0] LCP: authorization failed
Feb 6 13:17:17     mpd: [pt0] device: CLOSE event in state UP
Feb 6 13:17:17     mpd: pptp0-0: clearing call
Feb 6 13:17:17     mpd: pptp0-0: killing channel

Don't mpd have the rights to run this script? Script is chmod'ed to 777.


Best regards morten