ping comes by WAN1, but reply goes to WAN2

Hello,
worked ok for year, and now something strange happened, Router is not reachable from outside on backup WAN, no pptp server, nor dnat services. Primary WAN is all OK, Backup WAN responds correctly only if primary WAN is down. Tried to sniff some ping from outside, and saw this

ping comes by WAN2 (backup) but reply goes to WAN1 (primary - with correct src ip) What I did wrong..? I have two default routes with different metrics. I restored old config backup for test, and no result..

give some advice please
kind regards
Mac

Hello mgo

You should check output and input mark in mangle in order to track your connections properly and route in the correct wan.

add chain=prerouting in-interface=ISP1 connection-mark=no-mark action=mark-connection new-connection-mark=ISP1_conn
add chain=prerouting in-interface=ISP2 connection-mark=no-mark action=mark-connection new-connection-mark=ISP2_conn
	
add chain=output connection-mark=ISP1_conn action=mark-routing new-routing-mark=to_ISP1     
add chain=output connection-mark=ISP2_conn action=mark-routing new-routing-mark=to_ISP2

Yes it worked, Thank You Gustavo