Blog.gowifi

Blog.gowifi

logos (other)

Logos

Go Wireless NZ

Monday, September 30, 2013

Basic MikroTik Hotspot Configuration Part 1


Scenario:
In this example we will explain the basics of configuring a MikroTik Hotspot. 

Preparation:
This basic example requires prior knowledge of accessing MikroTik RouterOS via winbox or terminal.

Step 1:
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.
[admin@MikroTik] > /interface bridge add name=hotspot_lan
[admin@MikroTik] > /interface bridge port add bridge=hotspot_lan interface=ether2
[admin@MikroTik] > /interface bridge port add bridge=hotspot_lan interface=ether3

Step 2:
Add a DHCP client to ether1 (this will be our WAN port for the purposes of this example and connect to our ADSL Modem.
[admin@MikroTik] > /ip dhcp-client add interface=ether1 add-default-route=yes use-peer-dns=yes use-peer-ntp=yes disabled=no

Step 3:
Allow DNS Remote requests (this allows your router to accept and process DNS requests received from your internal network).
[admin@MikroTik] > /ip dns set allow-remote-requests=yes

Step 4:
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 (124.108.96.158 - 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.

[admin@MikroTik] > /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: 124.108.96.158
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


Step 5:
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!

Important:
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.

3 comments:

  1. sir is there any way I know what SMTP server in my country? or should I just add yours like the article above? :)

    ReplyDelete
  2. Thanks a lot of for informative post. I already get benefited form the post, So, Thanks a lot of admin for the good post. I have a same like blog that name is hotspot setup Hotspot Setup if you want to know bit more about Hotspot setup.

    ReplyDelete
  3. in my case, hotspot.local is invalid name. It is reachable only from mikrotik itself (ping from mikrotik terminal), not from connected PC clients. Standard domain name like hotspot.mydomain.com works OK.

    ReplyDelete