Simple HotSpot Voucher

Hello,

I want a simple voucher hotspot, but I'm not familiar with the related install packages.

Preferably a system that does not redirect to an external website produced by someone else. Does anyone know such a solution?

Is MIKHMON compatible with openwrt? Or just microtik?

Having abandoned MTs hotspot tech already 10 years ago, because not appropiate for more demanding hotspots, and developing quite a few hotspot systems, based on openwrt, I still have to admit, that for a few very basic hotspots, MT is good enough.

Yes. opennds.

Consider though, that a voucher system is very much a thing of the past, because of the ease of availability of 4G data. A public "hotspot" nowadays is something that is desired to attract customers to the venue and must by definition be free (albeit with authentication and basic logging to comply with legal requirements).

Having said this, a voucher system does still have its place in countries where Internet access is still not yet generally available.

OpenNDS supports development of just about any kind of portal using its API, and a fully functional voucher system running entirely on the router has been developed by the community:

Thank you for your tips! Is it possible to generate guest voucher codes with this system? Does it have an admin interface?

Yes.

No, but as everything voucher related is simple text files, it would be simple to write your own.

I could not find a description of the voucher system. How can I set it up? Maybe there is a good description to install the whole system? Is this system secure? Can't it be hacked?

https://opennds.readthedocs.io/en/stable/ ?

It is in the link I gave you - did you not read it?

To install opennds either select it in Luci or do:
opkg update
opkg install opennds

The full documentation is in the link posted by @frollic

It uses a unique access token that is generated for each client and this is hashed using a pre shared key, so yes it is secure.

Strange question.. Do you mean you would prefer something that can be hacked?

1 Like

I don't understand any of this horrible description. I can install it, but I don't know how to get it to work. Especially not how to turn it into a voucher system.

This documentation is horribly bad. Nowhere in it is there a section with pictures showing a simple example of how to install/get it working.

If you're looking for that, you will have to go with a commercial vendor.

it's open source, feel free to contribute and improve ....

1 Like

It is technical documentation.
You don't need pictures, in fact pictures would not help you.
It is assumed you have some basic Linux knowledge to even be installing OpenWrt, so I will assume that you are a beginner but know at least how to ssh into a terminal session on the router. If not then there are lots of "tutorials" you can read to find out about ssh.

Here are the very simplest instructions for you to follow:

  1. ssh into a terminal session on your router
  2. Type the following commands to install opennds:
    opkg update
    opkg install opennds

It should now be running with a simple "click to continue" splash page sequence.
Test it by connecting with your smartphone or tablet and you should get the "popup" login screen.

Now you need to download the Community "Voucher script" and "Voucher Roll"
Use the following commands:

  1. cd /usr/lib/opennds
  2. wget https://raw.githubusercontent.com/openNDS/openNDS/master/community/themespec/theme_voucher/theme_voucher.sh
  3. cd /tmp/ndslog
  4. wget https://raw.githubusercontent.com/openNDS/openNDS/master/community/themespec/theme_voucher/vouchers.txt

Now you need to activate the voucher script.
Use the following commands:

  1. chmod 744 /usr/lib/opennds/theme_voucher.sh
  2. uci set opennds.@opennds[0].login_option_enabled='3'
  3. uci set opennds.@opennds[0].themespec_path='/usr/lib/opennds/theme_voucher.sh'
  4. uci commit opennds
  5. service opennds restart

OpenNDS should now be running the voucher script.
Test it by connecting again with your phone or tablet.
You will need a voucher code from the example vouchers.txt file you downloaded.

There is also a voucher roll generator. You can run this on your computer or even on the router (but you will need python installed wherever you run it).
Download it like this:
wget https://raw.githubusercontent.com/openNDS/openNDS/master/community/themespec/theme_voucher/voucher_generator.py

The generator is a very simple program and could easily be re-written in any programming language.

If these instructions do not help you, then as @slh said, go with a commercial vendor.

1 Like

I installed the program. For some reason, when I click on login, the login window does not appear, it redirects me back to the same login place.

Another question: I have two networks 192.168.1.1 - master and 192.168.2.1 - guest WIFI. How can I configure it to work only on the guest network?

It's in the conf file, Luke (and probably in the docs too).

If I change the login option in the /etc/config/opennds configuration file from 3 to 2, it works, but the voucher interface is not loaded.
optiontwo2

optiontwo

I found this out myself too, but I thought maybe someone could help me, because I'm not a professional. -.-

Did you do the chmod command indicated earlier?

As @frollic said, the answer is in the docs, there you will find what to put into the config. It is just a single line to edit in the config file that depends on the detail of your network config.

It will probably be best for you at this stage to open an issue on Github. There you will almost certainly be able to get help from the community developer that wrote the voucher script.
Go to: