coova / coova-chilli

CoovaChilli is an open-source software access controller for captive portal hotspots.
Other
514 stars 257 forks source link

External splash login page #527

Closed tranvanhoa533 closed 3 years ago

tranvanhoa533 commented 3 years ago

I install coova-chilli 1.4 on openwrt 19.07.7 to do guest user authentication.

I want to use external captive login page and use uamserver to redirect to this login page when client connects to wifi.

How can I send request from external splash login page to coova on my access point to do authentication with radius server.

Thank you very much.

wans05 commented 3 years ago

Theoretically executing a callback request to Coova Chilli will work.

The user accesses the router locally and Coova Chilli forwards the request to the remote Splash together with the session data, after validating the user data the Splash page makes a request to the Coova Chilli API locally.

gmarsay commented 3 years ago

You can use uamserver parameter to specify your external login page. Coova Chilli will redirect users to external login page with additionnal GET parameters.

tranvanhoa533 commented 3 years ago

Thank you @wans05, @gmarsay for your reply.

I used uamserver parameter to redirect to external login page @gmarsay. As I understand it, coova needs to get back the login result of the external splash page so that it can authenticate with the radius server before allowing the client to use the internet or not.

When coova runs by default in openwrt, it runs at ip 192.168.182.1 and port 3990. How can remote splash page reach coova to send request @wans05.

gmarsay commented 3 years ago

You've more informations here : https://github.com/coova/coova-chilli/blob/master/miniportal/config-local.sh.in#L187

This is the client who call Coova for authenticate user via 192.168.182.1:3990/login?username... not the external login page.

tranvanhoa533 commented 3 years ago

You've more informations here : https://github.com/coova/coova-chilli/blob/master/miniportal/config-local.sh.in#L187

When I use local login page on same device as coova then I use this function and authenticate successfully.

Now I'm confused when I want to use the external login page on another server, for example the cloud.

After successfully logging in at the remote login page, I am unable to connect to the internal network of the access point, specifically 192.168.182.1:3990 which coova is running on to make the authentication call.

Can you help me with some instructions to solve this problem. I'm a newbie to coova so I'm still confused.

tranvanhoa533 commented 3 years ago

Thank you @gmarsay @wans05 for your support. I already solved this problem.