Not an article, but possibly useful.
Very often, when reviewing the export of the full configuration some forum users post for review or check, I find extremely difficult to read it, particularly when it is not posted enclosed in “code” tags.
Even when the proper formatting is used, I have difficulties in parsing multi-line settings.
So I put together (half-@§§edly as usual, but seemingly working ) a spreadsheet that can be used to better parse a config.
The configuration can be pasted (copied from the output of an /export command opened in - say - Notepad) directly into the sheet “Config_Input”.
Features/info:
- comments and warnings (lines beginning with “#”) become bold red.
- sections (lines beginning with “/”) become bold.
- multilines are condensed into longer single lines (getting rid of the "" at the end of continued lines and of the 4 spaces (if any) at the beginning of the next line.
- the spreadsheet uses no fancy VBA, it is all in formulas (so it should be compatible with any spreadsheet program (not necessarily Excel), but since it is a bit complex it is not given. I use for testing as the “minimum viable solution” the excellent Spread32 https://www.byedesign.co.uk/ , a teeny-tiny (shareware) spreadsheet program that can even run from its .zip file. I tested both the (good) “old” 2.04 version (1424 Kb) and the “fatter and newish” 3.20 version (5100 Kb). The newish version has more features (unneeded for this spreadsheet) but it is a little bit slower. On this particular spreadsheet it chokes, while the older version works, but it cannot save the file and crashes.
- I checked a few of the posted configurations and the longest I could find is one with 1059 lines. Since essentially what is used are vlookup and other “range based” formulas, I made them “capable” of 2000 lines, but to contain the size of the spreadsheet formulas are only copied down up to line 500 (499 actually parsable lines) which is more than the common length of the posted files (150-300 lines). In any case formulas can be copied down in each spreadsheet if more lines should be needed. Same for the firewall sorting, range is 500, but formulas are copied only up to 200 (196 rules) that should normally be enough.
- since usually noone does what is recommended (for readability) i.e. to order the /ip firewall filter rules by chain, the spreadsheet has a firewall filter sort sheet where the /ip firewall filters rules are separated to check them more easily grouping them by chain (but keeping the original order) and re-ordered. (experimental, I still have to understand how to manage non-standard chains).
- the spreadsheet includes a blank_template_check sheet that can be copied and personalized, which allows to filter up to 5 sections of the configuration and extract from them the values of the settings, allowing to visually group items of interest (DO MAKE a copy of it and ONLY fiddle with the copy).
- on the base of the above template I made (also included) the sheets “dhcp_server_check”, “interface_list_check” and “firewall_filter_check” that exemplifies possible uses.
- even the two most basics features, automatically creating from the Config_Input both a single lines and a terse version should be useful.
I tested the spreadsheet on more than a few configuration files posted on the forum, I included as Example1 and Example2 two of them, but of course the thingy is experimental and it is likely that “edge cases” exist that can potentially bork the working of any of the sheets.
So consider it “early Alpha” (what Mikrotik calls either Beta or RC
).
Licensed according to my Careware License:
http://jaclaz.altervista.org/Projects/careware.html
Have fun .
If you have ideas, corrections, etc. post them.