(1) dont need connection-state=new
(2) REMOVE 8291 from port forwarding, this is a router service, so port forwarding does not apply, FURTHER, its not safe to access from external… REMOVED.
Clue port forwarding to gateway is usually not a good idea!
The first set of rules below are ONLY REQUIRED if you have external traffic TO THE ROUTER, aka input chain rules for VPN for example.
If not you can disregard!
/ip firewall mangle
{ Lets ensure any traffic coming to the router itself goes out the same ISP ( input/output chains ) }
add action=mark-connection chain=input connection-mark=no-mark
in-interface=WAN1 new-connection-mark=ISP1 passthrough=yes
add action=mark-connection chain=input connection-mark=no-mark
in-interface=WAN2 new-connection-mark=ISP2 passthrough=yes
add action=mark-routing chain=output connection-mark=ISP1
new-routing-mark=to-ISP1 passthrough=no
add action=mark-routing chain=output connection-mark=ISP2
new-routing-mark=to-ISP2 passthrough=no
Note: if we had multiple local subnets, we would consider adding some rules here, in the order, so that internal traffic was not captured by mangles.
Basically an accept mangle rule for such traffic. Normally I would say not required but since you have 192.168.2.0 traffic that is almost local and should not be caught up in PCC traffic, aka we dont want traffic to go out WAN1 when it should be going directly via WAN2 …
THUS NEED:
add action=accept chain=prerouting src-address=192.168.3.0/24 dst-address=192.168.2.0/24
The rationale here is that any traffic from users to users will be processed before PCC mangling does so. Since the MT router knows where 192.168.2.1 gateway exists, it will sends such traffic regardless out WAN2. Since we sourcenat all traffic going out WAN2, it will work as all traffic will appear to be from MT (local LAN) at fritz.
{ Lets ensure any traffic originating externally and heading to the LAN, coming in on WANX and being returned from LAN Servers leaves on WANX ( forward/prerouting chains ) }
add action=mark-connection chain=forward connection-mark=no-mark
in-interface=WAN1 dst-address=192.168.3.0/24 new-connection-mark=incoming-ISP1 passthrough=yes
add action=mark-connection chain=forward connection-mark=no-mark
in-interface=WAN2 dst-address=192.168.3.0/24 new-connection-mark=incoming-ISP2 passthrough=yes
add action=mark-routing chain=prerouting connection-mark=incoming-ISP1
new-routing-mark=to-ISP1 src-address-list=MyServers passthrough=no
add action=mark-routing chain=prerouting connection-mark=incoming-ISP2
new-routing-mark=to-ISP2 src-address-list=MyServers passthrough=no
It should be obvious that you would need to make a firewall address list for all the LAN servers!
/ip firewall address-list
add address=192.168.3.3 list=MyServers
add address=192.168.3.247 list=MyServers
add address=192.168.3.254 list=MyServers
{ Now we mangle for PCC }
add action=mark-connection chain=prerouting connection-mark=no-mark
dst-address-type=!local in-interface=BridgeLAN new-connection-mark=out-ISP1
passthrough=yes per-connection-classifier=src-address-and-port**:3/0**
add action=mark-connection chain=prerouting connection-mark=no-mark
dst-address-type=!local in-interface=BridgeLAN new-connection-mark=out-ISP2
passthrough=yes per-connection-classifier=src-address-and-port:3/1
add action=mark-connection chain=prerouting connection-mark=no-mark
dst-address-type=!local in-interface=BridgeLAN new-connection-mark=out-ISP1
passthrough=yes per-connection-classifier=src-address-and-port:3/2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
add action=mark-routing chain=prerouting comment=Mark-route connection-mark=
out-ISP1 new-routing-mark=to-ISP1 passthrough=no
add action=mark-routing chain=prerouting connection-mark=ISP2 in-interface=
out-ISP2 new-routing-mark=to-ISP2 passthrough=no
What should be clear is that I use different connection marks, to ensure no cross contamination in rules but mainly
to ensure that when logging traffic for troubleshooting purposes its clear what traffic is being logged/captured.