Let me be frank folks. I enjoy writing about my daily tech problems and like posting solutions based on my personal research. And this one is new in that this shall be my very first article about Mikrotik routers – Configure Mikrotik to NAT between LAN ports.
The highlight of Mikrotik routers is the RouterOS system, which provides all you will be need about the network, you have a router, switch, firewall, and more in only one device. Also is a complete platform in all related to wireless networks and radio links, on the other hand, the GUI provided by Winbox is very simple and easy to learn.
Today I shall provide you with a simple solution to NAT between LAN ports on a Mikrotik router.
This might sound so simple and yet many Mikrotik users struggle with this configuration. The main function of a router is to route and should be easily configurable but unfortunately not.
Take it that Ether2 has been configured with the IP Network 192.168.1.0/24, and ether3 has been configured with the IP Network 192.168.2.0/24. The most basic configuration to achieve NAT between LAN ports on Mikrotik would be to browse to Firewall under Firewall>NAT shall be as follows:
/ip firewall nat add chain=srcnat action=masquerade out-interface=ether2 src-address=192.168.2.0/24 add chain=srcnat action=masquerade out-interface=ether3 src-address=192.168.1.0/24
You could be even more specific and only NAT when the destination address is that of the device that can only accept traffic from its local network. Of course order matters with NAT rules, so make sure they are in a sensible position of the ruleset.
And that is how simple it is. Feel free to drop me a comment or click here to get in touch with me.