D
D
DenZel2016-10-26 08:58:07
Computer networks
DenZel, 2016-10-26 08:58:07

When connected to a Wi-Fi network, redirect only to the desired site?

Good afternoon everyone!
Tell me how you can set up a trace on Mikrotik equipment:
when you connect to a wifi network, only the desired site immediately pops up on your mobile device.
as I understand it, in this case, hotspot is not needed, you just need to set up forwarding to the site ... although I have a lot of doubts about this ... tell me who set it up and "dig" into the cube side ...
thanks

Answer the question

In order to leave comments, you need to log in

6 answer(s)
J
JaHher, 2016-10-27
@JaHher

Hotspot тебе поможет. Поднимаешь, изменяешь html в файле login.html так чтобы эта страница тупо переадресовывала на нужный тебе адрес, отключаешь trial. Добавляешь нужный адрес в walled garden ip list и вуаля: никакого интернета и доступ только на твою страницу.

I
Ilya Demyanov, 2016-10-26
@turbidit

Если коротко, и строго по вашему ТЗ, то нужно что-то вроде этого:

ip firewall nat add chain=dstnat dst-port=80,443 in-interface=wlan protocol=tcp action=dst-nat  to-addresses
=192.168.0.1

A
Arman, 2016-12-19
@Arik

1. Quotes cannot be reused, if you need to use them in the text, you must escape them with a backslash
2. You misunderstood access to array data by keys, first specify the variable, then the key, and then the property of the object, if the value is an object
3. ++ - this is a short operator + 1, you need one plus sign to concatenate strings in JS
https://jsfiddle.net/cwejoono/1/

E
Eugene, 2016-12-19
@Eugen_p

Here , I advise you to read

A
Alexander, 2016-12-19
@WDMGroup

Bypass the array (loop) forgot, see how Sergey Sergey

U
uniquenicknqame, 2017-01-12
@uniquenicknqame

this "code" is one continuous error from all sides.
Here is a very short code for you, too, shitty code, but not so terrible and working:

var employees = [{
  firstName: 'Виталий',
  lastName: 'Ильин',
  birthDate: new Date(1992, 05, 28),
  position: 'Верстальщик',
  isIntern: true,
}, {
  firstName: 'Сократ',
  lastName: 'Константинов',
  birthDate: new Date(1965, 02, 14),
  position: 'JS-разработчик',
  isIntern: false,
}, {
  firstName: 'Галина',
  lastName: 'Наумова',
  birthDate: new Date(1990, 01, 18),
  position: 'Верстальщик',
  isIntern: false,
}, {
  firstName: 'Комаров',
  lastName: 'Павел',
  birthDate: new Date(1985, 07, 19),
  position: 'JS-разработчик',
  isIntern: false,
}, {
  firstName: 'Маргарита',
  lastName: 'Лазарева',
  birthDate: new Date(1993, 04, 23),
  position: 'JS-разработчик',
  isIntern: true,
}];

var html = '<table>';
html += '<tr><td>№</td><td>Фамилия Имя</td><td>Возраст</td><td>Должность</td><td>Стажировка</td></tr>';
employees.forEach(function(employee, idx) {
  html += '<tr><td>' + (idx + 1) + '</td><td>' + employees[idx].firstName + ' ' + employees[idx].lastName + '</td><td>' + employees[idx].birthDate.toLocaleDateString() + '</td><td>' + employees[idx].position + '</td><td>' + employees[idx].isIntern + '</td></tr>';
})

html += '</table>';
document.getElementById('result').innerHTML = html;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question