Hi everyone, in this post I want to show you how to set up MikroTik with Winbox, step by step for beginners. This is the basic configuration you really need to master before moving on to other topics like hotspot, bandwidth limits, or VPN. The goal is simple: the MikroTik router gets internet from the ISP and then shares it with the computers on the local network (LAN).
In this article I start from an empty router right after a reset and go all the way until a LAN client can actually ping google.com. The lab is a MikroTik CHR running RouterOS 7.25.2 from the guide on how to install MikroTik CHR in VirtualBox, with WinBox 4.5 from the guide on how to download and use Winbox. The steps are the same on a physical RouterBOARD, you only need to adjust the port names and IP addresses to match your own network.
Topology and IP Plan
The end result

ether1 connects to the internet (in this lab, VirtualBox NAT plays the role of the ISP modem) and gets its IP automatically through DHCP. ether2 connects to the LAN switch where the admin laptop and the client computers sit. The router uses the IP 192.168.56.10 on the LAN side. I did not use 192.168.56.1 because that IP is already taken by the laptop on this lab network.
ether1 (WAN) : DHCP client from the ISP, 10.0.2.15/24 in the lab
ether2 (LAN) : 192.168.56.10/24
LAN client : 192.168.56.20, gateway and DNS 192.168.56.10Before you start, make sure you can already get into the router as shown in the article on how to log in to MikroTik with Winbox. My router was freshly reset, just like in the guide on how to reset MikroTik to factory settings.
Note: A freshly reset router still has an empty password. On a real router, change the admin password right away when the Change Password Now window appears at login. Use a password of at least 12 characters, because according to the MikroTik documentation a lost password cannot be recovered.
Step 1: Name the Router and Label the Interfaces
Open System and then Identity

Click System and then choose Identity.
Change the router Identity

Change the Identity from CHR to a name that is easy to recognize, for example MikroTik-Lab, then click OK. This name shows up in the WinBox title bar and in the terminal prompt, so you will not mix up routers when you manage more than one device.
Add a WAN comment to ether1

Open Interfaces, click ether1, then click the Comment button. Type WAN internet and click OK. Do the same for ether2 with the comment LAN.
The interfaces now have labels

Now the interface list shows the label WAN internet above ether1 and LAN above ether2. These labels also appear whenever you pick an interface in other menus, so the chance of choosing the wrong port is much smaller.
Step 2: Check the Internet Connection on ether1 (WAN)
Open IP and then DHCP Client

Most home ISP modems hand out IPs through DHCP, so ether1 only needs a DHCP client. Click IP and then DHCP Client.
Make sure the status is bound

On CHR, the DHCP client on ether1 is already there from the start and its status is bound with the IP 10.0.2.15/24. If the list is empty on your router, click New, choose Interface ether1, then click OK. The bound status means the router has received an IP from the ISP.
Check the default route

Open IP and then Routes. You will see the route 0.0.0.0/0 to gateway 10.0.2.2 with the DAd flag, which means this route was created automatically by the DHCP client. This route is the router’s way out to the internet.
Step 3: Add an IP to ether2 (LAN)
Add the LAN IP

Open IP and then Addresses, and click New. Fill in Address with 192.168.56.10/24 and choose Interface ether2. Notice that the interface list now shows the LAN label we created earlier. Click OK.
The LAN IP is in place

Now there are two IPs: the dynamic 10.0.2.15/24 on ether1 and 192.168.56.10/24 on ether2. The ether2 IP is the one the client computers will use as their gateway.
Step 4: Set Up DNS
Fill in DNS and enable Allow Remote Requests

Open IP and then DNS. The Dynamic Servers field is already filled in automatically from the ISP’s DHCP. Click the plus sign next to Servers and enter 8.8.8.8 as a backup. Tick Allow Remote Requests so the client computers can use the router as their DNS, then click OK. I will cover DNS in more depth in a dedicated article about the MikroTik DNS server.
Step 5: Create a NAT Masquerade Rule
Without NAT, the client computers can ping the router, but they cannot reach the internet because 192.168.56.x addresses are not known on the internet. NAT masquerade replaces the client IP with the router’s WAN IP when packets leave through ether1.
Open the Firewall NAT tab

Click IP and then Firewall, open the NAT tab, then click New.
Chain srcnat and Out Interface ether1

In the General tab, make sure Chain is set to srcnat. Click the plus sign next to Out. Interface and choose ether1.
Choose the masquerade action

Open the Action tab, choose masquerade, then click OK.
The NAT rule is saved

The NAT masquerade rule with chain srcnat now shows up in the list. If you prefer the terminal, the command is the same as the example in the MikroTik documentation.
/ip firewall nat add chain=srcnat out-interface=ether1 action=masqueradeStep 6: Test from a Client Computer
Set the client IP

On the client computer, set the IP manually with the values below. On Windows, you enter them in the IPv4 settings of the network adapter.
IP address : 192.168.56.20
Netmask : 255.255.255.0
Gateway : 192.168.56.10
DNS : 192.168.56.10My client runs Linux Mint, so I ran the following commands in the terminal.
sudo nmcli con mod "Wired connection 1" ipv4.method manual ipv4.addresses 192.168.56.20/24 ipv4.gateway 192.168.56.10 ipv4.dns 192.168.56.10
sudo nmcli con up "Wired connection 1"
ip -4 addr show enp0s3; ip routeThe ip route output shows default via 192.168.56.10, which means the client is now using the MikroTik router as its gateway. In the next article we will set up a DHCP server so clients get their IP automatically.
Ping the gateway

ping -c 3 192.168.56.103 packets transmitted, 3 received, 0% packet loss means the client is connected to the router.
Ping the internet

ping -c 3 8.8.8.8The ping to 8.8.8.8 works, which means NAT masquerade is doing its job.
Ping a domain name

ping -c 3 google.comgoogle.com was resolved to an IP and replied, which means the router DNS with Allow Remote Requests is working too. At this point the LAN client has internet access.
Step 7: Secure the Router with a Basic Input Firewall
Filter Rules is still empty

Open IP and then Firewall, and go to the Filter Rules tab. On CHR the list turned out to be empty, which means the router has no firewall at all. A physical router with the default configuration usually comes with a few rules, but after a reset without the default configuration it is just as empty.
Add the basic input rules

Open New Terminal, turn on Safe Mode with Ctrl+X as shown in the guide on how to use MikroTik Safe Mode, then run the following commands.
/ip firewall filter
add chain=input connection-state=established,related action=accept comment="izinkan koneksi lanjutan"
add chain=input connection-state=invalid action=drop comment="buang paket invalid"
add chain=input in-interface=ether2 action=accept comment="izinkan dari LAN"
add chain=input in-interface=ether1 action=drop comment="blok akses router dari WAN"The comment values are just labels in Indonesian (allow established connections, drop invalid packets, allow from LAN, block router access from WAN), so feel free to write your own. These rules only protect the router itself (the input chain), so WinBox and DNS access from the internet is closed while the clients’ internet keeps working normally. After making sure the client can still ping google.com, press Ctrl+X again to leave Safe Mode and keep the changes. I will cover a more complete setup in a dedicated article about the MikroTik firewall.
Warning: Firewall rule order matters. Do not put a drop rule before the accept rule for the LAN, or you can lock yourself out of the router. That is exactly why I added these rules inside Safe Mode.
Step 8: Back Up the Configuration
Save a backup and an export

Once everything works, save the configuration.
/system backup save name=konfigurasi-dasar
/export file=konfigurasi-dasarThe file konfigurasi-dasar.backup (19.4 KiB) is used to restore the same router, while konfigurasi-dasar.rsc contains plain text commands you can read and reuse on another router. Download both from the Files menu to your laptop so they stay safe even if the router dies.
My experience: When I ran the firewall commands in New Terminal, my input actually went into the Change your password prompt because the router had just been reset. Luckily none of the entries matched, so I got New passwords do not match and the password stayed the same. So if the terminal still shows Change your password, finish it or press Ctrl+C first before typing any other command.
Common Problems and How to Fix Them
The client can ping the router but not 8.8.8.8
This is almost always because the NAT masquerade rule has not been created or the wrong Out. Interface was chosen. Make sure the srcnat masquerade rule uses the WAN interface, which is ether1 in this lab. Also check the default route in IP Routes.
You can ping 8.8.8.8 but cannot open google.com
The problem is DNS. Make sure Allow Remote Requests is ticked and the client DNS points to the router IP. As a quick test, change the client DNS to 8.8.8.8. If it works right away, the router DNS settings are what need fixing.
The DHCP client status is not bound
Check the cable to the ISP modem, or make sure the ISP actually uses DHCP. If the ISP gives you a static IP, enter it in IP Addresses and create a default route manually to the ISP gateway. If the ISP uses PPPoE, use a PPPoE client instead.
Locked out after creating the firewall
Log in again through the MAC address in the WinBox Neighbors tab, because a MAC connection does not go through the IP firewall. Then check the rule order in Filter Rules.
That is it, your MikroTik router is now connected to the internet, shares that connection with the LAN through NAT, serves DNS to clients, is protected by a basic input firewall, and has its configuration backed up. The next articles will go deeper into each part one by one, starting with a DHCP server so clients get their IP automatically. If any step fails on your router, just drop the error message in the comments below.












