Community discussions

MikroTik App
 
rory20
just joined
Topic Author
Posts: 13
Joined: Sat Mar 05, 2011 11:49 pm

No login Page hotspot

Mon Apr 25, 2011 8:28 pm

i would like to setup a hotspot where the users get authenicated by default. i do not want the log in page to come up. I would like the hotspot to limit the users speed and downloading (especially torrents).

how can i go about letting the users on trasparently. in the future i am thinking off adding a page that could come when they first log on. ( like google.com, or some advertisements)
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 24790
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia

Re: No login Page hotspot

Tue Apr 26, 2011 10:47 am

you can modify the form to authenticate them by MAC address, and hide the login form. then include some advertisement on the login page, and rename the login button to something like "continue". this will seem like an ad page to the user, but in fact it will be a login page
No answer to your question? How to write posts
 
rory20
just joined
Topic Author
Posts: 13
Joined: Sat Mar 05, 2011 11:49 pm

Re: No login Page hotspot

Tue Apr 26, 2011 8:04 pm

you can modify the form to authenticate them by MAC address, and hide the login form. then include some advertisement on the login page, and rename the login button to something like "continue". this will seem like an ad page to the user, but in fact it will be a login page
The network consist of random users. how would I go about authenticating by MAC?? i have tried selecting login by MAC but the login page still comes up.

is there way to let google come up by default or let them be directed to another website by default.
 
fewi
Forum Guru
Forum Guru
Posts: 7734
Joined: Tue Aug 11, 2009 3:19 am

Re: No login Page hotspot

Tue Apr 26, 2011 8:07 pm

login.html:
<html><head>
<meta http-equiv="refresh" content="0; url=login?username=myUsername&password=myPassword">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="expires" content="-1">
</head><body></body></html>
login.html is the page loaded to show the login form. The above is a simple meta refresh that causes the browser to submit pre-determined credentials to the login servlet, in this case for the user 'myUsername' with a password of 'myPassword'. As long as that account with that credentials exists in the local user database (or via RADIUS) the user will be automatically logged in.

alogin.html:
<html><head>
<meta http-equiv="refresh" content="0; url=http://www.google.com">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="expires" content="-1">
</head><body></body></html>
alogin.html is loaded after a successful login. In this case, it will trigger a redirect to Google by merit of a similar meta tag.

From the user's perspective they open a browser, and half a second later Google appears. From the router's perspective a normal, full log on took place for the 'myUsername' account.

http://wiki.mikrotik.com/wiki/Manual:Cu ... t#Examples also contains an example that will do this via JavaScript.

In my experience JavaScript is supported by fewer devices - usually most devices support it but some users disable it - so while JavaScript is technically cleaner than abusing a meta refresh like above, meta refreshes get the desired result for more users.
Specific answers require specific questions. When in doubt, post the output of "/ip address print detail", "/ip route print detail", "/interface print detail", "/ip firewall export", and an accurate network diagram.
 
rory20
just joined
Topic Author
Posts: 13
Joined: Sat Mar 05, 2011 11:49 pm

Re: No login Page hotspot

Thu Apr 28, 2011 12:10 am

Thanks for your help.

i have edited pages. it didn't work on HTTP CHAP, I got it to auto log in with HTTP PAP. The login page comes up really quick and then it got to the status page. it shows welcome user and the ip address and there status. it stays on that page until they navigate away from it.

I dont mind this page too much. put still want it to jump to google or any other page.

Another question, at the top of the web page it shows mikrotik hotspot>status. how can i get it show user status or not come up at all.
 
fewi
Forum Guru
Forum Guru
Posts: 7734
Joined: Tue Aug 11, 2009 3:19 am

Re: No login Page hotspot

Thu Apr 28, 2011 12:22 am

Yes, should have mentioned that you should use PAP.

From the customizing manual:
request for "/login" page
if user has successfully logged in (or is already logged in), alogin.html is displayed; if alogin.html is not found, redirect.html is used to redirect to the originally requested page or the status page (in case, original destination page was not given)
So the login.html submits to /login and the login is successfully processed. If alogin.html exists it will be displayed, in my above example that alogin.html redirects to Google. If it doesn't exist then redirect.html either redirects to the originally requested URL, or the status page if that isn't available. In this scenario it wouldn't be as the login.html you're using doesn't perpetuate that variable.
Sounds like your alogin.html doesn't exist, is named wrong, something. Therefore redirect.html is shown, the originally requested URL is not available, so the status page is shown. Fix your alogin.html and you should be fine.
This works peachy for me for tens of thousands of users. As long as alogin.html exists and shows something sensible (including a redirect to Google) there won't be a status page.
Specific answers require specific questions. When in doubt, post the output of "/ip address print detail", "/ip route print detail", "/interface print detail", "/ip firewall export", and an accurate network diagram.
 
rory20
just joined
Topic Author
Posts: 13
Joined: Sat Mar 05, 2011 11:49 pm

Re: No login Page hotspot

Thu Apr 28, 2011 7:41 pm

thanks so much for you help. so far i have been able to change the login page and edit so that it can auto login. i have also change the login pic.

is it possible to remove the word mikrotik hotspot ( where the arrow is on the image).

i have been experimenting with the time outs. so that after a specific time it will log off the user, and browsing should kick in when they start browsing again. but it does not go this way. when i try to login it sticks on the login page. the logs say user uptime limit is reached.

and how to skip this status page all together??
You do not have the required permissions to view the files attached to this post.
 
fewi
Forum Guru
Forum Guru
Posts: 7734
Joined: Tue Aug 11, 2009 3:19 am

Re: No login Page hotspot

Thu Apr 28, 2011 7:58 pm

I described in my last post how to make sure the status page doesn't appear at all.

The title, obviously, is changed by editing status.html and setting a different title in the <title></title> tags.
Specific answers require specific questions. When in doubt, post the output of "/ip address print detail", "/ip route print detail", "/interface print detail", "/ip firewall export", and an accurate network diagram.
 
javedshotline
newbie
Posts: 26
Joined: Mon Jan 23, 2012 9:09 pm

Re: No login Page hotspot

Thu Feb 09, 2012 9:57 pm

edit status.html
<title>Write what you want to display in Title</title>


/ip hotspot user profile> set 0 keepalive-timeout=15m
/ip hotspot user profile> print
0 * name="default" idle-timeout=none keepalive-timeout=15m
status-autorefresh=1m shared-users=1 transparent-proxy=no

this will allow user to logged in for 15 minutes with no activity.
after 15 minutes of inactivity user will logged out automatically.
If I helped you - Don't forget to give Karma
 
User avatar
macsrwe
Forum Veteran
Forum Veteran
Posts: 971
Joined: Mon Apr 02, 2007 5:43 am
Location: Arizona, USA
Contact:

Re: No login Page hotspot

Mon Feb 13, 2012 3:17 am

If alogin.html exists it will be displayed… This works peachy for me for tens of thousands of users. As long as alogin.html exists and shows something sensible (including a redirect to Google) there won't be a status page.
Note that browser popup blocker can prevent alogin from being displayed. :-(
 
Philomena
just joined
Posts: 4
Joined: Fri Apr 27, 2012 10:09 am

Re: No login Page hotspot

Thu May 24, 2012 4:06 pm

hy,

I set up hotspot, and changed login.html, so users can auto login now, but i can't setup up web page were users should be redirected automatic.
I changed in alogin.html web page, but it didn't worked, so i tried to change redirect.html, it didnn't worked either.
What do i need to change in alogin.html exept web page?
 
Philomena
just joined
Posts: 4
Joined: Fri Apr 27, 2012 10:09 am

Re: No login Page hotspot

Thu May 24, 2012 5:18 pm

It's working now! :)
 
rory20
just joined
Topic Author
Posts: 13
Joined: Sat Mar 05, 2011 11:49 pm

Re: No login Page hotspot

Sat Aug 11, 2012 8:18 am

It's working now! :)

what did you do to fix this??
 
User avatar
dunga
Member Candidate
Member Candidate
Posts: 254
Joined: Fri Jan 23, 2009 9:51 am
Location: Nigeria

Re: No login Page hotspot

Mon Dec 17, 2012 8:06 pm

Hello all,
I am interested in this topic, i have a task to make our hotspot to display and users will have free trial account/login for 1week. I want a situation where when the login page appears, the user will just log in without any username and pasword.

How do i go about it, and what file should i edit their page to achieve that and place some advert to notify thm that it will end in 1weeks time,

Your help and advice is much needed asap.

thanks
 
Philomena
just joined
Posts: 4
Joined: Fri Apr 27, 2012 10:09 am

Re: No login Page hotspot

Tue Dec 18, 2012 8:46 am

hello,

For login without any username or password, first you need to create new user in hotspot (in this example: name: admin, password: 0000), then change hotspot/login.html file

<html><head>
<meta http-equiv="refresh" content="0; url=login?username=admin&password=0000">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="expires" content="-1">
</head><body></body></html>
 
spaxton
Member Candidate
Member Candidate
Posts: 184
Joined: Fri Jan 01, 2010 12:18 pm

Re: No login Page hotspot

Sat Jan 31, 2015 1:18 am

hello,

For login without any username or password, first you need to create new user in hotspot (in this example: name: admin, password: 0000), then change hotspot/login.html file

<html><head>
<meta http-equiv="refresh" content="0; url=login?username=admin&password=0000">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="expires" content="-1">
</head><body></body></html>
This is a big improvisation. It doesnt work veru well and if user leave the browser opened with the status page it will relogin automaticaly. alogin.html also doesnt work with editing like it was described in previous posts. It works when You start it directly from a PC but with mikrotik... not really. ;)
 
User avatar
hossain2004a
Member Candidate
Member Candidate
Posts: 247
Joined: Mon Dec 22, 2014 7:34 pm
Location: Iran

Re: No login Page hotspot

Mon Feb 02, 2015 9:56 pm

@fewi
I love your helping :D
That's fantastic.
 
jjones
just joined
Posts: 20
Joined: Wed Mar 06, 2013 11:42 pm

Re: No login Page hotspot

Fri Jan 15, 2016 6:12 pm

I tried using that login refresh with username created. My browser pops up for the hot spot but constantly refreshes the page in a loop. Am i missing something that needs to be in the login.html besides what is listed above?

<html><head>
<meta http-equiv="refresh" content="0; url=login?username=admin&password=0000">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="expires" content="-1">
</head><body></body></html>
 
CoyoteKG
just joined
Posts: 2
Joined: Mon Mar 09, 2015 3:39 pm

Re: No login Page hotspot

Sun May 29, 2016 7:42 pm

How to do it but with custom page, where are more then one login for social pages?
So, without mikrotik login, just after login onto wifi, browser need to redirect to some page with social's login buttons.
I see so many examples with tplink, and some custom firmware, but is that possible with mikrotik?
 
willsmannar
just joined
Posts: 2
Joined: Sun Sep 09, 2012 10:12 pm

Re: No login Page hotspot

Mon Nov 14, 2016 7:27 am

Check this one, more about....Url Redirect

Wills
 
czuniga
just joined
Posts: 3
Joined: Mon Sep 09, 2013 6:04 pm

Re: No login Page hotspot

Fri Jun 02, 2017 9:18 pm

hi guys, i use the first script and works fine for laptops and desktop, but not for mobil devices. any idea?

thanks
Christian Zuñiga
 
czuniga
just joined
Posts: 3
Joined: Mon Sep 09, 2013 6:04 pm

Re: No login Page hotspot

Fri Jun 02, 2017 9:18 pm

hi guys, i use the first script and works fine for laptops and desktop, but not for mobil devices.
the no login script works in mobiles too, but no redirect to a web page. any idea?

thanks
Christian Zuñiga
 
Metzen
just joined
Posts: 1
Joined: Mon Jul 24, 2017 5:16 pm

Re: No login Page hotspot

Sun Jul 30, 2017 7:45 pm

hi guys, I use Testofuel and it works fine for laptops and desktop, but not for mobil devices.
the no login script works in mobiles too, but no redirect to a web page. any idea?

thanks
Christian Zuñiga
Hey Christian, did you get it working properly on mobile?
Last edited by Metzen on Wed Jun 10, 2020 4:41 pm, edited 2 times in total.
 
ehabfraiha
just joined
Posts: 6
Joined: Fri Dec 01, 2017 9:19 pm

Re: No login Page hotspot

Wed Dec 27, 2017 9:24 am

i setup users in mikrotik it's IP address 10.0.0.2 and i make users profile each of them with user name, password when i tried to log in to computers some of them automatically appear the sign in box to type username and password and some others need from me to type the IP 10.0.0.2 in address bar to show the log in box to type the user name and password there is a way to solve this problrm
 
ehabfraiha
just joined
Posts: 6
Joined: Fri Dec 01, 2017 9:19 pm

Re: No login Page hotspot

Sun Jan 28, 2018 5:15 pm

I have problem . i creat users divided by limited speed and limited websites. when i try to log in from any computer by internet explorer it show to me the log in page user name & password if i try to connect by google chrome must type the ip mikrotik 10.0.0.2 in address bar to show the page of user name & password plz any body can help me to solve this problem
 
ehabfraiha
just joined
Posts: 6
Joined: Fri Dec 01, 2017 9:19 pm

Re: No login Page hotspot

Sun Jan 28, 2018 8:14 pm

login.html:
<html><head>
<meta http-equiv="refresh" content="0; url=login?username=myUsername&password=myPassword">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="expires" content="-1">
</head><body></body></html>
login.html is the page loaded to show the login form. The above is a simple meta refresh that causes the browser to submit pre-determined credentials to the login servlet, in this case for the user 'myUsername' with a password of 'myPassword'. As long as that account with that credentials exists in the local user database (or via RADIUS) the user will be automatically logged in.

alogin.html:
<html><head>
<meta http-equiv="refresh" content="0; url=http://www.google.com">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="expires" content="-1">
</head><body></body></html>
alogin.html is loaded after a successful login. In this case, it will trigger a redirect to Google by merit of a similar meta tag.

From the user's perspective they open a browser, and half a second later Google appears. From the router's perspective a normal, full log on took place for the 'myUsername' account.

http://wiki.mikrotik.com/wiki/Manual:Cu ... t#Examples also contains an example that will do this via JavaScript.

In my experience JavaScript is supported by fewer devices - usually most devices support it but some users disable it - so while JavaScript is technically cleaner than abusing a meta refresh like above, meta refreshes get the desired result for more users.
I have problem . i creat users divided by limited speed and limited websites. when i try to log in from any computer by internet explorer it show to me the log in page user name & password if i try to connect by google chrome must type the ip mikrotik 10.0.0.2 in address bar to show the page of user name & password plz any body can help me to solve this problem
 
armxx048
just joined
Posts: 1
Joined: Tue May 01, 2018 7:19 pm

Re: No login Page hotspot

Tue May 01, 2018 7:21 pm

Does your router uses 10.0.0.2 IP to get into the admin panel ? Several router use different different IPs to allow users to access the router login page. You should try checking it on google.
 
jafari88
just joined
Posts: 1
Joined: Sun May 03, 2020 9:58 am

Re: No login Page hotspot

Sun May 03, 2020 10:05 am

you can modify the form to authenticate them by MAC address, and hide the login form. then include some advertisement on the login page, and rename the login button to something like "continue". this will seem like an ad page to the user, but in fact it will be a login page
hi
would you please help me
i have configured trial user and it work fine but my customers are amature and i need another solution that when they entered the wireless password they can you use internet as a trial user.
thanks

Who is online

Users browsing this forum: No registered users and 9 guests