Here goes…
Let’s examine the “should not happen” case that you cite and work our way to a solution. Note that in your example (access to management interface from non-management port) the traffic does not even involve the management port in any way.
First of all, you should be aware of the fact that even though when you assign an address to the router (as far as I can tell 10.0.254.1/24) you specify assigning it on an interface (P8-MGMT), this interface does not own the address in the sense that the router will be happy to receive (and reply to) packets destined to this address coming in on any of its interfaces. (This is btw what’s called having a “weak host model”; I’m afraid that for such a fundamental networking concept no really good internet sources exist for what this exactly entails, but the gist of it is the previous sentence.) So some other way of restricting this traffic must be employed. Many services (including winbox) allow different filtering options, but in my opinion filtering connection attempts that are clearly not allowed in the firewall is just good practice.
Note that according to the above explanation about the “weak host model”, this also entails that unless the given service takes other precautions, once enabled, e.g. winbox is not only available on the 10.0.254.1 address, but on any other addresses the router possesses.
So where in the firewall? Simple: packets which are destined to be received by the router itself traverse the input chain (not forward).
So the appropriate rules are: (WinBox works on tcp/8291)
add chain=input action=accept in-interface-list=MGMT protocol=tcp dst-port=8291 comment="allow winbox from mgmt"
add chain=input action=drop protocol=tcp dst-port=8291 comment="drop winbox coming from anywhere else"
Note that rules are executed in strict order. Once the fate of the packet is decided by an action such as accept/drop, the processing ends there. (Some actions, such as fasttrack, mark-connection, etc. only have a side effect and processing continues.)
Now this works specifically for winbox. You can image adding ssh, webfig, webfig-ssl etc.
Generally it’s better to allow specifically what you want and drop the rest. This is doubly so for the input chain: whatever services run on the router (or will be added perhaps in a later update) shouldn’t be accessible by default, only the ones you specifically allow. Now our input chain looks something like this:
add chain=input action=accept connection-state=established,related
add chain=input action=drop connection-state=invalid
add chain=input action=accept protocol=icmp
add chain=input action=accept protocol=udp dst-port=53 in-interface-list=!WAN comment="allow dns udp from anywhere but WAN"
add chain=input action=accept protocol=tcp dst-port=53 in-interface-list=!WAN comment="allow dns tcp from anywhere but WAN"
add chain=input action=accept protocol=tcp dst-port=8291 in-interface-list=MGMT comment="allow winbox only from MGMT"
add chain=input action=accept protocol=tcp dst-port=22,80,440 in-interface-list=MGMT comment="also allow ssh, webfig, webfig ssl only from MGMT"
add chain=input action=drop
This - as the comments say, allows access to the built-in DNS server from any of your network, except WAN (DNS uses both UDP and TCP), and allows certain services only from MGMT. Of course you may want to customize which services and from where you want to be available.
If you decide to simply allow everything from the MGMT interface(s) - which is a perfectly valid way of thinking, after all the management port is trusted implicitly, you can simply use one rule for the management part of things:
add chain=input action=accept in-interface-list=MGMT comment="in MGMT we trust"