Hi everyone, in this post I want to show you how to set up MikroTik NAT masquerade so your clients can access the internet. Almost every beginner runs into this at some point: the client already has an IP and can ping the router, but still cannot open any website. The most common cause is a NAT rule that is missing or set up the wrong way.
We actually created the NAT masquerade rule back in the guide on MikroTik basic configuration with Winbox for beginners. This time we will go deeper with real tests: turning NAT off and watching what happens, proving the IP address change with Torch, reading the counters and the connection table, and finally using a WAN interface list just like the RouterOS default configuration. The lab is a MikroTik CHR running RouterOS 7.25.2 with ether1 as the WAN (10.0.2.15) and ether2 as the LAN (192.168.56.0/24). The client gets the IP 192.168.56.101 from the MikroTik DHCP server.
What Is NAT Masquerade
The ranges 192.168.x.x, 10.x.x.x, and 172.16 to 172.31 are private IPs that cannot be used on the internet. When a client sends a packet to the internet, the router has to replace the source IP of that packet with the router’s WAN IP. This process is called source NAT. Masquerade is a type of source NAT that automatically uses whatever IP is currently assigned to the WAN interface.
According to the MikroTik documentation, masquerade is designed for public IPs that can change at any time, for example an IP from the ISP’s DHCP or from PPPoE. If your WAN IP is static, the documentation recommends src-nat with to-addresses instead, because connections can carry on right away after the link briefly drops.
Masquerade : dynamic WAN IP (DHCP, PPPoE), the most practical option
Src-nat : static WAN IP, set to-addresses to the public IPTest 1: Normal Conditions with NAT
The client has internet

On the client, the default route points to 192.168.56.10 (the router) and pinging 8.8.8.8 works with 0% packet loss. This is the normal state, because the masquerade rule is already active.
Test 2: What Happens Without NAT
Disable the masquerade rule

Open IP and then Firewall, and go to the NAT tab. Click the masquerade rule and then click Disable.
The rule is now disabled

The rule now has the X flag, which means disabled.
Clear the old connections

This step is easy to forget. NAT is only processed on the first packet of each connection, so existing connections keep using the old rules. The MikroTik documentation says the connection tracking table should be cleared every time you change a NAT rule. Open New Terminal and run the following command.
/ip firewall connection remove [find]The client has no internet

On the client, pinging 8.8.8.8 now fails completely with 100% packet loss. The tracepath result also only reaches hop 1 (the router at 192.168.56.10), followed by no reply.
ping -c 3 8.8.8.8
tracepath -n -m 4 8.8.8.8On Windows, use ping 8.8.8.8 and tracert -d 8.8.8.8.
Prove it with Torch

While the client keeps pinging, run Torch on ether1.
/tool torch interface=ether1 src-address=0.0.0.0/0 dst-address=0.0.0.0/0 ip-protocol=anyYou can see ICMP packets between 8.8.8.8 and 192.168.56.101 going out through ether1 with TX 784bps but RX 0bps. That means the packets leave the router still carrying the client’s private IP, so the replies never come back. This is exactly why the client has no internet without NAT. Press q to exit Torch.
Test 3: Enable NAT Again
Enable the masquerade rule

Go back to the NAT tab, click the masquerade rule, and then click Enable. After that, run /ip firewall connection remove [find] again so the old ping connection that was never NATed gets removed too.
The client has internet again

Pinging 8.8.8.8 works again. Tracepath now passes the router and reaches hop 2, which is 10.0.2.2 (the gateway on the WAN side). The next hops show no reply because many devices on the internet simply do not answer tracepath, and that is normal.
Torch shows the WAN IP

Run Torch on ether1 again. This time the ICMP packets to 8.8.8.8 show up with the address 10.0.2.15, the router’s WAN IP, instead of 192.168.56.101. Masquerade has replaced the source IP of the packets before they go out to the internet.
Check the counter and the connection table

/ip firewall nat print stats
/ip firewall connection print where srcnat and protocol=icmpThe masquerade rule counter shows 69 packets and about 15 KB already processed. In the connection table, the ICMP connection from 192.168.56.101 to 8.8.8.8 has the s (SRCNAT) flag, with 18 packets sent and 18 replies. These two commands are the quickest way to confirm that NAT is really working.
My experience: The first time I tested this, I almost got fooled. After disabling NAT, if you do not clear the connection table, a ping that is already running can keep using the old connection, and the results get confusing. Since then I always run /ip firewall connection remove [find] every time I change a NAT rule in the lab.
Using a WAN Interface List
The RouterOS default configuration on RouterBOARD devices does not use out-interface, it uses out-interface-list=WAN. The advantage is that if you add a second ISP later, you only need to add its interface to the WAN list without touching the NAT rule.
Create the WAN list and use it in the NAT rule

/interface list add name=WAN
/interface list member add list=WAN interface=ether1
/ip firewall nat set [find action=masquerade] !out-interface out-interface-list=WAN
/ip firewall nat printThe print output shows the rule chain=srcnat action=masquerade out-interface-list=WAN. In WinBox, you create the list under Interfaces in the Interface List tab, then in the NAT rule set Out. Interface List to WAN.
The client still has internet

The client can still ping google.com with 0% packet loss, which means the new rule with the WAN interface list works just as well.
Common Problems and How to Fix Them
The client can ping the router but has no internet
Check the NAT rule in IP Firewall, on the NAT tab. Make sure the chain is srcnat, the action is masquerade, and Out. Interface or Out. Interface List points to the WAN, not the LAN. If Out. Interface is set to ether2 by mistake, packets going to the internet will not be NATed.
The NAT counter stays at 0
This means no packets match the rule. Check whether the rule is disabled, whether another NAT rule sits above it, and whether the client is really using the router as its gateway.
Changing the NAT rule does not change the result right away
Clear the connection table with /ip firewall connection remove [find]. NAT is only processed on the first packet, so connections that are already running keep using the old rules.
The internet drops after the WAN IP changes
This is normal masquerade behavior. According to the MikroTik documentation, when the WAN interface goes down or its IP changes, the router removes all connections masqueraded through that interface, and the clients then open new connections with the new IP.
That is it, you now understand how NAT masquerade works, you have seen for yourself what happens when there is no NAT, and you know how to prove NAT is working with Torch, the counters, and the connection table. In the next article we will cover the MikroTik DNS server and Allow Remote Requests. If your clients still cannot reach the internet, post your ping and tracert results in the comments below.












