No doubt, Radius billing is one of the most important point of focus in any ISP network. ISP finance depends on this system to work smoothly. There are various ready made radius application based on LINUX are available in the market to cater different requirements of various operators. Among many, Dmasoftlab radius manager is one of the most cheapest but feature rich radius candidate. It provide variety of options for any ISP. Its full features can be viewed at Radius Manager web site. It required very little resources to run, provide plenty of user administration functions, backup / restoration / management is quite simple as well. plus in background you can accompany it with many scripting of your own to perform various customized functions.
We all know that cloud is every where now and almost all hosting providers are now providing latest versions of operating system like Centos 7. Some of us are well aware that DMA Radius Manager is quite comfortable with following flavors of nix …
- Ubuntu 12.4 / 32bit [*** Best OS & my personnel choice, as recovery & troubleshooting is much easier in this variant]
- Centos 6.5/6.6
But now a days many operators are switching to cloud where hosting providers are not providing older versions of centos/ubuntu. As i had to do few installation on cloud for few clients & I had to recall all the bits & bytes to do the installation every time, therefore I am posting step by step copy paste friendly version of guide on howto install Radius Manager in Centos 7. I posted ready made scripts for Ubuntu 12 Installation Script &Centos 6 in previous guides but This one is for Centos 7 to make installation quicker. I will make its script but better to do it manually as Centos 7 is a bit tricky which will give you some tough time in various aspects
- OS Used in this guide = CentOS Linux release 7.3.1611 (Core)
Steps:
1# Disabling Firewall to avoid interruption
First we will update YUM & install nano for easy text editing, as many of us are not much comfortable with VI. NANO is better …
yum install update yum -y install nano
* Disable IPTABLES
service iptables stop chkconfig iptables off
* Disable SELINUX
So that it may not interfere with our installation/accessing. To disable builtin firewall permanently in centos, edit following
nano /etc/selinux/config
and change the
SELINUX=enforcing
to
SELINUX=disabled
Save & Exit .
*Disable Firewall(Daemon)
Now Disable Firewall’Daemon’ so that it may not interfere with our installation/accessing
systemctl status firewalld systemctl stop firewalld systemctl disable firewalld
Reboot system to take effect.
2# Installing various supporting modules !
1- Installing EPEL Repo to download various other supporting packages like mysql,apache etc
rpm -ivh https://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-9.noarch.rpm yum -y install mc wget crontabs make gcc libtool-ltdl curl mysql-devel php php-mysql php-gd php-snmp php-process ntp alpine mariadb-server mariadb php-mcrypt cronie wget net-tools psmisc yum -y install glibc.i686 libgcc_s.so.1 systemctl start mariadb.service systemctl enable mariadb.service
3# Configuring Mysql Section
Now initiate mysql initial setup
mysql_secure_installation
Above command will ask few queries, read and select accordingly. ** Make sure to setup mysql root password **
*Now start / enable APACHE services
systemctl start httpd.service systemctl enable httpd.service
4# Adding IONCUBE module in PHP
Verify your PHP version by php -v
& copy the iocube load accordingly.
At my station, I had `PHP 5.4.16 (cli) (built: Nov 6 2016 00:29:02)` version installed by YUM.
wget http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz tar -xvzf ioncube_loaders_lin_x86-64.tar.gz cd ioncube mv ioncube_loader_lin_5.4.so /usr/lib64/php/modules/ chmod 777 /usr/lib64/php/modules/ioncube_loader_lin_5.4.so
Now add ioncube library in php
nano /etc/php.ini
and add following line after [PHP] heading, usually this heading is in first line.
zend_extension = /usr/lib64/php/modules/ioncube_loader_lin_5.4.so
& restart APACHE service so it can load the new module
systemctl restart httpd.service
re-run ’php -v‘ to verify you have something like [if successfull]
PHP 5.4.16 (cli) (built: Nov 6 2016 00:29:02) Copyright (c) 1997-2013 The PHP Group Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies with the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com unconfigured) v6.1.0 (), Copyright (c) 2002-2017, by ionCube Ltd.
5# Download FREERADIUS & compile.
cd /temp wget http://www.dmasoftlab.com/cont/download/freeradius-server-2.2.0-dma-patch-2.tar.gz tar -xvzf freeradius-server-2.2.0-dma-patch-2.tar.gz cd freeradius-server-2.2.0 ./configure make make install
Above may take some time to compile. After its done, issue following command to initiate radius
radiusd -X
If you get error in first attempt, try to run it again, and you may see following message on success
Now press CTRL+C to return to command prompt.
6- Radius DB creation in MYSQL
Create mysql DATABASES for radius usage. Make sure to change the passwords where required, example mysql root password. It’s OK to use default passwords for the test flight, but for production server Its Highly recommended to use different passwords while you do the installation.
mysql -u root -pYOURMYSQLPASS CREATE DATABASE radius; CREATE DATABASE radius; CREATE DATABASE conntrack; CREATE USER 'radius'@'localhost' IDENTIFIED BY 'radius123'; CREATE USER 'conntrack'@'localhost' IDENTIFIED BY 'conn123'; GRANT ALL ON radius.* TO radius@localhost; GRANT ALL ON conntrack.* TO conntrack@localhost;
7# Download & Install RADIUS MANAGER 4.1.0
cd /temp/ wget http://wifismartzone.com/files/rm_related/radiusmanager-4.1.0.tgz tar zxvf radiusmanager-4.1.0.tgz cd radiusmanager-4.1.0 chmod 755 install.sh # Now start the Radius Install Script. # once you will run INSTALL.SH , it will ask various queries, select according to your OS choice ./install.sh
8# Access Radius Manager Administration Panel
Now try to access your radius manager admin panel from any browser pointing to ..
If all ok , you will see following window in your browser
* Default ID Password
ID = admin
Password = 1111
Enjoy,
~*~*~*~*~*~*~*~*~*~*~*~*~*~*~
If you see error or blank page, use following Apache error/access logs for further trouble shoot. Most common causes are invalid license files / in-correct php ioncube files.
tail -f /var/log/httpd/error_log tail -f /var/log/httpd/access_log
# TIPS
TIP#1 – How to create Virtual NIC with customized / cloned MAC address
First check what ethernet name you have currently, mostly its eth0, [change it according to your network].
ip link add link eth0 address 00:11:22:33:44:55 eth0.1 type macvlan ifconfig eth0.1 up ifconfig eth0.1 10.0.0.2
Verify if NIC is created with our desired NIC as well.
ifconfig
# Restart APACHE service if required, YKWIM ; )
systemctl restart httpd.service
TIP#2 – Deploying PATCH 4.1.5 for Centos
DMA released few patches for its radius application. Latest version is 4.1.6 , but I usually prefer to go with 4.1.5. Following is quick copy paste version to upgrade. Make sure that you have proper working installation of radius manager & if you are not much familiarized with the restoration process then you should backup your current installation before proceeding.
# SYED JAHANZAIB # HTTPS://AACABLE . WORDPRESS . COM # AACABLE at HOTMAIL dot COM mkdir /temp cd /temp wget http://wifismartzone.com/files/rm_related/radiusmanager-4.1-cumulative_patch.tgz tar zxvf /temp/radiusmanager-4.1-cumulative_patch.tgz cd /temp/radiusmanager-4.1-cumulative_patch/ cp -vrf www/radiusmanager/* /var/www/html/radiusmanager chmod 755 bin/rm* service rmpoller stop cp bin/* /usr/local/bin cp raddb/acct_users /usr/local/etc/raddb chmod 640 /usr/local/etc/raddb/acct_users chown root.root /usr/local/etc/raddb/acct_users service radiusd restart service rmpoller start
For more information, please refer to
Dmasoftlab Radius Manager 4.1.5 Patch
Note: If you find any errors in this guide, please do let me know
Thanks & Best Regard’s
~SYED JAHANZAIB~
Filed under: Radius Manager
