0

I am fairly new to MikroTik RouterOS and I was wondering if the following logic is correct:

When configuring Hotspot feature of a MikroTik router with External login page as explained here, with the login page being a custom PHP/ASP/etc. hosted on the web, when user successfully authenticates on the said page, how does the web page then inform the MikroTik router about successful authentication? By setting a cookie? What I am trying to achieve is to have a website that hosts a separate database of usernames, and a login page on this website that the MikroTik router's Hotspot feature would redirect to when connection is established and authenticate the users there. I understand that using a RADIUS server would do the same but I am trying to build this using custom database of users.

0

When you have finished your login process, your webpage must redirect the user to the Mikrotik controller, like in this PHP example:

  $body = "<html><body onload='connexion.submit()'>";
  $body .= "<form name='connexion' action='https://[Your_Controller_IP]/login' method='post'>";
  $body .= " <input type='hidden' name='popup' value='false'>";
  $body .= " <input type='hidden' name='username' value='$username'>";
  $body .= " <input type='hidden' name='password' value='$password'>";
  $body .= "</form>";
  $body .= "</body></html>";
  echo $body;
  die();

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.