How to show wifi login page when user connect to wifi of access point.

715 views
Skip to first unread message

HÒA TRẦN VĂN

unread,
Aug 13, 2021, 12:26:07 PM8/13/21
to OpenWISP
First, thanks to the openwisp team for providing a useful open source project to the community.

I am learning and want to develop captive portal based on openwisp-radius and openwisp-wifi-login-page. 

As far as I understand, when the user connects to wifi, they will first have to login via wifi-login-page, so openwisp-wifi-login-page will be displayed on the client side via openwrt access point, and integrated with openwisp-radius api on the server side.

So how can I show the wifi login page when the user connects to the wifi of the access point.

Thank you very much.

Federico Capoano

unread,
Aug 13, 2021, 12:29:46 PM8/13/21
to open...@googlegroups.com
You need a captive portal, this is not provided by OpenWISP, there are many existing open source captive portal solutions around.

Best regards
Federico Capoano


--
You received this message because you are subscribed to the Google Groups "OpenWISP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openwisp+u...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/openwisp/c2b16062-09a4-4abf-af70-795717731997n%40googlegroups.com.
Message has been deleted

HÒA TRẦN VĂN

unread,
Aug 13, 2021, 9:05:29 PM8/13/21
to OpenWISP
FreeRadius provides authentication, authorization, and accounting. And does openwisp-wifi-login-page provide the access point's wifi login page and interact with openwisp-radius? So how is openwisp-wifi-login-page integrated with the system?

Vào lúc 23:29:46 UTC+7 ngày Thứ Sáu, 13 tháng 8, 2021, f.capoano đã viết:

Federico Capoano

unread,
Aug 13, 2021, 9:33:59 PM8/13/21
to open...@googlegroups.com
OpenWISP WiFi Login Pages is a frontend web app which provides a user interface to the OpenWISP RADIUS REST API so the user can register (create an account), verify their mobile phone number by putting the code they receive via SMS, log in, see how much traffic they used and so on (see full list of features). These are not features of a captive portal.

A captive portal is a firewall which implements some kind of authorization and authentication mechanism (usually RADIUS protocol), it receives requests to authenticate and authorize (basically add a firewall rule to let the traffic pass) specific IP/mac addresses.

OpenWISP WiFI Login Pages need a captive portal to work, the login and logout HTTP endpoints of the captive portal must be specified in the configuration, it's documented in the README.

Some of the most popular open source captive portal solutions that support the RADIUS protocol are CoovaChilli (if you want to stay on OpenWRT) or PfSense / Opnsense (based on BSD unix).

At some point I should be able to provide a more detailed explanation of how all these components integrate with one another, and hopefully also a packaged solution which can work out of the box with minimum effort on OpenWRT (that has been the plan for some time now), but for now this is the best I can give and users are required to dig deep to make it work, although it's still better than having to start from absolute scratch I believe.

Best regards
Federico Capoano

HÒA TRẦN VĂN

unread,
Aug 14, 2021, 10:29:13 AM8/14/21
to OpenWISP
Thank you for your enthusiastic explanation.

 I have been testing coova chilli combined with radius.

I set the "option uamserver"  to openwisp wifi login url, and the wifi login page was displayed when accessing wifi from the access point. 

Now I am facing the problem: "Ignoring request to acct address * port 1813 bound to server default from unknown client 192.168.1.4 port 49553 proto udp". I am looking for a way to solve this issue. 

Thank you very much.

Vào lúc 08:33:59 UTC+7 ngày Thứ Bảy, 14 tháng 8, 2021, f.capoano đã viết:

HÒA TRẦN VĂN

unread,
Aug 15, 2021, 6:03:07 AM8/15/21
to OpenWISP
I have successfully logged in at openwips-wifi-login but I cannot access the internet.

I don't quite understand the login and logout HTTP endpoints of the coova-chilli captive portal. When I login to the wifi login page from my laptop via localhost, I see a request to the default captive port login of openwisp-radius. But when I login from the phone connected to the wifi of the access point, there is no request to the default captive port login. Not sure if this is the problem or not?

I am new to openwisp, captive portal. And the coova documentation isn't much either. Can you explain more to me about this. And how can I connect to the internet.

Thank you so much.

Vào lúc 21:29:13 UTC+7 ngày Thứ Bảy, 14 tháng 8, 2021, HÒA TRẦN VĂN đã viết:

Federico Capoano

unread,
Aug 15, 2021, 3:53:44 PM8/15/21
to open...@googlegroups.com
Dear HÒA TRẦN VĂN,

I don't know how to answer your email because there is no specific question related to OpenWISP. I can't provide support for CoovaChilli, I suggest getting in touch with the community maintainig that project via their support channels.

If you have other questions regarding any other OpenWISP module don't hesitate to ask but please be specific otherwise I won't be able to help you. 

Best regards
Federico Capoano

HÒA TRẦN VĂN

unread,
Aug 21, 2021, 11:14:29 AM8/21/21
to OpenWISP

I use coova together with a local login page running on the openwrt device along with using openwisp-radius on the server side and I have successfully authenticated the client. 

Thanks to the team for building a public wifi management tool for the community to integrate with the openwisp system.

With useful features of openwisp-wifi-login-page, I want to use it as a web application to replace the local login page that I'm using now. But I don't know how to integrate it with coova yet. If I use it as an external login page and configure the captive portal login and logout endpoints, the openwisp login page cannot reach coova because coova runs locally in the access point. I tried putting the openwisp login page on the access point so it could connect to coova but it failed because the size of the packages it required was too large.


Vào lúc 02:53:44 UTC+7 ngày Thứ Hai, 16 tháng 8, 2021, f.capoano đã viết:

Federico Capoano

unread,
Aug 22, 2021, 2:10:33 PM8/22/21
to open...@googlegroups.com
I think there's a misunderstanding here. The server on which openwisp-wifi-login-pages resides does not communicate with the captive portal, otherwise it wouldn't work in this case.
It's the user's browser which does that. WiFi Login Pages talks to OpenWISP RADIUS via the REST API to obtain the user tokens, then it submits these in a POST request directly in the browser of the user.

So you have to configure the captive portal login URL to be the same you have in the form of your HTML page.

This should help, I hope.

Best regards
Federico


HÒA TRẦN VĂN

unread,
Aug 24, 2021, 11:31:00 AM8/24/21
to OpenWISP
I have integrated openwisp-login-page, openwisp-radius and coova chilli running on openwrt into openwisp system. 

In order for the wifi login page to successfully send requests to coova, I adjusted the method of sending requests from post to get and the username and password fields from auth_user, auth_pass respectively to username and password.

Thank you very much.
Vào lúc 01:10:33 UTC+7 ngày Thứ Hai, 23 tháng 8, 2021, f.capoano đã viết:

Federico Capoano

unread,
Aug 24, 2021, 12:30:24 PM8/24/21
to open...@googlegroups.com
Yes, that's correct. If you have time to publish a blog post or any text about what you have done, you will help many other people like you to achieve the same.

Best regards
Federico Capoano

Reply all
Reply to author
Forward
0 new messages