Friday 29 July 2016

Hotspotsystem on separate dd-wrt interface

This post is for troubleshooting. Not working fully, yet! Clients are not redirected to splash page!

Hotspotsystem


What is Hotspotsystem?

HotspotSystem is captive portal management and billing service for companies or individuals who want to provide internet for their customers. While giving out free Wi-FI, you can promote your bussines by redirecting your customers to your web page or Facebook page where they need to "like" it to gain internet access. This increases you business visibility, customer engagement and sales. Also, it can be used in home purposes to show off in front of your friends:)

How much does it costs?

About pricing see this page. Good news is that they have FREE BASIC package (with splash/landing web page) with no monthly fee only limited with 500 logins per month / location. You can have unlimited number of locations (hotspots).


How does it works?

DD-WRT uses software called coova chilli to establish connection to Hotspotsystem radius server where all authentication is done. After that you can manage your clients through cloud based software on Hotspotsystem web page (setting quotas, bandwidth limit, vouchers, data capture etc.).



Setup guide


We'll do it in 3 steps:

  • create Hotspotsystem account
  • setup DD-WRT unit
  • manage your clients on Hotspotsystem Cloud

Creating Hotspotsystem account is very easy and fast. Just fill out this form and submit. Be careful when choosing operator username because it will appear in the URL your guests see when they open HotSpot start page. Choose your business plan (Free Basic or Social) and proceed to setup dd-wrt unit.





  • Setup DD-WRT unit: 


Before we proceed make sure you backed up your working configuration (Administration > Backup > nvram.bin). If something goes wrong just reset your unit and restore working configutaion. Make sure that you are using build 30342 and later. You can download it from here. It is important because BS did some fixies and updated coova in 30136. Also, go to dd-wrt forum and ask about specific build before flashing your unit. These are all test builds!!!
Go to Setup>Basic setup page. Uncheck Use DNSMasq for DHCP and Use DNSMasq for DNS. This is very important because you need uDHCPd for working HSS at the moment.

IMPORTANT: The router has to be in the same time zone as HotSpotSystem authentication servers so you won't get sync error. Set Greenwich (ETC - GMT+00) as your time zone regardless your local time.


DNSMasq and Local DNS should be turned on.



Now, on the WirelessBasic Settings>Virtual Interfaces Add Virtual Interface. Unbridge it from the LAN (br0) and assign IP adress to the interface (192.168.182.1/255.255.255.0).

Apply settings! Wait about 30 seconds and you will see that new interface ath0.1 appeared on sysinfo page. You will se new VAP (Virtual Access Point) and SSID will apear in the list of wifi networks. Note: naming of the interface can varie by chipset vendor, and can be any of the following: wl0.1 (Broadcom), ath0.1 (Qualcomm Atheros former Atheros), ra1 (Mediatek former Ralink). 

If you are using PPPoE to connect to your ISP, your ppp0 MTU (e.g. 1492) link could be lower then tun0 (1500) link to HSS wich could lead to problem when opening certain web pages. To avoid this on Administration/Commannds add this directive as your firewall rule and Firewall Save:



iptables -t mangle -I POSTROUTING -p tcp --tcp-flags SYN,RST SYN -m tcpmss --mss 1421:65535 -j TCPMSS --clamp-mss-to-pmtu

Now, go to Services>Hotspot tab and enable Hotspotsystem service like on the screenshot below:
Apply settings and wait about 90 seconds to renew want IP and chilli optware to be loaded, You are ready to go. Try your Hotspot by connecting to it.



Manage your splashpage and clients on Hotspotsystem Cloud: When you login to your Hotspotsystem control center here, go to Manage/Locations/Modify Hotspot Data & Settings.


Click on the Splash Page Settings and choose your skin. This will be your landing page that customer will see when they login.

In Hotspot data you can enter Latitude and Longitude if you wan your HS to be visible on the map.


Enjoy!
Mile-Lile

Additionaly you can use dd-wrt QoS to set interface priority. Set LAN&WLAN (br0) to maximum and ath0.1 to bulk. This way your HS won't affect your internet speed!







14 comments:

  1. Thanks for your post. It is perfect timing as I am currently trying to get Hotspotsystem to work on a TP-Link TL-WR841N V11. I have installed DD-WRT v3.0-r30342 std (07/30/16) and followed your procedure.

    Here is the situation:
    * Hotspotsystem.com detects that my AP is online
    * I am able to connect to the network and receive an IP
    * I am never redirected to the splash page
    * I cannot browse the internet BUT I am getting DNS resolution and can successfully ping URLs (using Mocha Ping Lite on my iPhone)

    ReplyDelete
  2. The problem is that ddwrt devs never intendent to make any Hotspot work on unbridged interface. I wroted this post to show BrainSlayer what I'm trying to do. Redirection is not working at the moment from the GUI but it is working from CLI. As soon as I get time I will post srcipt here how to make it work (iptables). When you connect to HSS try this URL http://192.168.182.1:3990/prelogin and you will get your splash page... This post is still under construction never should publish it...

    ReplyDelete
  3. Hi there,
    any luck with that redirect? it is better to use newer build that 22118 which HSS is working fine

    ReplyDelete
  4. There are many new units that get ddwrt support after build r22118 so that is not solution to stick with old build wich work fine with HSS but has very bad wifi performance... my intention is to make it work from GUI with few of clicks so it could be available to everyone... even for ddwrt noobs. But finding bug is not so easy task...

    ReplyDelete
  5. Yea I ve been trying to setup any of hotspot services for like 3 days without any special luck using any of hotspot priverds build in ddwrt firmware. Only build r22118 with HSS was fine but it is 3 years outdated.. GUI or not that redirection shouldn't be a big problem to fix especially it was fine in the past. Did you get it work anyhow? without asking clients connected to open browser with 192.168.182.1 IP to allow you thru splash?

    ReplyDelete
  6. it is not just redirection problem. Do cat /tmp/dnsmasq.conf from cli and you'll se what I'm talking about... if it was so easy it would be fixed till now...

    ReplyDelete
  7. root@Hotspot:~# cat /tmp/dnsmasq.conf
    interface=eth1
    resolv-file=/tmp/resolv.dnsmasq
    all-servers
    strict-order
    stop-dns-rebind

    do you have something more here?

    ReplyDelete
  8. Looking forward to solution, have same issue here.

    ReplyDelete
  9. Looking forward to solution, have same issue here

    ReplyDelete
  10. I have money to offer for this to get done.

    ReplyDelete
  11. Well, I must admit I gave up on this. Tried everything... It's simply beyond my knowledge. Thx for your kind offer... Problem is not, having enough time or willing to solve it, I just don't know to fix it... it is somewhere in firewall... Only I could do is to reopen ticket on TRAC but that wouldn't help much... My suggestion to you is to try to contact Kong from ddwrt community forum... I am sure he could help, but as allways he is very busy...

    ReplyDelete
  12. Bottom line, I just want my ASUS RT-N66U to be a hotspot taking emails. No other needs, no need for private network. I'm glad I didn't pay HSS yet, do I go Tomato? OpenWRT? NoCatSplash? Dog? I need someone smarter than I helping me through this.

    ReplyDelete
  13. Hi may be it will help to you. Chilli has the same problem. The last working release is 30082. After that redirect stoped working. Interesting fact is that if you kill chilli process and then run it manually in foreground "chilli -f -c /tmp/chilli/chilli.conf" redirect works.

    ReplyDelete
  14. Thx. I will report it to ddwrt devs but on coova they found out it was routing problem https://github.com/coova/coova-chilli/issues/337

    ReplyDelete

How to block Viber ads on DD-WRT router

Rakuten Viber introduced commercials in newer verions of their app so users became products. Often , ads are displayed aggressively a...