How to configure Mikrotik router

Goal of this tutorial is to just give you basic connectivity for your network, so that your machines can get IP addresses and go to the internet.

I will be using Mikrotik RB RouterOS v. 6.46.1

These are the settings for my LAB:

Internet (via fixed IP)

WAN IP: 172.16.57.131/30

Gateway: 172.16.57.130/30

LAN interface: 10.50.50.0/24

Login to Winbox on the router you plan to configure. If you don’t know how to login to your router – https://www.informaticar.net/how-to-find-mikrotik-router-on-network/

I’m doing this in a virtual LAB, but on physical router I use Ethernet port 1 for internet access (WAN) and port 2-4/5 (depends how much ports you have) for LAN access.

After you’re logged into Winbox, click on Quick Set on top of the left menu. 

Here is a quick rundown of options.

Configuration – you select between Router and a Bridge. I’m configuring mine as router.

Internet – select your connection type – I have static public IP address so I will select static. You can also select Automatic (then Mikrotik will pull IP address from a source that provides internet – another router) and PPoE for which you will need settings your ISP provided.

You can see my IP settings for the internet, I also entered Google DNS servers – 8.8.8.8 and 8.8.4.4

Local Network – for my LAN I selected 10.50.50.0/24 subnet and entered IP address 10.50.50.1 and that will be address of my router accessible from the LAN. I also selected DHCP server for the LAN, that means that every PC you connect to your Mikrotik router (or in switch if Mikrotik router is connected to it) will get IP address from it.

DHCP server is not mandatory, you can skip it if you don’t need it.

I also changed Router Identity under System and left everything else as is.

When you are done – Apply | OK

Now, two more thing we need to set:

First, go to IP | Routes

You should see route that says Dst.Address 0.0.0.0/0 and Gateway 172.16.57.130 (reachable ether 1) – gateway is gateway address we entered in Quick Set under Internet Settings. All of your routes should be reachable. If they are not, check your physical network config and IP addresses you got.

In case you don’t have that 0.0.0.0/0 route click on a plus (+) sign

/Part for those who don’t have static route mentioned above.

This screen you only need if you don’t have to route mentioned above!! We will enter route mentioned above manually. Enter Dst. Address 0.0.0.0/0 and enter Gateway 172.16.57.130 (of course you will change this with your gateway address). Apply – OK.

You should now have that route.

/End of part for those who don’t have static route mentioned above.

Second thing is again, in IP menu, but this time under Firewall.

Select NAT tab and plus(+) sign

On New NAT Rule screen, under Action tab, select Masquerade

Stay on New NAT Rule screen and go to General tab. Under chain, select srcnat. Confirm with Apply – OK 

Now, if you done everything correctly, you should be able to access the internet from the PC that is connected with Mikrotik router and has IP address from Mikrotik Router LAN pool (in my case 10.50.50.0/24)

Disclaimer