Ads

Friday, 26 August 2016


Sometimes in ubuntu, rc.local does not execute , specially in fresh installation.
So if you encounter this issue , you can solve it by using two methods.
I have used these methods several time with success. Also make sure you command entries are above ‘exit 0‘ line
Also adding 10 seconds delay helps in few cases.

Method # 1 , By Using WEBMIN
Method # 2 , By Removing -e from /etc/rc.loacl file [and add 10 seconds delay]

Method # 1 , By Using WEBMIN

Install webmin from http://www.webmin.com/deb.html
After installati0n is done, open webmin and goto
SYSTEM > BOOTUP & SHUTDOWN
Scroll down and and Click on rc.localSelect YES on Start at boot time?
As shown in the image below.

Method # 2 , By Removing -e from /etc/rc.loacl file

Edit rc.local file by
nano /etc/rc.local
at first line remove -e  for example
Change from
#!/bin/sh -e
to
#!/bin/sh
Save & Exit, then Reboot and see, hopefully rc.local will execute on the boot.
Also adding following sleep 10 directive before any script in rc.local will help. e.g:
Example of rc.local

root@ahmad-desktop:~# cat /etc/rc.local
#!/bin/sh -e
# rc.local
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will “exit 0” on success or any other
# value on error.
# In order to enable or disable this script just change the execution
# bits.
# By default this script does nothing.
# Add 10 seconds delay …
sleep 10
#Followign command will run my script for internet sharing etc / zaib
/etc/fw.sh
exit 0


Read More

Wednesday, 24 August 2016


dma415


DMASOFTLAB released patch 5 for Radius Manager 4.1 version. [Release Date: 10 Feb, 2014]


FIXES, IMPROVEMENTS:

-default service (srvid 0) find users issue problem fixed
-verification code and mobile number fixed in ACP / edit user
-invalid menu.css reference removed (buyiasmain_tpl.htm, adminmainblank_tpl.htm)
-traffic summary per NAS issue fixed
-connection allowed bug fixed
-multiple email address problem fixed in edit and new user forms
-privileged sim-use edit problem fixed
-enhanced syslog alerts [Helped a lot in troubleshooting now]
-swapped SMS / email alerts fixed (ACP / edit user)
-self registration welcome SMS / email issue fixed
-upon user removal accounting details are also deleted from rm_radacct
-duplicate batch billing problem fixed
-auto renewal uses unit fields instead of initial fields
-expired online time yellow color problem fixed in ACP / List users view
-password recovery updates radcheck for regular users only
-hotspot MAC account password change problem fixed (UCP)
-corrected user name in password recovery email
-bulk SMS custom tag issue fixed
-convert card prefixes to lower case in radcheck
-self registration displays user name, password
-zero gigawords issue fixed with a non Mikrotik NAS
-search users leading and trailing space issue fixed
-SMS, email expiry alerts issue fixed
-grace period account disable bug fixed
-negative deposit addition problem fixed [Good news for Alex]
-IAS duplicate mobile number problem fixed
-card generator issue fixed (PIN length > 10)
-next service issue fixed **** This bug was quite annoying and wasted many hours in useless troubleshoot😦 Jz
-properly logout grace period expired users
-rmauth IAS and card setup crash fixed
-increased CTS logging capacity (rmconntrack DELAY_KEY_WRITE option)






DEPLOYMENT:

Deployment is fairly simple.
First download the radiusmanager-4.1-cumulative_patch.tgz
Extract it any temp folder
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 radiusmanager-4.1-cumulative_patch/
ls

You may see following contents
root@rm:/temp/radiusmanager-4.1-cumulative_patch# ls
bin  raddb  readme.txt  www


Begin Deployment … Let’s Start

1. Copy PHP files to /var/www/html/radiusmanager (Fedora) or /var/www/radiusmanager [Debian, Oh yeah, That’s my Boy ;)] directory.
For Ubuntu
cp -vrf  www/radiusmanager/*  /var/www/radiusmanager
For Fedora
cp -vrf  www/radiusmanager/*  /var/www/html/radiusmanager
2. Chmod all binaries to 755:
chmod 755 bin/rm*
3. Stop rmpoller and copy the binaries to /usr/local/bin directory, overwriting the old versions.
service rmpoller stop
rm /usr/local/bin/rmconntrack # This line Requires ONLY if you get error of text busy

cp bin/* /usr/local/bin
4. Copy acct_users to /usr/local/etc/raddb directory.
cp raddb/acct_users /usr/local/etc/raddb
5. Change permission of acct_users by chmod:
chmod 640 /usr/local/etc/raddb/acct_users
chown root.root /usr/local/etc/raddb/acct_users
7. Restart radiusd and rm poller
service radiusd restart
service rmpoller start




Now relogin to ACP, and hopefully you see the 4.1.5😀
As showed in the image below …
dma415


Quick Copy Paste for Ubuntu [well tested with 12.4.x]

1
2
3
4
5
6
7
8
9
10
11
12
13
14
mkdir /temp
cd /temp
tar zxvf /temp/radiusmanager-4.1-cumulative_patch.tgz
cd /temp/radiusmanager-4.1-cumulative_patch/
cp -vrf  www/radiusmanager/*  /var/www/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

Regard’s
Syed Jahanzaib
Read More
As requested by few OP, following is a short technical reference guide on how you can enable TCP/UDP connections in Mikrotik to be stored in Radius manager connection tracking database so that you can view user base connection tracking report. In my personal view, it’s not much useful and at low end hardware it creates bottleneck, but if you have good resources with some fast storage (like SSD or RAID-10) it is better to set it up.
CTS is best described in the manual by dmasoftlab manual as mentioned below
Radius Manager has a special feature: the Connection Tracking System. It is available only in Radius Manager CTS version or higher. With the help of it the system can track and log all the TCP and UDP connections for all registered (online) users.
By default when You install the CTS enabled version of Radius Manager, it will use the default CTS database (CONNTRACK). It is strongly recommended to use a separate database host for the CONNTRACK database, due to the enormous amount of data stored daily. It can be even a 100-500 MegaBytes (and in my personal experience it can grow as much as 3-5 GB on busy network, ZAIB) per day. Fast disks (like SSD in RAID 10 mode,  zaib) are also recommended to be able to seek and store the data in real time. Radius Manager periodically stores the traffic data to CONNTRACK database (typically in
every 5–60 seconds).

Mikrotik (6.x) Configuration to enable Firewall Logging to remote server (RM)

If you have already configured the radius manager, then the conntrack database also get configured via the installation script. Next step is to enable the firewall logging in the mikrotik router so that mikrotik can send the categorized TCP/UDP data to radius manager conntrack database.
In mikrotik, open terminal and issue following commands …
In below example, we have following IP scheme.
PPPoE users ip pool = 172.16.0.1-172.16.0.255
Radius Manager IP  = 101.11.11.254
1
2
3
4
5
6
7
/ip firewall filter add chain=forward src-address=172.16.0.1-172.16.0.255 protocol=tcp connection-state=new action=log
 
/ip firewall filter add chain=forward src-address=172.16.0.1-172.16.0.255 protocol=udp connection-state=new action=log
 
/system logging action add name=rmctszaib remote=101.11.11.254 target=remote remote-port=4950
 
/system logging add topics=firewall action=rmctszaib
If you don’t see any errors , you are good to Go.

RADIUS MANAGER SECTION:

1. Radius Manager should be licensed with CTS level. Basic license wont gonna work ..
2. Make sure that  RMCONNTRACK service is UP and running.To make sure it’s running , get its process by
ps aux |grep rmconntrack
and you should get result something like following
root@radius:/# ps aux |grep rmconntrack
root xxxx 0.0 0.0 xxxxxx xxx ? Ssl 13:22 0:00 /usr/local/bin/rmconntrack
if you see its running, proceed further , otherwise you may start it manually by
rmconntrack –x
Now login to RM ACP  >  Reports  >  Connection Report
Here you can get report for all or individual user.
As showed in the image below …
c1

c2

Read More

Recent News