Y
Y
yurnov2015-09-28 11:23:36
Mikrotik
yurnov, 2015-09-28 11:23:36

How to make NAT work on RouterOS if the simple and explicit solution doesn't work?

Strange situation with RouterOS 6.32.2 on RB951G, theoretically NAT is enabled with one simple command:

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

(in my case, ether5 acts as a WAN port)
In fact, NAT does not work. Additionally did:
/ip firewall connection tracking set enabled=auto
also tried
/ip firewall connection tracking set enabled=yes
As a result, from the LAN (bridge1) the default gateway of the WAN port (ether5) is not pinged. Just in case, I removed all the rules / ip firewall filter
Should work, but does not work, can someone tell me what I missed?
UPD: it looks like I found what I missed, in the section:
/ip dhcp-server network
add address=10.10.x.y/25 gateway=10.10.x.z netmask=25

My DHCP server was giving the wrong gateway IP address. Thanks Alexander Karabanov for help

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Y
yurnov, 2015-09-28
@yurnov

Correct answer:
everything is correct, for NAT to work it is enough:

/ip firewall nat add action=masquerade chain=srcnat out-interface=ether5
/ip firewall connection tracking set enabled=auto

The error was that the DHCP server issued the wrong default gw in the section:
/ip dhcp-server network add address=10.10.x.y/25 gateway=10.10.x.z netmask=25

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question