New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GL-MT300N-V2 as a Captive Portal #509
Comments
@RyukMy Edit: What you must do:
For item 1, assuming OpenWrt version 23.05.2, go to: Download the "sysupgrade" version of the file. Now item 2. Do you know how to do this? There are two ways. One leaves multiple ways to go wrong, the other is 100% safe. The safe way requires an ethernet connection from your computer to the MT300N-v2. |
Yes please. I will need help for point 5, I want that the user will register to get access. |
If your computer has an ethernet interface (rj45 socket or usb ethernet dongle), we can use the safe way. |
I have Mac and Windows |
OK then, with the Mac set to 192.168.1.2 and the ethernet cable connected from Mac to the lan port of the mt300n-v2,
After a few minutes it will be done. Then we can go to the next step, enabling the wifi. |
Done. |
I assume that operating frequency will be N. |
Sorry, I've been busy.
The "operating frequency" is set by channel number. Assuming you are still in the original state just after reflashing do:
If this is successful we are ready for the next step. |
Working perfectly |
@RyukMy In an ssh terminal session, do:
After a couple of minutes, openNDS should be running. Your computer will probably pop up the login page (depending on its operating system and browser versions). Also try connecting with your mobile phone. |
I got this:
|
Open the ssh terminal session again. Do:
Now you should get a username/emailaddress login. Let me know. Nest step is to change things.... |
Everything works perfectly... |
@RyukMy Your top red box. This is the GatewayName with a unique serial number suffix (this is very useful if you have numerous instances of openNDS installed for example in a chain of coffee shops all using a central FAS - you will know which shop a client is at). As usual, in an ssh terminal session, do:
This, as you might guess, switches off the serial number suffix. Now while we are at it we can change the name.
And as usual, we save the changes: And restart openNDS to make the changes take effect:
However, now openNDS is fully operational, after a restart, it will automatically log back in any authenticated clients. So to see the results, you need to log out. Wait a couple of minutes after you did the restart, then, in the browser on your client that was logged in before the reset, you will see you still have an Internet connection as your session had not expired so openNDS logged you back in. To log out, on the browser, go to http://status.client Now you can log back in. You will see the your top red box will have changed. We will deal with the second red box later. For the third red box, the logo image, - do you have an example? For testing we can use your Github avatar and tell openNDS to automatically download it. But first let me know if the top red box has changed ;-) |
Yes is changed. I have the image. |
Also, after login can I redirect the person to a specific website or social media page? |
This is an example from my test system of what you should get when you are logged in and you go to http://status.client: And this is what it looks like if you click "logout": Now if you click "Continue", you shold be back at the username/emailaddress page. If not you might have missed out one of the "commit" commands. Let me know. Ref. the logo, yes, put it in Google Drive and give me the url. I will make sure it works then give you the uci commands to enter. |
Yes, I have the same screens now. This is the link of the logo: https://drive.google.com/file/d/19MVvRb2eXNL5O1y4RLByhz2PAwR0vDk_/view?usp=sharing |
You can, but almost all client devices will immediately close the page for security reasons as otherwise an unscrupulous party could redirect to a spoof banking page or whatever the client thought they wanted to go to... So the real answer is NO ! |
OK. |
@RyukMy |
@RyukMy |
Perfect. I'll test it here first, then give you the commands............ |
@RyukMy |
Will do. |
@RyukMy Ok, back into an ssh terminal session: Tell openNDS where to get the logo file and where to put it:
Give openNDS a script to do the downloading:
Create a link so the themespec displays the logo:
Finally commit the changes and restart:
I think I got that right - let me know if it works...... |
You got it right. |
@RyukMy Once that is done we can start configuring as follows:
Now test it, I think I remembered everything.... ;-) If it doesn't work and you are locked out from the internet, do: |
Everything works smooth... |
@RyukMy |
Edit liasgatronomy.php, line 119 Currently it will be: Change it to: And line 120 - Change it to: I think that should do it.... |
Works |
@RyukMy |
I believe is because the router is offline now… |
@RyukMy |
Where are you? |
HaHa, yes 7 hours then. |
Yes, I confirm, the logo is not there... |
Indeed it is: |
What comes next? |
@RyukMy Page functions:
The html in these functions can be easily edited. Note however double quote characters used in html have the "string termination" function in PHP, so must be escaped using the For example, to change the "You are connected to LocalZone:" line, look in function login_page().
Change it to (converting $gatewayname to html format):
|
@RyukMy |
What about login time? |
@RyukMy
Do you mean session length? This defaults to 24 hours. You should look at the logs that the FAS server keeps. On the FAS web server, in the folder where liasgastronomy.php is, you should find a folder named For every client login it will contain an entry with:
|
Can we put a session time of 3 hours and then relogin if necessary? |
@RyukMy
followed by:
and restart to activate: You can see all the available options in the documentation: |
Everything works nice and smooth. I was trying to understand how to setup a time frame when this is working, preferably during the opening hours. Can this be done from the FAS? |
@RyukMy But, I would ask the question - Is this necessary?
In most countries these days, ISPs provide unlimited or very large data quotas when providing Internet feeds, so use outside opening hours is not a concern. If in your case this is an issue, then the best solution is to unplug the power from the router as another job for the member of staff who turns out the lights and locks the doors. Alternatively, get a cheap timer for the power supply to automate the switch off . |
You are right. Better leave things simple |
@RyukMy |
@RyukMy |
Should I overwrite the software of the GL-MT300N or is also ok to keep it and use the LUCI thati can install?
@bluewavenet here I'm, received 5 minutes ago.
Details:
LUCI -> 19.07
openNDS available to install -> 5.2.0-1
GL-MT300N-V2 -> 3.216
The text was updated successfully, but these errors were encountered: