How To Setup a Wi-Fi Hotspot

Want to support HowtoForge? Become a subscriber!
 
Submitted by swarmspot (Contact Author) (Forums) on Sat, 2005-11-19 15:17. :: Other

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 192.168.1.1

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

What you will need:-

a) DD-WRT
Download the latest version here http://dd-wrt.com

b) FreeRadius
Download the latest version here http://freeradius.org/

c) phpMyPrepaid
Download the latest version here http://sourceforge.net


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 192.168.10.1.
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://123.123.123.123/cgi-bin/hotspotlogin.cgi/ (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
make
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 xxx.xxx.xxx.xxx { (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 0.0.0.0/0 )
}


Step 3 hotspotlogin.cgi
Copy hotspotlogin.cgi from http://chillispot.org 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 sean@swarmhotspots.com



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 config.inc.php and change the line that points to dbconnect to wherever you have saved dbconnect.php
In your web browser got to http://yoursite.com/whereveryouputphpmyprepaid/ 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 http://swarmhotspots.com/Chilli-Test-Area

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

sean@swarmhotspots.com



Please do not use the comment function to ask for help! If you need help, please use our forum.
Comments will be published after administrator approval.
Submitted by Anonymous (not registered) on Mon, 2014-06-23 09:58.

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.

Submitted by OKEKE CHIJIOKE (not registered) on Thu, 2012-05-24 17:28.

 Hi,

      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

 

Submitted by Jason (not registered) on Wed, 2012-01-11 21:42.

Everyone is 'promoting' their own hotspot solution in the comments. I have tried about 20 solutions and ended up using the free service of hotspotsystem.com. 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.

Submitted by Anonymous (not registered) on Tue, 2012-01-24 01:56.

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

Would "Jason" be Marko or Roland?  lol

Nice try guys.

Submitted by bluelinux (registered user) on Fri, 2011-05-20 17:40.
Great but complicated.
I think it is much easier and quicker to use Wiwiz HotSpot Builder.
Submitted by Brandon (not registered) on Fri, 2011-04-15 04:54.

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?

Submitted by SAMMY (not registered) on Fri, 2011-02-25 12:56.

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.

Submitted by pandu (not registered) on Thu, 2010-07-22 10:05.

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

Submitted by zeeboy (not registered) on Tue, 2010-07-20 09:33.

 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..

Submitted by Anonymous (not registered) on Sun, 2010-07-04 19:19.

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.

Submitted by Anonymous (not registered) on Mon, 2010-03-01 18:34.
Seems your links have been hijacked by some one else. Please verify.
Submitted by Theodoros (not registered) on Sat, 2010-01-16 17:30.

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 ?

Thanks

 

 

Submitted by max (not registered) on Sun, 2010-02-14 17:12.

Hi,

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 info@3ts.it and we can think the best option for your setup.

 Regards

Submitted by Vince (not registered) on Mon, 2009-11-23 19:51.
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 http://www.easyhotspotpro.com/  It has a built in interface for setup and the we were able to print prepaid tickets that we give out with purchases.
Submitted by Anonymous (not registered) on Sun, 2010-11-07 16:46.
you can go for pay version of www.hotspotsystem.com there you can manage you router remotely .
Submitted by Paul (not registered) on Sat, 2010-02-06 18:30.
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 http://checkbox.layerfour.net/ 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.
Submitted by Anonymous (not registered) on Sat, 2009-11-14 23:44.

One more hotspot based on Chillispot www.3ts.it

Submitted by swarmspot (registered user) on Thu, 2008-07-24 14:43.

Hi,

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 http://swarmhotspots.com. Jabali has been down for a long time now, but the latest phpMyPrepaid is on sourceforge. 

Regards,

 

Sean Bracken 

 

Submitted by Anonymous (not registered) on Mon, 2009-04-06 06:04.

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

Submitted by lorenww (registered user) on Tue, 2008-06-24 01:46.

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 dd-wrt.com 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 WiFiGator.com

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.

Cheers
Loren

Submitted by BSkit (registered user) on Wed, 2008-07-09 23:10.

Hi Loren,

www.usemynet.biz 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 !

Bob

Submitted by fudge (registered user) on Mon, 2008-06-02 10:28.

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

How to Make Money with Wi-Fi Hotspots?

Submitted by timgray (registered user) on Wed, 2007-06-06 15:24.

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.


Submitted by bobsumowrestler (registered user) on Wed, 2007-05-30 10:39.

Hi,

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

 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

Bob 

Submitted by fudge (registered user) on Wed, 2007-02-14 11:45.

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

 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. 

Submitted by worldspot (registered user) on Mon, 2006-10-09 22:49.

No more need for complicated radius or http server. Worldspot.net 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
Submitted by Anonymous (not registered) on Tue, 2006-08-22 22:00.

Hi,

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 sean@swarmhotspots.com . Please bear in mind that each installation takes about two or three days, so I'll have to cover my expenses.

Regards,

Sean 

Submitted by Anonymous (not registered) on Tue, 2006-06-06 16:15.

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

Thanks,

Carl Peterson

Submitted by Anonymous (not registered) on Wed, 2006-03-01 18:32.
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.
Submitted by Anonymous (not registered) on Mon, 2006-01-02 01:20.
Some of the links in this tutorial have expired. I am adding the latest versions of all programs to the download page on swarmhotspots.com I will have everything finished in the next few days,

Submitted by Anonymous (not registered) on Sun, 2006-01-01 20:45.
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.

Submitted by Sunny Ali (not registered) on Sun, 2009-07-19 06:58.

Hi,

 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.

 Thanks

 Sunny Ali

Submitted by tjgr-m (not registered) on Thu, 2010-12-16 21:14.

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 tjm1123@yahoo.com

thanks

Submitted by tj (not registered) on Thu, 2010-12-16 20:59.

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 192.168.1.1, 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 pasyandero@yahoo.com

 

thanks