The twelve Rules of Mikrotik Club

Preamble and disclaimer:
The following is a set of Rules that are intended as advice useful to avoid the most common errors observed in configuration posted on this forum.
It is my personal take on the matter, and in no way approved, endorsed or recommended, officially or unofficially, by Mikrotik or their partners or by anyone else.
In other words you are perfectly free to ignore them, though they represent (IMHO) a sort of (good) cheat sheet/reminder for people starting to use these devices.
Experts already know all these issues (and many more) and they already have their own ways to avoid them.


The twelve Rules of the Mikrotik Club:

Corollaries:

[1] Really, you shouldn’t. VLAN1 is used internally in some parts of the RoS and it can also cause conflicts with other manufacturers devices.


[2] Ok, you can use VLAN1, but only if you understand the implications.


[3] No exceptions. This includes when performing netinstall. Disconnect ALL ports but the one you are using for netinstall AND make sure proper firewall rules are created BEFORE connecting to the internet. For LTE routers disconnect means remove SIM.


[4] You can actually use it, but only once and only starting from a reset configuration.


[5] It serves nothing, and it can create issues, just don’t use it.


[6] Strongly advised, it prevents the MAC address of the bridge to be changed in case of other configuration changes.


[7] Particularly if you are going to fiddle with VLANS and firewall, it is very, very easy to lock yourself out of the Mikrotik device you are working on. You should also allow mac-winbox, activate its server but only on LAN and/or on an added interface list “Trusted”. mac-winBox allows to access the device if you lock access with IP. Remember that most changes take effect immediately, “Safe mode” is your all time & forever friend. Use it.


[8] The firewall is your only defense against the bad guys out there, think twice before changing anything in the default one, which is good enough in most cases. Only some Mikrotik devices come with a default configuration including the firewall, and even on those in some cases of reset or netinstall it is possible that these firewall rules are deleted, so better check and double check their existence before connecting to the internet. Even if not strictly speaking part of the firewall, the default settings make use of the categorization of interfaces (WAN and LAN in /interface list and actually used interfaces in /interface list member) and these should be checked to be correct and reflecting the actual WAN and LAN status of the interfaces, failing to do so may result in exposing the network to the outside and/or preventing access to the device. For those devices shipped with no default configuration, the first step should be to copy to them the default configuration taken from one of the Soho devices and published on the forum: Buying - RB1100AHx4 Dude Edition - Questions about Firewall - #4 by rextended , such configuration will need of course to be adapted to the device number of interfaces and settings of the bridge(s) if any.


[9] Just do it.


[10] Translated from Mikrotikish, Beta means pre-alpha, RC means early Beta, stable means RC, rinse and repeat on a newer version, now you know. (if it ain’t broken, don’t fix it)


[11] Please, don’t. We already have enough of them.


[12] A set of rules without a small reference to Douglas Adams seemed inadequate, but really, Mikrotik settings are often spread in several places, snippets of configurations are often not enough to understand what the problem may be, or, if you prefer, there are reasons why people looking for help are asked to post their COMPLETE configuration (anonymized).


Obviously these 12 Rules are only the tip of the iceberg :open_mouth: , Good Practice and Common Sense Advice, numbered from 13 onwards here :slight_smile: :

13. Don’t buy a router with 16BMiB of RAM. You might be okay if it’s a switch.

Be aware that the router phones home:
a. when auto timezone detect is enabled [ System → Clock — Tab: Time ]
b. when update time is enabled [ IP Cloud → Tab: Cloud ]

A. Devices with 16MB of flash are forbidden.
B. Activate MAC-WinBox server but only on LAN side. MAC-WinBox help to access device if you lock access with IP [7]

  1. Create a binary backup before any next adventure and practice restore using netinstall and binary backup before other adventures.

Binary backup should be forbidden as it lets restore configuration only on the device where it was created with proper ROS version installed. Use “/export terse file= …”.

Clarified…

Accepted :slight_smile:

You made a basic cup, I added the handle, now it can be used for drinking :stuck_out_tongue_winking_eye:
Twas a rhetorical addition, no acceptance required.

0: Remove “defconf” comments everywhere

+1

If I had my way, any configuration edit affecting an entry with a defconf comment would automatically remove that comment.

At the same time, if you’ve left a given defconf element unchanged, the comment should be left untouched. It’s telling you something useful: “This is as MT shipped it. You haven’t touched it yet.”

Thus why there should be automatic removal of these comments on an as-changed basis.

As a newbie, this thread scares me. Great, now I have to go research the MAC things you mentioned, and I have other things to do today!

Amended corollary to Rule #7 including mac-winbox settings.
Whether buying or not 16 Mb devices is out of the scope of the basic rules, though it is a generic good advice.
That when an entry commented as “defconf” is changed also the comment should be changed is also extremely good advice, but - like the above - is beyond the scope of the basic rules.
I will add it to a new, separate list, something like “good practice” or “common sense”, like the time zone/cloud time phoning home.
Making binary backups suggestion won’t enter any list of mine, sorry.

Disconnect/block internet/untrusted network to the router when performing netinstall until proper firewall rules are created (if netinstall is done without config) and admin user strong password is set or admin replaced with other user. For LTE routers disconnect means remove SIM or netinstall with script that disables lte interface on first boot.

Now included in Rule #3 corollary.

OMG … there is no rule:

Nth. Remember that “Safe mode” is your all time & forever friend. Use it.

[Nth] There is no CISCO-like running and stored configuration. Changes are applied and stored immediately that is why [7] happens.

Added in corollary to #7.

On the contrary, I would even make it a rule: Do not trust “safe mode.”

@infabo, a post without any reasoning, that is contrary to Bartosz’ input ( whether I agree with it or not ) is GARBAGE. If you have some logic/reasoning to add please do so.