Current (still experimental) version :
(fourth revision, 8th August 2025, but noone protested in the last few days, so ...)
As recommended by Rule #7:
The twelve Rules of Mikrotik Club
You shouldn't lock yourself out.
Unfortunately it is way too easy to lock oneself out, particularly when fiddling with VLANs, everything seems fine until you set "vlan-filtering=yes" on the bridge, and suddenly you cannot anymore access the device via Webfig or Winbox[1].
So here are the detailed instructions on how to take a port out of any bridge and set it available for management and emergency access to the Mikrotik device.
With many thanks to anav, Josephny, Amm0, rextended, lurker888, CGGXANNX and all the other usual suspects that contributed to the idea and its implementation.
The usual convention in Mikrotik is that the lowest numbered port (ether1) is WAN, if you have multiple WANs it is logical that they are ether2, ether3, etc., i.e. the lowest port numbers are towards the "outside".
The higher numbered ports are LAN or "inside".
Consequently the highest port number can become an emergency access port, not normally used, either temporarily (i.e. while you are fiddling with the configuration) or permanently (if you can afford a normally unused "spare" port).
Mikrotik routers mostly have 4, 5 or 8 ethernet ports, the following instructions are for reserving ether5, just replace ether5 with ether4 or ether8 according to your case.
Or you can completely ignore this mnemonic numeric order and choose any port you see fit (on some devices there are both 1 Gb and 100 Mb ports so it would make sense to use one 100 Mbit port for this - limited - use).
The default configuration of a Mikrotik SoHo device is with the interfaces categorized as either WAN or LAN:
WAN (outside, dangerous, here be lions) Ether1 is self-standing and assigned to category WAN.
LAN (inside, safe) ALL interfaces BUT ether1 are put into a bridge and the bridge is assigned to the category LAN.
Relevant default configuration snippets (The ether5 is part of the bridge, lists are WAN and LAN, bridge is LAN, anything not coming from LAN is dropped, the winbox access is allowed from LAN.):
...
/interface bridge port
add bridge=bridge comment=defconf interface=ether2
add bridge=bridge comment=defconf interface=ether3
add bridge=bridge comment=defconf interface=ether4
add bridge=bridge comment=defconf interface=ether5
...
/interface list
add comment=defconf name=WAN
add comment=defconf name=LAN
...
/interface list member
add comment=defconf interface=bridge list=LAN
add comment=defconf interface=ether1 list=WAN
...
/ip firewall filter
...
add chain=input action=drop in-interface-list=!LAN comment=“defconf: drop all not coming from LAN”
...
/tool mac-server mac-winbox
set allowed-interface-list=LAN
So step by step, following are three options, from simplest to (slightly) more complex:
NOTES:
[1] Just in case you have doubts whether using winbox or not, check this:
Why you should use Winbox
[2] What this rule does is to allow access (action accept) to the router (input chain) from interfaces categorized as management (interface list member MGMT), the "place-before=0" is used to insert the rule as the first one.
Please note that if the /ip firewall filter is completely empty the place-before=0 will generate an error, but that is the least of your problem, as it means that you ignored Rule #8, and are possibly exposing directly the router and devices connected to it to the internet.
And since if you ignored Rule #8 likely you ignored also Rule #3, you have a few seconds in case of an old device with user admin and blank password before your router will be pwned (on newer devices with non-blank passwords that will be more likely several days, but it still remains a risk).