I know but I can not place the ipsec tunnel before the fasttrack rule. I can not even delete fasttrack rule. I’m just searching forum to find out how to remove or disable this rule but looks like it is not possible. Anyhow, thanks.
To get rid of fasttrack there is a firewall rule created by default directly below the two rules to allow established and related with an action=fasttrack-connection.
Delete this then reboot your router - the dynamic rules should no longer be present.
If your VPN is only working one way try disabling (temporarily) any drop rules in the firewall. Does it now work ? If yes then you need to ensure your VPN traffic is allowed in. It’s incoming interface is the WAN interface (perhaps ether1 or pppoe-out1? )
Dont forget to re-enable your drop rules after this !!!
Enabling logging on any drop rules may also be helpful.
Also check any dst-nat rules are not catching your IPSEC traffic. Disable them while testing or make them very specific by specifying a dst-address that is your WAN address.
Lastly download and read the Packet Flow Diagram - it is very helpful in understanding how IPSEC is processed through the router.
Thank you scampbell for your useful tip to temporary disable firewall rules. I disabled them one by one and found out the following rule from the default configuration was blocking my ping from Microsoft Azure to on premise network:
You can find there that you need to put in the NAT Bypass. I think what is missing is you ALSO have to add a Firewall Filter Rule to allow the traffic from the remote side to forward into your on premise network. This was blocked by the above rule in my MikroTik router that I put in my router during initial setup and at that time (and still does) makes sense.
Could not find anything about this in the MikroTik WIKI link I shared above. But that’s ok because at least now I could figure out what I needed to solve this problem. I just allow the subnet in Microsoft Azure to communicate with the subnet on premise with this single line and put it on top of the Filter rules:
add chain=forward comment=“Allow from Azure” dst-address=192.168.0.0/22
src-address=192.168.4.0/22 place-before=0
Not only that, but also fast-track rule affects ipsec traffic. So for tunnel mode to work properly you need to allow tunnelled traffic before fast-track or rule with connection-nat-state=!dstnat.
Not sure what exactly you are trying to move, but none of my mentioned rules are built in. They are created either by default configuration or by user.
I have same issue. If i ping from mikrotik to vm cloud was failed but if i test ping from vm cloud to my mikrotik was success.
I have set firewall nat in mikrotik :
add chain=srcnat action=accept place-before=0 src-address=10.62.1.0/24 dst-address=192.168.62.0/24
I copied the code from the previous post into the Mikrotik. Unfortunately it didn’t let me ping my subnet after the Mikrotik.
I use version 6.42.1 of the RouterOS software. Is there some one who can verify this finding on the current RouterOS version ?
Emils of Mikrotik helped me out. He said I correctly configured the router. So I rechecked my firewall settings on the windows box. Icmp ports were open. I could ping locally. I shutted the windows firewall complete down. Et voila it worked. I enabled the firewall again. I decided to use the command line to open for ICMP.
netsh advfirewall firewall add rule name=“ICMP Allow incoming V4 echo request” protocol=icmpv4:8,any dir=in action=allow and netsh advfirewall firewall add rule name=“ICMP Allow incoming V6 echo request” protocol=icmpv6:8,any dir=in action=allow. This worked with 6.42.1