This little guide takes you through a step-by-step approach to setting up a simple hotspot using the excellent MikroTik RouterOS software. Some detail and explanations are left out to keep things clearer. This guide assumes that you have installed RouterOS v2.8.7 and upwards.
(The system restores itself to a clean install state and reboots)
[admin@MikroTik] > system reset
Let’s see what interfaces we have on the computer:
(You can see that there are two Ethernet ports on this computer, both disabled)
[admin@MikroTik] > /interface print Flags: X – disabled, D – Dynamic, R - Running # NAME TYPE MTU 0 X ether1 ether 1500 1 X ether2 ether 1500
So let’s enable them both:
Let’s give the Ethernet ports names, as it’s getting complicated already:
[admin@MikroTik] interface> set 0,1 disabled=no [admin@MikroTik] interface> print Flags: X – disabled, D – Dynamic, R - Running # NAME TYPE MTU 0 R ether1 ether 1500 1 R ether2 ether 1500
We can now more easily refer to the interfaces by name, which is also easier to remember. Now, let’s set up the address of Ethernet card on the internet side. In this case, we’re going to call the MikroTik box 192.168.1.2 and the gateway (ie the broadband router) as 192.168.1.1 and the DNS given to you by your ISP. In this case, our example is using the DNS from Plusnet of 188.8.131.52
[admin@MikroTik] interface> set 0 name=”hotspot” [admin@MikroTik] interface> set 1 name=”internet” [admin@MikroTik] interface> print Flags: X – disabled, D – Dynamic, R - Running # NAME TYPE MTU 0 R internet ether 1500 1 R hotspot ether 1500
To speed things up a little, you can cache dns requests local to the MikroTik box as follows:
[admin@MikroTik] > /ip [admin@MikroTik] ip> address add address=192.168.1.2/24 interface=internet [admin@MikroTik] ip> route add gateway=192.168.1.1 [admin@MikroTik] ip> dns [admin@MikroTik] ip dns> set primary-dns=184.108.40.206 [admin@MikroTik] ip dns> set secondary-dns=220.127.116.11
Now set up the hotspot side:
[admin@MikroTik] ip dns> set allow-remote-requests=yes [admin@MikroTik] ip dns> ..
This is a feature that allows remote computers to connect even if they have totally different network settings already set up on them
[admin@MikroTik] ip> hotspot [admin@MikroTik] ip hotspot> setup Select interface on which to run HotSpot Hotspot interface: hotspot Enable universal client configuration? Enable universal client: yes
(We have to enter here the IP address of your ISP SMTP server, or otherwise put the address of your local one. If you don’t have one, then just give it an an address on the “internet” side of the MikroTik box)
Local address of hotspot network gateway: 10.5.50.1/24 Masquerade hotspot network: yes Address pool of hotspot network will be: 10.5.50.2-10.5.50.254 ip address of smtp server: 192.168.1.3
We enter here the IP address of the MikroTik box on the "internet" side, becasue we have already set up a DNS cache earlier.
Use local DNS cache? use local DNS cache: yes Setup DNS Configuration dns servers: 192.168.1.2
(This is the hotspot administrator username and password – keep the details safe)
Name of hotspot user: admin Password for the user: admin
The port that you specify here is the port for Winbox.
Select another port for (www) service Another port for service: 8081
And that’s about it. Connect to your MikroTik box from either the internet side using the address of http://192.168.1.2:8081 or on the hotspot side (use your admin password).
Use transparent web proxy for hotspot clients? Use transparent web proxy: yes
Download the Winbox from that link, and go to the Hotspot section to manage users.
And there you have it – your Hotspot.