FreeRADIUS Installation and Integration with Perl


apt-get install autotools-dev debhelper libgdbm-dev libiodbc2-dev libkrb5-dev libldap2-dev libltdl3-dev libmysqlclient15-dev libpam0g-dev libpcap-dev libperl-dev libpq-dev libsasl2-dev libsnmp-dev libtool python-dev

apt-get install mysql-server-5.5 libodbc1

cd /usr/src/
wget ftp://ftp.freeradius.org/pub/freeradius/freeradius-server-2.2.0.tar.gz
tar -zxvf freeradius-server-2.2.0.tar.gz
cd freeradius-server-2.2.0
./configure
make
make install

radiusd -X
^C


## RADIUS CONFIGURATION FOR Perl ##

tar -zxvf redis-2.6.14.tar.gz
cd redis-2.6.14/
make
make install
redis-server
^C

cd /usr/local/etc/raddb/modules/

vim module/perl


uncomment
{
...
#change path from example.pl to vopium.pl

module = ${confdir}/vopium.pl
...

func_authenticate = authenticate
func_authorize = authorize
func_preacct = preacct
func_accounting = accounting
func_checksimul = checksimul
func_pre_proxy = pre_proxy
func_post_proxy = post_proxy
func_post_auth = post_auth
func_recv_coa = recv_coa
func_send_coa = send_coa
func_xlat = xlat
func_detach = detach

}

:wq!

vim sites-enable/default

authorize {
#comment all and add
perl
}

authenticate {

#comment all and add
digest
perl
Auth-Type Perl {
perl
}
}
preacct {

#comment all and uncomment below lines
update request {
FreeRADIUS-Acct-Session-Start-Time = "%{expr: %l - %{%{Acct-Session-Time}:-0} - %{%{Acct-Delay-Time}:-0}}"
}
# Add perl
perl

}

accounting {

#comment all and add
detail
perl

}

session {
#comment all
}
post-auth {

#comment all
}
pre-proxy {

#comment all
}
post-proxy {

#comment all
}

:wq!


vim sites-enable/inner-tunnel

authorize{

#comment all
}

authenticate {
#comment all
}

:wq!


cd ~

radiusd -X

2 comments:

  1. Hi, Great article. What would be the vopium.pl script ?

    ReplyDelete
  2. its a sample perl script. Change it with yours.

    ReplyDelete

How to compile and run a next application ?

Install nodejs Use  this  link for further reading curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.0/install.sh | bash nvm inst...