Recording bandwidth used by wifi clients sounds like a relatively simple task. $90 and far too many hours later I can assure you that for a person without much network experience it can be deceptively challenging.
This article is a quick guide describing how to configure DD-WRT, Chillispot and Freeradius for the specific use case of mac-address freeradius authentication and accounting. It also briefly touches on web-based admin solutions. A radius server handles authorisation and accounting (ie: counting of bandwidth used by wifi users). The Chillispot instance within DD-WRT funnels all wifi clients through this authorisation and periodically, (if so configured), dispatches accounting packets to the radius server.
The Purpose
The purpose of my configuration is to restrict access to my wireless network and monitor the bandwidth consumed by authorised users. Consequently, the setup which this article describes is not orientated towards a hotspot, as all authentication is performed based on mac addresses.
The main focus of this post is on configuring a Chillispot instance within a router running DD-WRT. For information about setting up free radius check out the following sites:
- http://wiki.freeradius.org/
- http://www.howtoforge.com/authentication-authorization-and-accounting-with-freeradius-and-mysql-backend-and-webbased-management-with-daloradius
The Pieces
- A router running DD-WRT
- A configured free radius server
DD-WRT and Chillispot
Full versions of DD-WRT come bundled with Chillispot, however getting Chillispot and free radius using mac-address authorisation to play nicely can be a little bit tricky. The main thing to remember is that DHCP servers within DD-WRT should be disabled as Chillispot contains its own DHCP server. It may be possible to get the various instances to exist harmoniously but the simplest solution for me was just disable them. To configure DD-WRT:
- Disable the DHCP server under setup, untick all checkboxes relating to DNSMasq.
- Disable DNSMasq under the Services tab.
- If you haven’t already, you should probably set some form of security for your wireless network.
- Enable Chillispot under Services->Hotspot.
Configuring Chillispot
The following image details my Chillispot setup:

Chillispot configuration in DDWRT
Most of the parameters are relatively self explanatory. More information can be found here: http://www.dd-wrt.com/wiki/index.php/Chillispot. The parameters of note are:
- The UAM secret is irrelevant for mac-address based authentication. (It is passed by Chillispot to a login script. Mac-based authentication does not require a login script).
- The shared key should correspond with the secret set in your freeradius client configuration (located at /etc/raddb/clients.conf for me).
- UAM allowed is a comma-delimited list of sites unauthenticated users can access.
- Setting MACAuth to true causes Chillispot to make an authentication request against free radius when a user joins the wireless network, where User =%MAC_ADDRESS%, Pass = Password. %MAC_ADDRESS% is replaced with the user’s mac address, Pass, by default, is literally the string “Password”.
- The additional Chillispot option of macpasswd changes the default password used for mac-address authentication, in my case to “sushi”.
Configuring a Radius user account
Rad-check attributes:
- username = %MAC_ADDRESS%
- User-Password := “Password” (or the value set by macpasswd)
Rad-reply (accounting) attributes:
- Acct-Interim-Interval := 300
- Idle-Timeout := 600
The above attributes cause Chillispot to send updates about bandwidth usage to the radius server every 5 minutes. If a user has been idle for 10 minutes their session is terminated.
That’s all you need! You should have a (mostly) functioning setup at this point in time, the rest of the article is focused on web-based admin tools.
Web-based Administration
Free Radius:
- Dalo Radius allows you to create user accounts from a web-based interface for your radius server. It requires that your radius server is configured via MySQL. http://daloradius.com