I am no sure is this is the right thread however I did not find other covering mangle and routing in ROS7
I am running v7.1b3 and am having a rather curious issue.
First I created a routing table
add fib name=RT-WG-PRG
Then a mangle rule is created
/ip firewall mangle
add action=mark-packet chain=prerouting dst-address=!172.16.0.0/16 new-packet-mark=VPN passthrough=yes src-address=172.16.1.9
add action=mark-connection chain=prerouting new-connection-mark=conn_VPN packet-mark=VPN passthrough=yes
add action=mark-routing chain=prerouting connection-mark=conn_VPN new-routing-mark=RT-WG-PRG passthrough=yes
(the rule has been tested and proven functional)
At this point I am to create a route which would go into the routing table:
add distance=10 dst-address=0.0.0.0 gateway=WG-PRG@main routing-table=RT-WG-PRG
at this point I believe it is the right thing to do a routing rule
regardless how i set it up (either specify src-address/dst-address or routing-mark) the traffic from the defined src address is routed via the main routing table.
however if i specify the route anyhow different than 0.0.0.0/0 the rule kicks in and the traffic gets routed based on the defined table to the specific destination.
is this a bug or I am doing something wrong?