ValdikSS / openvpn-radiusplugin

Radiusplugin with various patches and fixes
GNU General Public License v2.0
43 stars 41 forks source link

How to set status and client-config-dir in radiusplugin.cnf #3

Closed dawei1 closed 7 years ago

dawei1 commented 7 years ago

I tried to point status to the actual status file generated by openvpn so that I can have traffic statistics of connected client but it seems the plugin just ignore it and nothing regarding traffic shows up in the radius database (login auth and other accounting info are OK). The same thing happens to the client-config-dir also, the actual client config file always appears in /etc/openvpn. Would you please show me how to properly set these two variable in radiusplugin.cnf? Thank you.

ValdikSS commented 7 years ago

You need to write full path in case you're writing relative. Radiusplugin supports only status files version 1 in case you changed it in OpenVPN configuration.

dawei1 commented 7 years ago

Thanks for the promptly reply. Yes I am using full path e.g. : status /etc/openvpn/server-status.log

And the version is set explicitly to 1. Is there any log from the plugin?

ValdikSS commented 7 years ago

Yes, you should be able to see plugin output in stdout/stderr. It can't write into logfile.

ValdikSS commented 7 years ago

Did you solve your problem?

dawei1 commented 7 years ago

Thanks for following up. Yes I solved the problem. I explicitly set the log version to 1, change the permission of the log file. Now the accounting function is working perfectly.