Professional Documents
Culture Documents
PORTAL
by GeekyCat21 geekycat21.blogspot.com
Click QUICK SET to set up the wireless hotspot. Input necessary data like
LAN IP addresses, DHCP and etc. Like this,
Data inputted here are just examples. Blue checks means important.
Then Mikrotik Hotspot Setup wizard, will be appear. This is easiest way to
setup Hotspot interface in Mikrotik. IP address for Ethernet, DHCP Server,
routing and firewall will be configured automatically. In the Mikrotik
Hotspot Setup wizard, select wlan1 as hotspot interface. If it turns red, it
means INVALID and you have to choose bridge1 as hotspot interface if you
have configure the bridge also. Then click Next.
This picture is just an example:
Example:
And then Set hotspot IP address. You can accept default values but choose
none for certificate. Leave the IP as it is (10.5.50.x). If you change this IP,
the LOGIN and LOGOUT links will not work on your splash page. Then
click Next.
For DNS name, leave blank if you want to, then click Next. But you can
name your local DNS hotspot for example: freewifi.com.(Anything you want
to name it). It serves as a purpose that the users wont have to memorize
the IP address of the hotspot to go the captive portal instead input the DNS
Name in URL which is easy to remember. Some browsers doesnt
automatically go to the captive portal. Thats why users have to input the IP
address or DNS name (ex. freewifi.com) to go to the captive portal.
Back to the Mikrotik Hotspot dialog box. Click tab Server Profiles, then
click twice to hsprof1 (look at example picture below). New open dialog
box will appear about Hotspot Server Profile.
Another example:
For me, there are two types of captive portal. With Authentication and
Non-Authentication
With Authentication means users who are connected to the WiFi must log
in their username and password before they could use the internet.
Non-Authentication means users who are connected to Wifi and has to see
first a webpage before they could use the internet. I thinks it's called Splash
Page.
And then in tab Login, make sure in the section Login By, uncheck cookie,
then click OK. I didnt use RADIUS Server for my captive portal. Im not
familiar with the RADIUS Server.
If you
want the landing page just for the hotspot user not the LAN user, you can
just simply choose the SERVER and choose hotspot or whatever server
name you use for your wifi if you want to implement the captive portal to
wifi users only. The username is important. But the password, you have the
choice whether you put a password for your captive portal or not. Users of
the wifi must input the correct username and password in the captive portal
to be able to use the wifi.
If you dont want users to input username or password in the landing page
and that you just want to that the users agree to your terms and conditions
or just click Connect button in your landing page/splash page, change the
data in input type=text to input type=hidden and change the value
based on the username in user profile you created: like input type=text
value=HotspotUser (depends on what you put for the username) so that
the value sent for authentication is the same as the one you have created
without the users altering the value. The same goes to the password: input
type=password, change to input type=hidden and then change the
value based on the password you created. Confused? Well, this is very
useful once we get to customizing our captive portal. Mikrotik has a default
captive portal but it is really plain and simple. And I know you dont want
that, right? Get back to this part after were done in making a WiFi Hotspot
profile and that we were doing on how to customize the Captive Portal.
In the computer client, browsing to any site, If the login page appears, it
means mikrotik hotspot is working properly. Input username and password,
that have been created. If everything is normal, the browser will be redirect
to destination site. If it didnt redirect, input the IP Address or DNS name
you assigned to your WiFi profile in the URL and click Go. If it still doesnt
redirect, look back to the previous lessons. You might have missed a thing
or two. Remember what I told you before, one small configuration,
everything will be destroyed unless you got a backup on the FILES. I taught
you how to backup configuration in Mikrotik.
For security, dont forget to make new password for user admin. Click
system password, fill new password in dialog box, and then click change.
To erase the cookie on logoff, in the page containing link to the logout
(for example, in status.html) change:
<body>
</body>
</html>
After a successful login, alogin.html is loaded for the user. The below
assumes that the page you want to show after login resides on an external
server. If you want to host it on the router itself, just replace it with the
HTML for the final landing screen.
Code: Select all
<html>
<head>
<meta http-equiv="refresh" content="0;
url=http://my.external.server.com/landingpage.html">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="expires" content="-1">
</head>
<body>
</body>
</html>