Hello everyone,
Currently I’ve got a weird situation with some mangle rules, the rules in question are these:
/ip firewall mangle
add action=mark-connection chain=prerouting comment="##Start of MGMT Access Rules##" connection-mark=no-mark in-interface=ether10 \
new-connection-mark=mgmt_connection passthrough=no
add action=accept chain=prerouting in-interface=ether10
add action=mark-routing chain=prerouting connection-mark=mgmt_connection new-routing-mark=mgmt passthrough=no
add action=mark-routing chain=output comment="##End of MGMT Access Rules##" connection-mark=mgmt_connection new-routing-mark=mgmt \
passthrough=no
There are no other firewall rules placed in this router, it’s brand new just updated to the latest BFO (6.38.7 as of this writing).
Aside from these:
/ip address
add address=123.1.X.X/28 interface=ether10 network=123.1.X.X
add address=172.16.0.3/29 interface=ether9 network=172.16.0.0
And
/ip route add gateway=123.1.X.X routing-mark=mgmt
There’s nothing else in this router.
So, the idea here is to use ether10 is a management connection and nothing else, I don’t want the default route tied to this interface to be used for production traffic. However it’s not working, I am connecting via the local IP 172.16.0.3 using 172.16.0.2 to check the router functionality and trying to connect from the Internet to 123.1.X.X, I can see the traffic reaching the router via ether10, the rules catching traffic, I can see the connections being marked, however I can’t connect to the router.
If I use the same default route in the main table I can connect so there’s no issue with ports being blocked, my upstream, etc. I’ve also tried redoing all the rules, changing the naming convention for the marks, etc. Nothing seems to fix it.
If you wanna know, I’m doing this since RouterOS is not VRF aware for internal services or management, so I’m trying “to emulate” this.
I’ve used similar configurations in the past for load-balancers and they work, I don’t see any issue here but I’d like someone to review this maybe I’m currently overlooking something (not a good time haha),
Thank you.