MikroTik Basic Setup: Get Your First Router Online

Ten short steps to take a MikroTik router from an empty box to a working, protected office or home network.

A new MikroTik router does nothing useful until you tell it three things: where the internet comes in, where your local network is, and how devices should get their addresses. This guide walks through those steps on RouterOS v7 using the terminal, so you understand what each setting actually does.

Think of the router as the reception desk of an office building. The internet line is the main entrance, your LAN is the office floor, and the router decides who gets a desk number (an IP address) and who may go in or out.

What you need

  • A MikroTik router (hAP, RB or similar)
  • Winbox, downloaded from mikrotik.com
  • An internet line from your ISP that gives an address automatically (DHCP)
  • A laptop and two network cables

Our example network

ItemValue
Internet (WAN) portether1
LAN portsether2 to ether5
LAN network192.168.88.0/24
Router LAN address192.168.88.1

Step 1: Connect and log in

Plug the ISP cable into ether1 and your laptop into ether2. Open Winbox, go to the Neighbors tab, pick your router by its MAC address and log in as admin. New routers use either an empty password or the password printed on the sticker. Then open New Terminal: every command below is typed there.

This guide builds the configuration by hand. If the router still has its default configuration, some items (like a bridge and a DHCP server) already exist. To practise from a clean start, use System → Reset Configuration with No Default Configuration ticked, then reconnect in Winbox by MAC address.

Step 2: Secure the router first

/user set [find name=admin] password=Use-A-Strong-Password
/system identity set name=Office-Router

Never leave the admin password empty. The identity is only a name, but it helps when you manage several routers.

Step 3: Bridge the LAN ports

/interface bridge add name=bridge-lan
/interface bridge port add bridge=bridge-lan interface=ether2
/interface bridge port add bridge=bridge-lan interface=ether3
/interface bridge port add bridge=bridge-lan interface=ether4
/interface bridge port add bridge=bridge-lan interface=ether5

A bridge joins several ports into one network, like a small switch built into the router. Winbox may disconnect for a moment when ether2 joins the bridge; just reconnect.

Step 4: Give the router a LAN address

/ip address add address=192.168.88.1/24 interface=bridge-lan

This address becomes the default gateway for every device on your network.

Step 5: Get internet from your ISP

/ip dhcp-client add interface=ether1 disabled=no
/ip dhcp-client print

After a few seconds the status should show bound, with an address from your ISP. If your ISP uses PPPoE or a fixed IP instead, ask them for the details. The rest of the guide is the same, except the NAT rule in Step 8 must use the PPPoE interface instead of ether1.

Step 6: Hand out addresses to devices (DHCP server)

/ip pool add name=lan-pool ranges=192.168.88.10-192.168.88.254
/ip dhcp-server add name=lan-dhcp interface=bridge-lan address-pool=lan-pool disabled=no
/ip dhcp-server network add address=192.168.88.0/24 gateway=192.168.88.1 dns-server=192.168.88.1

Devices plugged into ether2 to ether5 now receive an address automatically, starting from .10. Addresses .2 to .9 stay free for printers or servers that need fixed IPs.

Step 7: Set up DNS

/ip dns set servers=1.1.1.1,8.8.8.8 allow-remote-requests=yes

DNS turns names like google.com into IP addresses. This setting lets the router answer those lookups for your devices. It would also answer them from the internet, which Step 9 blocks.

Step 8: Share the internet connection (NAT)

/ip firewall nat add chain=srcnat out-interface=ether1 action=masquerade

Your ISP gives you one public address, but you have many devices. Masquerade lets all of them share that one address, the way many staff in a company share one public phone number through a switchboard.

Step 9: Protect the router with a basic firewall

/ip firewall filter add chain=input connection-state=established,related,untracked action=accept comment="allow replies"
/ip firewall filter add chain=input connection-state=invalid action=drop comment="drop invalid"
/ip firewall filter add chain=input protocol=icmp action=accept comment="allow ping"
/ip firewall filter add chain=input in-interface=ether1 action=drop comment="drop everything else from internet"

These rules protect the router itself. Replies to traffic the router started are allowed, ping is allowed, and every other connection from the internet to the router (including Winbox and DNS) is dropped. Order matters: MikroTik checks rules from top to bottom and stops at the first match.

Step 10: Test

/ping 8.8.8.8 count=4
/ping google.com count=4

On your laptop, run ipconfig (Windows), check that you got a 192.168.88.x address, then open a website.

If something does not work

  • No ISP address on ether1: check the cable, and ask your ISP whether they use DHCP, PPPoE or a static IP.
  • Laptop shows 169.254.x.x: the DHCP server is not reaching it. See our DHCP troubleshooting guide.
  • Ping 8.8.8.8 works but websites do not open: check DNS (Step 7).
  • The router reaches the internet but devices do not: check the NAT rule (Step 8).

What to learn next

Once this works, the next topics are firewall rules for traffic passing through the router (the forward chain), VLANs, and bandwidth control with queues. All of these are part of the MikroTik MTCNA course.