How To Setup a Wi-Fi Hotspot

A How To for DD-WRT, FreeRadius and Chillispot.

Creating a Wi-Fi Internet hotspot service from scratch can seem like a daunting task. I had many sleepless nights trying to get to grips with FreeRadius, DD-WRT, Chillispot etc. I hope that this How To helps you to avoid some of the problems I encountered along the way.

Regards Sean Bracken

********Warning ********

Following these instructions may invalidate your Linksys warranty. You do so at your own risk. These instructions assume that you have an understanding of Linux, PHP MySQL and Apache. If you brick your AP you might get it back by holding down the reset pin for 20 seconds, unplug the power while still holding down the reset button for another 20 seconds and then plugging the power back in while still keeping the reset button held in for a further 20 seconds. This should bring it back to the defaults of whatever firmware you have installed. You should be able to login to

*******End of Warning********
Feel free to copy or use this information in any way you like.

What you will need:-

Download the latest version here

b) FreeRadius
Download the latest version here

c) phpMyPrepaid
Download the latest version here

d) Linsys WRT54GL AP

e) You will also need PHP, Apache, MySQL amd MySql Delopment Modules,(These need to be setup first.) some patience, plenty of coffee and cigarettes.

Step 1 DD-WRT/Chillispot Configuration

Configure the WRT-54G with the standard Linksys software and the use the upgrade firmware module to install the dd-wrt package on the AP.
*******IMPORTANT******* Use your cable connection to do the upgrade. NOT the wireless connection.
Reboot the AP and login to your new firmare.
Set Dynamic configuration DHCP
Disable DHCP (Chillispot will manage DHCP for your clients.)
Change the Local IP of the AP to
Set your gateway and DNS addresses.
Update changes and log back in to the new IP address.

Go to the administration page.
Enable Chillispot
Enter the IP address of your Radius server.
Enter the DNS.
Enter the redirect URL eg HTTPS:// (MAke sure that the address ends in / and is https.)
Enter a shared key. (This can be anything you like, but keep a note of it you will need it later.)
Set DHCP Interface to Lan+Wlan
Enter a NAS id (Your name for your AP)
Enter a UAM secret (This is the password that Chilli will use to talk to hotspotlogin.cgi)
Save your settings and reboot the AP. Please give the AP about 10 minutes to reboot and initialise all the new services.

Step 2 FreeRadius Configuration.

Untar the FreeRadius tar file and enter its directory.
Type ./configure --with-experimental-modules
login as root and type make install
When this is finished copy the radiusd.conf file that you downloaded earlier to /usr/local/etc/raddb/
You should not need to edit radiusd.conf
Edit /usr/local/etc/raddb/sql.conf and in the SQL section make these changes.

# Database type
# Current supported are: rlm_sql_mysql, rlm_sql_postgresql,
# rlm_sql_iodbc, rlm_sql_oracle, rlm_sql_unixodbc, rlm_sql_freetds
driver = "rlm_sql_mysql"

# Connect info<br>
server = "localhost"<br>
login = "yourlogin"<br>
password = "your password"

# Database table configuration
radius_db = "radius"

Edit the /usr/local/etc/raddb/clients.conf file and enter the details of your NAS (AP)

client { (This is the address of your NAS or WRT54G )
secret = xxxxxxx (The secret you entered in the Chilli Config)
shortname = private-network-9 (This can be any name)
nastype = other
( If you want to set up several AP's with one secret the IP address above should be )

Step 3 hotspotlogin.cgi
Copy hotspotlogin.cgi from to /var/www/cgi-bin

Edit the file and change the secret to the UAM secret that you entered in the Chillispot configuration on the WRT54G.

You can also use a php script. It is not as secure as the cgi script but easier to personalise. If you want a copy email me at [email protected]

Step 4 phpMyPrepaid and MySQL

Extract the phpMyPrepaid file to a directory on your webserver eg /var/www/html/myprepaid
Create a MySQL database called radius and create a user and password for it. Use a script called db_mysql.db that you will find in the phpMyPrepaid download to create the database tables.
Edit the dbconnect.php file in the phpMyPrepaid directory and enter the username and password for your MySQL radius database. IMPORTANT Save this file behind your web directory or your passwords will be easy to hack.
Edit and change the line that points to dbconnect to wherever you have saved dbconnect.php
In your web browser got to and create some tickets. Check your database to see if the users have been setup in radcheck. Launch FreeRadius as root with this command radiusd -xxyx -l stdout. Pick a user and password from your database and try to login from a wireless client. If you can then it is time for step 5. If not go back to step 1 and check everything.

Step 5 Have a cup of coffee and unwind. If all is well you have finished. I'll keep an eye on this post and do my best to help anyone with problems.

I have setup a free Radius test area for people that have no access to a Radius server. You can use this service to test your Chillispot configuration. The address is

I would welcome any feedback from this article and will do all I can to help any of you with problems.

[email protected]

Share this page:

Suggested articles

35 Comment(s)

Add comment


By: Anonymous

Another alternative to this software configuration is the WiFiDog client+server application developed by the Montréal-based community WiFi group, IleSansFil (translates to Island Without Wires).

It comes with all the features you mentioned above, along with some other features that foster community growth around the WiFi hotspot. See IleSansFil's auth server installation here.

By: Sunny Ali


 Anyonoe offering a solution where I don't have to install anything in my router? In other words I would like to install my own server for radius/authenticaiton/billing/CC processing etc. And I don't want to touch the router. this way I use whatever router I like instead of having any limitations on the type of router to be used.

 I am fine to use a paid service. Please contact me if anyone have a solution.


 Sunny Ali

By: tj

hi, i recently installed dd wrt firmware into my linksys wrt160n and it works just fine until i hit the restore to factory default setting... after doing so, i couldn't access, i tried resetting my router by pressing the reset button but it did not work. i even tried reformatting my pc and still my router is not working. i did everthing i used to do whenever im resetting my router. please help me. what should i do now? i got version 1 of linksys wrt160n. please email me at [email protected]



By: tjgr-m

i can help you, just buy our equipment, just plug it into your internet router.

Main Features

  • Commercial class server software with time and traffic enforcement
  • Simple generation of users/cards accounts and vouchers / prepaid cards.
  • Bandwidth and user access control and management
  • Built in firewall and network security
  • Generate and Print Voucher Codes & User Accounts
  • Usage and sales Reports
  • MAC Authentication
  • Accept Credit Card and Paypal Payments <-- reveneu sharing, you get 50% profit 
  • Customizable Splash (landing page)
  • The ability to brand and advertise your services.
  • User Sign-up and Credit Card Payment. <-- reveneu sharing, you get 50% profit 
  • Your own pricing suitable to your clientele and location. 
  • Direct User support.
  • Remote admin management
  • Additional hotspot repeaters can be added at anytime.

price: $350 main hotspot router, $250 for additional repeater. we will setup the router for you, after setup/configuration, your device is plug n play.

email me if you're interested. my email is [email protected]


By: Anonymous

Some of the links in this tutorial have expired. I am adding the latest versions of all programs to the download page on I will have everything finished in the next few days,

By: Anonymous

Rather than mess with your router firmware, you can try myWIFIzone's captive portal service. Install their free blocking software (Windows XP and 2K only) and set up an account with them and you can then set up a customized captive portal page for your WIFI zone. Service is free during their Beta test phase.

By: Anonymous

phpmyprepaid is now hosted on sourceforge. is no longer running.


Carl Peterson

By: Anonymous


Thanks for all of the good comments about this tutorial. I've tried to keep the setup simple, however I've been inundated with support requests over the last several months. I'll continue to offer free advice and support as before and in addition I am now offering a complete installation service for FreeRadius and phpMyPrepaid. Contact me at [email protected] . Please bear in mind that each installation takes about two or three days, so I'll have to cover my expenses.



By: worldspot

No more need for complicated radius or http server. provides advanced hotspot management services compatible with chillispot, dd-wrt and all other linux platforms.

All you need to run your hotspot is a linux compatible wifi router that is connected to the internet.

Worldspot offers advanced features like:

  • Multiple hotspots management
  • Connection history for all hotspots
  • Advanced access profiles features. There can be limitations set by the hotspot owner. These are valid over multiple connections.
    • Total connection time allowed.
    • Total upload volume allowed
    • Total download volume allowed
    • Total upload+download volume allowed
    • Maximum upload rate
    • Maximum download rate
    • Limitation reset time: All the above limitations can be reseted after a specified period of time from the first connection or the previous reset. This allows users to connect 1h per day, or limit to 1gb per hour...
    • Expiration time: The access expires after a specified amount of time from the very first connection. For example you can offer 2h per day during one week.
  • There can be multiple access profiles the user can choose.
  • The access profiles can be applied on several hotspots. Users can get their connection state valid on all your hotspots.
  • Private accounts (or tickets) management. These are associated to an access profile, so you can create a wide commercial offer to your clients.
  • Mass ticket creation
  • Wysiwyg hotspot welcome message edition with image and flash uploads.
  • Wysiwyg tickets customization and printing

Coming soon (the order may change):

  • multiple language translation
  • Wysiwyg full welcome page customization (unbranding)
  • MAC address authentication
  • Online payment


For those who find this information too techy and looking for an easier solution, visit

 They are offering a free HotSpot firmware for those who'd like to start their own paid HotSpot service. The solutions are:

 HotSpot PRO

- Start a paid HotSpot service for $0 setup and $0 monthly fee
- Create your own tariff, choose from 16 currencies
- Manage your HotSpot packages, prices, bandwidth and traffic limits
- Free 24/7 monitoring service (they alert you when the router is down

HotSpot FREE

- Start a free HotSpot service
- Limit accesses with access cards

They also have a great multi-language customer support. 



 I've just signed up for the PolkaSpots white label hotspot in a box solution. (

 Effectively they do all this for you, include brand the login screens, deal with paypal, credit card generation, customer care etc. We've been using them sucessfully in the UK now for about 5 deployments and love the ease of use, simplicity and also reliability.

 The best thing is the centralised management screen where all changes to the hotspot boxxes are made. This means that you can monitor your locations remotely realtime!

Hope this helps



This howto gives you the power to set up a really nice hotspot for a business.  None of the other easy solutions will let me auto generate a 4 digit user and password that is good for 1 hour and expires in 2 hours that will automatically get printed on the register recipt.

 This solution is open enough to easily do that (we have a linux Point of sale system at the counter) so every recipt has a code that allows wifi access for 1 hour.  cuts down on leeches big time and customers dont have to request access or get their own code or worse give out their email address.

By: Anonymous

I want to set up a home hotspot as school asingment. Please help


Just a note: this tutorial is featured in this article:

How to Make Money with Wi-Fi Hotspots?


The idea here is to own your own hotspot 100%, no one else involved.

We developed the WiFi Gator project to do just that.
All of the other links above point you to revenue sharing hotspots which misses the point of this tutorial which is to roll and own your own hotspot.

Over at we are the driving force behind the chillidog thread, we have taken the best of chillispot and wifidog. We took that development and created a hotspot management system that has almost every feature that worldspot and sputnik boasts.

We have a live DVD, just boot it up and click "install" Then reboot from the harddrive, everything you need is now up and running. point your routers chilispot to the IP of your new server and there you have your captive portal.

Supports unlimited hotspots, assign multiple paypal accounts to individual hotspots, Create batches of prepaid tickets with the hotspots logo (displayed in a dynamic PDF for accurate printing), Excel generated reports for prepaid ticket activity, Individually set up each hotspots payment plans(Time and prices). Every hotspot landing page has a web based wysiwyg editor.

You own it, You keep all the money, check it out at

We have worked out the bugs and added many features. Setting up a world class hotspot is not easy and the response we have gotten in the past few months that we released this has been overwhelmingly positive.



Hi Loren, seem to be doing a similar setup with a self contained router billing hotspot. They don't use chili or radius which keeps the size much smaller and simpler.

Keep up the good work !




I am now providing a complete HotSpot service to anyone who feels that the DIY solution is too complicated. This includes customised login pages provided free of charge, PayPal payments etc.Details are at Jabali has been down for a long time now, but the latest phpMyPrepaid is on sourceforge. 



Sean Bracken 


By: Vince

This was too complicated for us.  We also wanted to do billing and tickets so we could charge for access.  We ended up getting a complete kit from  It has a built in interface for setup and the we were able to print prepaid tickets that we give out with purchases.

By: Paul

I checked that one out, which was good.  The same company also has an all in one hotspot router/server/access point for sale at which is what I am using.  This way I don't have to rely on a third part server or pay any monthly fees.  Everything is self contained.  I would recommend checking it out if you don't want to program your own server.

By: Anonymous

you can go for pay version of there you can manage you router remotely .

By: Anonymous

One more hotspot based on Chillispot

By: Theodoros

We are providing internet access (paid) to hotel guests through desktop pc's and we are now ready to provide also paid wifi access. The problem is that we want to use our existing website website for authentication and billing in order to be the same with the other internet access service. We started with Linksys WRT54GL and we are not sure with otions to use. We already installed the DD-WRT firmware but again we cannot set it up for communication. We want the authentication to be done by our service and communicate with the router for billing purposes. i.e after the user is authenticated by our website to tell the router to allow the guest to browse for specific time and when the user if finished to give back the time used to our website for billing.

Is there any expertise on that ?




By: max


we have a radius platform to manage several hotspot scenarios (prepaid and postpaid billing based on time or traffic data volume). If you need help to arrange any kind of solution for your business contact us at email address [email protected] and we can think the best option for your setup.


By: Anonymous

Seems your links have been hijacked by some one else. Please verify.

By: Anonymous

Even though the links are broken, I have figured out the actual locations.

that is all current links, the test page that was setup by the author is the only missing link.

By: zeeboy

 i use OS freeBSD, using chillispot and freeradius, but i have message error on my radius server. this is messages error from /var/log/messages.

May 18 03:01:05 pelatihan chillispot[1754]: tun.c: 603: 17 (File exists) write() failed

May 18 03:01:05 pelatihan chillispot[1754]: dhcp.c: 234: 6 (Device not configured) ioctl(SIOCSIFFLAGS) faile

May 18 03:01:05 pelatihan chillispot[1754]: dhcp.c: 213: 6 (Device not configured) ioctl(SIOCSIFFLAGS) faile

May 18 03:01:05 pelatihan chillispot[1754]: dhcp.c: 281: 6 (Device not configured) ioctl(SIOCSIFADDR) failed

May 18 03:01:05 pelatihan chillispot[1754]: dhcp.c: 549: 6 (Device not configured) ioctl() failed

May 18 03:01:05 pelatihan chillispot[1754]: chilli.c: 3503: Failed to create dhcp

 please help me..

By: pandu

Great tutorial!!..

 If you want an easier way, you can also install easyhotspot, which is an ubuntu live cd, that has all the components for Hotspot billing system (Freeradius, chillispot, mysql) and a frontend web management to manage users and vouchers. All you have to do is download the iso, burn to CD, install to your computer then attach the AP to your PC and your ready!. Easyhotspot is also opensource!  

 There is also a cloud service easyhotspot nano makes it easier to setup a wifi hotspot


hey Sean nice work!

i appreciate your good work, keep it up. how about financialy disabled and computer dummies that want to set up hotspot to control the billing of a little wireless connection?

pls email me instructions.

By: Brandon

there is lots of information wrong and or missing in this tutorial :(

files mentioned that come with phpmyprepaid don't exist anywhere in the directory tree... like dbconnect, table create, etc...

so yes I'm having problems, https://ipaddy/cgi-bin/hotspotlogin.cgi/ gets internal server error... no clue why..

http://ipaddy/phpmyprepaid/www/install/setup.php gets forbidden... I ran chmod -R ugo+rx to it.. still nothing..

anyone able to link me to a better tutorial or help me?


Great but complicated.
I think it is much easier and quicker to use Wiwiz HotSpot Builder.

By: Jason

Everyone is 'promoting' their own hotspot solution in the comments. I have tried about 20 solutions and ended up using the free service of This is a cloud-based, hosted hotspot service.

 Don't waste your time with other solution, nor setting up, operate and maintain your own servers or hardware or software, provide support and other stuff, it just ot worth it.

By: Anonymous

"Everyone is 'promoting' their own hotspot solution in the comments. I have tried about 20 solutions and ended up using the free service of"

Would "Jason" be Marko or Roland?  lol

Nice try guys.



      I like your document on setting up the wifi hotspot. But i will like you to give a more 

detailed explanation on how you carry out the step 4.

 Thank you


By: Anonymous

Hi dude,

You have done such a good task, now i am trying to setup coovachilli+freeradius for hotspot setup and i want to centralize the setup for all my locations.

I'll get in touch with you.

By: santosh

the best way is to use Gargoyle router management utility Firmware.