I have two WAN ports assigned to two separate ISPs (eth6=ISP1, eth1=ISP2)
My firewall and Mangle rules are working for outbound traffic. I am running into an issue with outside-initiated connections (Winbox, Telnet, ssh, etc). Both WAN ports respond to PING, but neither respond to WinBox or Telnet. I can see in my firewall when the connect attempts are made, but the external party sees nothing besides “unable to connect” messages.
Any thoughts on how to resolved this? I was thinking PCC might be a solution, but I’m not 100% sure how how to implement it.
You need to properly handle WAN->Router connections in Mangle.
Meaning, if a connection from a certain WAN is iniciated, it needs to be replied to over the same WAN.
I already have the mangle setup. The below commands mark the connections that come into the respective ISP ports. Following, those connections get marked with the respective routing marks. Am I missing something?
You Mangle is wrong.
You need to handle incoming conections in the input change, and set the routing mark in output.
Do it like in the presentation, and it will work:
/ip firewall mangle
add chain=input connection-mark=no-mark in-interface=ISP_1 action=mark-connection new-connection-mark=WAN1->ROS
add chain=input connection-mark=no-mark in-interface=ISP_2 action=mark-connection new-connection-mark=WAN2->ROS
add chain=output connection-mark=WAN1->ROS action=mark-routing new-routing-mark=ISP1_Route
add chain=output connection-mark=WAN2->ROS action=mark-routing new-routing-mark=ISP2_Route
May be you forgot to add respective routes for that routing marks (like in pcc example). And your default routes to ISP1 and ISP2 should have bigger distances than routes with routing mark.
Marking in prerouting is conveniently because covers both port forwarding (dst-nat) and input staff (ping, winbox). I think that is why it’s used in wiki, so this is right approach.