fbpx

I use a MikroTik hotspot and I want the login to be with 3 questions so that the hotspot users have Internet. How do I do that?

Implementing an authentication system based on 3 questions for users of a MikroTik hotspot requires specific customization of the hotspot login page.

MikroTik allows you to completely customize the pages that users see when they connect to the hotspot, including the login page.

Here is a general approach on how you can achieve this:

Step 1: Access Hotspot Files

First, you need to access the hotspot configuration files. This can be done through WinBox or via FTP/SSH.

  • In WinBox: Go to Files, and you will find a folder called Hotspot. Inside this folder will be all the files related to your hotspot, including the login page (login.html).

Step 2: Modify the Login Page

To add security questions to the login process, you will need to edit the file login.html (or the file used as the login page, which may vary depending on your configuration). You will need basic knowledge of HTML and possibly JavaScript to make these modifications.

  1. Add Questions: Incorporate the three questions directly into the HTML code. You can use form fields (<input> o <select>) for users to respond.
  2. Response Validation: To validate responses, you can use JavaScript. The idea is to check that the answers are correct before allowing the form to be submitted. Please note that this validation method is visible to the user and should not be used for sensitive or security-critical information.
  3. Modify the Shipping Process: Make sure the form is only submitted if the answers are correct. This can be done by intercepting the form's submit event with JavaScript.

Step 3: Upload Modified Files

Once you have modified the login page according to your needs, you must upload the modified file back to your MikroTik file system.

  • Use WinBox or an FTP/SSH connection to upload the file login.html modified to the hotspot folder.

Step 4: Test the Hotspot

After uploading your changes, it is crucial to test the hotspot's operation:

  1. Connect to the Hotspot: Use a device that is not currently authenticated.
  2. Answer the questions: Try to access the internet by answering the questions implemented.
  3. Verify the Connection: Make sure that the Internet connection is enabled only after you answer the questions correctly.

Security Considerations

  • Client-side validation (JavaScript) is useful for functionality and user interaction but is not safe for validating sensitive information as it can be easily altered or bypassed. For critical issues, you should implement server-side validations.
  • Consider the privacy and sensitivity of the questions you ask. Because this implementation is not secure, you should not use questions that require answers that could compromise the user's security or privacy if intercepted.

This approach is basic and is intended to add an extra layer of interaction before Internet access on a MikroTik hotspot.

For more complex or secure implementations, you may need more advanced customizations or even develop a backend system that handles authentication more securely.

There are no tags for this post.
Did this content help you?
Facebook
Twitter
LinkedIn
WhatsApp
Telegram

Other documents in this category

Leave your comment

Your email address will not be published. Required fields are marked with *

Tutorials available at MikroLABs

No Courses Found!

DISCOUNT CODE

AN24-LIB

applies to MikroTik books and book packs

Days
Hours
Minutes
Seconds

Introduction to
OSPF - BGP - MPLS

Sign up for this Free course

MAE-RAV-ROS-240118
Days
Hours
Minutes
Seconds

Sign up for this Free course

MAS-ROS-240111

Promo for Three Kings Day!

KINGS24

15%

all the products

MikroTik courses
Academy courses
MikroTik books

Take advantage of the Three Kings Day discount code!

* promotion valid until Sunday January 7, 2024
** the code (KINGS24) applies to shopping cart
*** buy your course now and take it until March 31, 2024

New Year's Eve Promo!

NY24

20%

all the products

MikroTik courses
Academy courses
MikroTik books

Take advantage of the New Year's Eve discount code!

* promotion valid until Monday, January 1, 2024
** the code (NY24) applies to shopping cart
*** buy your course now and take it until March 31, 2024

Christmas discounts!

XMAS23

30%

all the products

MikroTik courses
Academy courses
MikroTik books

Take advantage of the discount code for Christmas!!!

**codes are applied in the shopping cart
Promo valid until Monday December 25, 2023

CYBER WEEK DISCOUNTS

CW23-MK

17%

all MikroTik OnLine courses

CW23-AX

30%

all Academy courses

CW23-LIB

25%

all MikroTik Books and Book Packs

Take advantage of the discount codes for Cyber ​​Week!!!

**codes are applied in the shopping cart
Promo valid until Sunday December 3, 2023

BLACK FRIDAY DISCOUNTS

BF23-MX

22%

all MikroTik OnLine courses

BF23-AX

35%

all Academy courses

BF23-LIB

30%

all MikroTik Books and Book Packs

Take advantage of the discount codes for Black Friday!!!

**Codes are applied in the shopping cart

codes are applied in the shopping cart
valid until Sunday November 26, 2023

Days
Hours
Minutes
Seconds

Sign up for this Free course

MAE-VPN-SET-231115

Halloween promo

Take advantage of discount codes for Halloween.

Codes are applied in the shopping cart

HW23-MK

11% discount on all MikroTik OnLine courses

11%

HW23-AX

30% discount on all Academy courses

30%

HW23-LIB

25% discount on all MikroTik Books and Book Packs

25%

Register and participate in the free course Introduction to Advanced Routing with MikroTik (MAE-RAV-ROS)

Today (Wednesday) October 11, 2023
7pm to 11pm (Colombia, Ecuador, Peru)

MAE-RAV-ROS-231011