Community discussions

MikroTik App
 
brunoreale
just joined
Topic Author
Posts: 8
Joined: Fri Jun 02, 2017 2:33 pm

Special configuration help

Fri Jun 02, 2017 2:38 pm

Goodmorning everyone,
I would like to ask you for help on a particular configuration.
I made a typical configuration for use as a hotspot.
Eth1 has been configured as an internet connection and has IP address 192.168.1.197/24
Eth2 has been configured as a hotspot and has IP address 10.10.0.1/16
And so far all right. At the opening of the browser, the routerboard proposes the login page and inserts the data into the navigation as it is set for the user.

We come to the peculiarity:

Eth3 I configured it with the IP address 172.100.1.1 and connected to this port, a webserver addressing 172.100.1.2

I would like to see a webserver page before the login page. To do this, I modified the file login.html and downloaded it to the routerboard.
To make it short does not work. If the user is not authentic, the address 172.100.1.2 is not displayed. How can I open the eth3 so that it can be accessed by users even if they are not authenticated?
Thank you
 
User avatar
pukkita
Trainer
Trainer
Posts: 3051
Joined: Wed Dec 04, 2013 11:09 am
Location: Spain

Re: Special configuration help

Fri Jun 02, 2017 3:16 pm

Adding webserver to Walled Garden.
 
brunoreale
just joined
Topic Author
Posts: 8
Joined: Fri Jun 02, 2017 2:33 pm

Re: Special configuration help

Fri Jun 02, 2017 4:21 pm

Pukkita thanks to the advice, now i can upload the page before authentication.
However, there remains a problem. I tried replacing the original login.html file with a new file that retrieves a page meta on the web server but does not work. Loading enters the loop and loads the login.html page continuously.

The file contents are as follows:

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>PubbliWiBI</title>

<meta http-equiv="Refresh" content="2; URL=http://172.100.1.2/index.html">

</head>

<body>
</body>
</html>


Where am I wrong?
 
R1CH
Forum Guru
Forum Guru
Posts: 1110
Joined: Sun Oct 01, 2006 11:44 pm

Re: Special configuration help

Fri Jun 02, 2017 8:11 pm

172.100.1.2 is public IP space owned by Time Warner Cable Internet LLC, are you sure you didn't mean to use 172.16.0.0/12?
 
brunoreale
just joined
Topic Author
Posts: 8
Joined: Fri Jun 02, 2017 2:33 pm

Re: Special configuration help

Sat Jun 03, 2017 12:44 pm

R1CH thanks for your signaling. I moved my router and server to 172.16.0.1 and 172.16.0.2
The problem, however, remains. By editing the login.html page to redirect the user to the webserver page, it goes into loop and loads continuously login.html
I've found a manual on the net to personalize the pages of the captive portal, but I do not understand a few things.
At one point he writes:

"If the user is logged in and the advertisement is due to be displayed, radvert.html is displayed." This page makes redirect to the scheduled advertisment page "

Where do you need to specify that there is a advertisment page to enable the radvert.html file?

Please help me, I do not know what to do anymore, thank you
 
User avatar
pukkita
Trainer
Trainer
Posts: 3051
Joined: Wed Dec 04, 2013 11:09 am
Location: Spain

Re: Special configuration help

Sat Jun 03, 2017 1:23 pm

Where do you need to specify that there is a advertisment page to enable the radvert.html file?
Add a new user profile on IP > Hotspot > User Profiles, you'll notice there's an Advertise tab not visible on the default User profile.
 
brunoreale
just joined
Topic Author
Posts: 8
Joined: Fri Jun 02, 2017 2:33 pm

Re: Special configuration help

Sat Jun 03, 2017 2:09 pm

Pukkita, I would kiss you if I was near :shock:
I found the card, I ticked the flag advertise, I put it in the URL field http://172.16.1.2/index.html and I created a user with this profile.
I try to login with this user but after authentication, I will go directly to the required page eg: www.speedtest.net
What is missing?
 
brunoreale
just joined
Topic Author
Posts: 8
Joined: Fri Jun 02, 2017 2:33 pm

Re: Special configuration help

Sat Jun 03, 2017 3:30 pm

So let's take the point of the situation.
The system works but is not the result I expected. I would like to create a situation where the user should view the advertisement before it can proceed. For example, the customer connects to the hot spot and, before authenticating, must start an ad page with a movie. Only at the end of the movie will have to appear the login page.
I've already prepared the ad page for it and it is on the webserver. The movie automatically starts, and at the end of it a button is displayed that allows you to go to the authentication page.

To achieve this, the only way is to replace the normal login page with a redirection to the page on the webserver and whose address was placed in the walled garden.
The problem is that if I rename login.html in login2.html and enter a html html file called login.html that does not invoke http://172.16.0.2/index.html, I find myself in a continuous loop calling logins. html.

Obviously I have to include some router servlet references in the new page but I do not know which one.