Git Product home page Git Product logo

softether-radacct's Introduction

SoftEther RADIUS accounting PHP script Copyright (C) 2015 Andras Kosztyu ([email protected])

So I thought I'm not going to wait for others to finally create an accounting mod for SoftEther, and dnobori have no reason to further extend his work. This script is something I wrote in a weekend so I could integrate SoftEther into other parts of my system that already fully use RADIUS.

How does this work? The SoftEther server sends HUB security logs to a remote Syslog-ng server, which execute the scripts when the filter matches. These scripts do accounting start and stop, while interim update is done through cron. The parsing of the syslog is adjusted to english logs, with the softether using DHCP.

The scripts are created for my needs, it is not guaranteed to work with your settings. They are not optimized and have not been tested in production environment.

  1. Install a syslog-ng server and create new listener based on the example ( syslog-ng_softether.conf). (cd /root && wget http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm && rpm -Uvh /root/epel-release-7-5.noarch.rpm && yum -y install syslog-ng )

  2. Install PHP, SQLite and place the PHP files somewhere. ( yum install php php-pdo -y && mkdir /var/radius )

  3. Install radius client utility.( yum install freeradius-utils -y)

  4. Modify the settings.php according to need. Add the new client to the RADIUS server.

  5. Restart syslog-ng server.

  6. Modify the SoftEther to send syslog to the syslog-ng server.

  7. Disable SELinux (!!!)

  8. Profit. For interim RADIUS updates, setup a crontab with interim.php. For archiving old log files, setup a crontab with archive.php, it will gzip every logfile older than 1 day and remove older than 365 days.

softether-radacct's People

Contributors

kosztyua avatar m0zart89 avatar atmouse- avatar

Stargazers

Cyrus avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.