[pptp-server] Live IP logging. Redesigned..

George Vieira GeorgeV at citadelcomputer.com.au
Mon May 6 18:15:49 CDT 2002


Hi all,

I haven't been on the list for a long time and currently still not on the
list but I've made changes to the PPPD ip-up.local script which logs the
live IP to a log file and thought you guys may like it as it doesn't use
GREP which is messy and slower. With little more effort, I could write it to
log the authenticated username against the Live IP as well..

Here's my script, I didn't bother with the output being as eg.
[203.0.100.23] 

[root at firewall bin]# cat /etc/ppp/ip-up.local 

#!/bin/bash

DATE=`date +\"%d/%m/%y\"`

PPPLCK="/var/run/$1.pid"
PPPPID=`cat $PPPLCK`

PPPPAR=`ps -h \`ps -lh $PPPPID | awk '{print $4}'\``

PPPIP=`echo "$PPPPAR" | awk '{print $6}'`

echo "$PPPIP"

# $PPPIP appears as [A.B.C.D]
echo "[$DATE] $PPPIP " >>/var/log/pppd.log



thanks,
George Vieira
Systems Manager
Citadel Computer Systems P/L
http://www.citadelcomputer.com.au




More information about the pptp-server mailing list