Search code examples
openwrt

openWRT basic auth system


I trying to implement a very basic auth system that will grant internet through a non-password router (TP Link TL-WR841ND) on a form post to a URL. The TP Link has openWRT installed.

I have searched around and have evaluated a few options such as chilli, coova-chilli, wifidog, but as far as I can understand they do require radius on an external server to perform auth which I would like to avoid since it's more complicated than what I am willing to take on.

I was wondering if it is possible to achieve this using iptables or traffic rules,

The desired flow:

  1. Users connect to non-password wifi
  2. Users try to access any url
  3. Users get redirected to the router www/ where the html form live
  4. Users post form to url [myauthservice.com] (only permitted ip)
  5. Response is received from url [json, xml]
  6. Router allow users to browse freely over the internet for its session

Any ideas, suggestions are welcome!


Solution

  • Have you tried Nodogsplash?

    The authentication part: https://github.com/nodogsplash/nodogsplash#51-site-wide-username-and-password

    Installation: http://wiki.openwrt.org/doc/howto/wireless.hotspot.nodogsplash https://github.com/nodogsplash/nodogsplash#51-site-wide-username-and-password