Firmware: 3.27
RouterOS: 6.36.3
Hello people.
There is a network as described on scheme:
Code: Select all
/interface vlan
add interface=eth5 name=vlan2 vlan-id=2
/ip address
add address=4.4.4.4/24 interface=eth1 network=4.4.4.0
add address=192.168.1.1/24 interface=eth5 network=192.168.1.0
add address=192.168.2.1/24 interface=vlan2 network=192.168.2.0
/ip firewall nat
add action=src-nat chain=srcnat out-interface=eth1 src-address=192.168.1.0/24 to-addresses=4.4.4.4
add action=src-nat chain=srcnat out-interface=eth1 src-address=192.168.2.0/24 to-addresses=4.4.4.4
/ip firewall mangle
add action=accept chain=postrouting connection-nat-state="" log=yes src-address=192.168.1.0/24
add action=accept chain=postrouting connection-nat-state="" log=yes src-address=192.168.2.0/24
As you can see Mangle rules are set only for journalling purpose. First mangle rule makes log print following (when i ping 8.8.8.8 from 192.168.1.2 machine):
everything is fine, i can ping 8.8.8.8 from 192.168.1.2.postrouteing: in:(none) out:eth1, src-mac: af:01:32:55:8a:cc, proto ICMP (type 8, code 0), 192.168.1.2->8.8.8.8, NAT (192.168.1.2->4.4.4.4)->8.8.8.8, len 60
But second mangle rule print this (when i ping 8.8.8.8 from 192.168.2.2 machine:
and nat rule for these packets does not applied at all, so no one icmp packet comming back...postrouteing: in:(none) out:eth1, src-mac: af:01:32:55:8a:cc, proto ICMP (type 8, code 0), 192.168.2.2->8.8.8.8, prio 2->0, len 60
What's wrong with my configuration?
Wiki says http://wiki.mikrotik.com/wiki/Manual:Packet_Flow that after Mangle postrouting table Source NAT table should be applied, why my
Code: Select all
/ip firewall nat
add action=src-nat chain=srcnat out-interface=eth1 src-address=192.168.2.0/24 to-addresses=4.4.4.4