#!/usr/bin/perl # # pppd.startpap # Script to start PPPD using PAP authentication against the client, # and RADIUS authentication and accounting. # # Version 0.1 # Miguel A.L. Paraz # 6 October 1997 # # Modified for pppd-2.3.8 # Benjamin de los Angeles Jr. # 29 July 1999 use strict; use POSIX; # Local IP address. my $server_address = "203.176.5.145"; # Use auto-DNS assignment my $config_dns = "ms-dns 203.176.5.130 ms-dns 203.176.28.130"; # Main program. # Client IP address, per port. my %client_address_options = ( "/dev/ttyS3", "203.176.5.146" ); my $tn = ttyname(0); my $client_address = $client_address_options{$tn}; # Start PPP. if ($client_address) { # Make sure to set radius and radacct to the right port of your RADIUS # server in /etc/services exec ("/usr/sbin/pppd-radius $server_address:$client_address auth " . "refuse-chap require-pap radius radacct proxyarp $config_dns"); } else { print "PPP not supported on $client_address\n"; }