Monday, September 30, 2013
Basic MikroTik Hotspot Configuration Part 1
In this example we will explain the basics of configuring a MikroTik Hotspot.
This basic example requires prior knowledge of accessing MikroTik RouterOS via winbox or terminal.
Create a bridge and add the interfaces you wish to be used with the hotspot (i have decided anything connected to ether2 and ether3 will be using the Hotspot.
[[email protected]] > /interface bridge add name=hotspot_lan
[[email protected]] > /interface bridge port add bridge=hotspot_lan interface=ether2
[[email protected]] > /interface bridge port add bridge=hotspot_lan interface=ether3
Add a DHCP client to ether1 (this will be our WAN port for the purposes of this example and connect to our ADSL Modem.
[[email protected]] > /ip dhcp-client add interface=ether1 add-default-route=yes use-peer-dns=yes use-peer-ntp=yes disabled=no
Allow DNS Remote requests (this allows your router to accept and process DNS requests received from your internal network).
[[email protected]] > /ip dns set allow-remote-requests=yes
Create your hotspot using the hotspot setup wizard. With the following wizard we will:
1. Configure hotspot_lan bridge with ether2 and ether3 as our hotspot interface.
2. Set the IP address of the hotspot_lan bridge as 10.5.50.1
3. Masquerade (NAT) all outgoing traffic through the hotspot interface (allows internet connectivity).
4. Create an DHCP pool for hotspot users to receive IP addresses between 10.5.50.2-10.5.50.254.
5. We will not be using SSL Certificates for this example.
6. Set the SMTP server to our connection providers SMTP server (188.8.131.52 - send.xtra.co.nz) this will allow users to send and receive emails without changing their mail settings provided they use standard port 25 for sending. Any mail clients that are configured with different port setting will not work.
[[email protected]] > /ip hotspot setup
Select interface to run HotSpot on
hotspot interface: hotspot_lan
Set HotSpot address for interface
local address of network: 10.5.50.1/24
masquerade network: yes
Set pool for HotSpot addresses
address pool of network: 10.5.50.2-10.5.50.254
Select hotspot SSL certificate
select certificate: none
Select SMTP server
ip address of smtp server: 184.108.40.206
Setup DNS configuration
dns servers: 10.5.50.1
DNS name of local hotspot server
dns name: hotspot.local
Create local hotspot user
name of local hotspot user: admin
password for the user: admin
1. Connect your computer to ethernet port 2 or 3 of the MikroTik Router.
2. Open your browser.
3. If your browser does not automatically redirect you to the MikroTik Hotspot Gateway Login try navigating to google.com or alternatively hotspot.local (hotspot dns name created in hotspot setup).
4. enter user login (admin) and password (admin) we created in the hotspot setup.
5. Verify you have internet connectivity!
The hotspot redirect will not work unless you are connected to the internet as it requires DNS resolution to redirect you to the login page.