I'm using Shibby's firmware 1.28.0000 MIPSR2-097 K26 USB AIO. I'd like to get every VPN connection logged at least with time stamp, ip and user name and of course a GUI solution to set it up would be the best way.
I'm currently using a script to get that function but it has some flaws. Poptop scripts ip-up and ip-down are rewritten in certain situations and my script doesn't get executed.
#!/bin/sh logfile=/opt/log/pptp.log poptop=/tmp/pptpd upscript=$poptop/ip-up downscript=$poptop/ip-down datecommand='$(date +"%F %T")' usertext='$PEERNAME@$6 ($5)' uptext='connected' downtext='disconnected' if [ -d $poptop -a -f $upscript -a -f $downscript ]; then grep -q $logfile $upscript if [ $? -ne 0 ]; then echo "echo \"$datecommand - $usertext $uptext\" >> $logfile" >> $upscript fi grep -q $logfile $downscript if [ $? -ne 0 ]; then echo "echo \"$datecommand - $usertext $downtext\" >> $logfile" >> $downscript fi fi
If anyone knows a way to make my script work perfectly, I'd appreciate it.
Another thing I'd like to get is a way to recognise the connected VPN user from other programs (without authentication). Meaning VPN users should have static IPs or different subnets. Is this possible somehow?
PS. This is not probably the best forum section to post because I'm more like asking for help, but I'd like these things to get in GUI so that's why I post here.