I have a CRS125 router/switch combo and need to bypass fasttrack for one particular connection. The problem is that one device in my LAN uses IP TTLs of 32 and the target device is over 32 hops away in Europe (I am in Australia).
Here’s the relevant code. Note that I placed a dedicated “accept” rule before the “fasttrack-connection” rule so as to attempt to stop the session from being added to fasttrack. The fasttrack rule below is the default one.
The behaviour I get is that the TCP handshake uses the right TTL (64) but then the connection gets added to the fasttrack table and the TTL goes back to 32 because fasttrack bypasses the firewall (and hence the mangle rules are not applied).
So, how do I reliably stop this one connection from hitting fasttrack?
Yes I did try that - putting the IP address as an exclusion in the Fasttrack rule. It didn’t work.
I’ve disabled the Fasttrack rule and the problem goes away, but then my CPU consumption also shoots up.
It’s almost like if there is a fasttrack rule in place, the rule is always processed, and advanced options like IP exclusions are ignored.
I do some alternate routing marks via pre-routing that don’t work well with fast-track and make sure that I only fast-track connections with connection-mark=no-mark and routing-table=main.
Maybe you can add another mangle before your other mangle setting a connection mark (and passthrough) and then change your fast-track to only do connection-mark=no-mark.
I can therefore confirm the following rules make the fasttrack bypass work!
/ip firewall filter
add action=fasttrack-connection chain=forward comment="Forward using FastTrack for any existing connections not marked by a mangle rule." connection-mark=no-mark \
connection-state=established,related
add chain=forward comment="Forward any existing sessions which are marked or if they don't match FastTrack rule for some reason" connection-state=established,related
/ip firewall mangle
add action=mark-connection chain=prerouting new-connection-mark=lowttl ttl=less-than:60
add action=change-ttl chain=prerouting connection-mark=lowttl new-ttl=set:64