Export compact (new in v5.12)

Hi
export compact is great, but
changed value of default remote syslog server is missing, see:

Without compact:

/system logging export
/system logging action
set 0 memory-lines=100 memory-stop-on-full=no name=memory target=memory
set 1 disk-file-count=2 disk-file-name=log disk-lines-per-file=100 disk-stop-on-full=no name=disk target=disk
set 2 name=echo remember=yes target=echo
set 3 bsd-syslog=no name=remote remote=XXX.YYY.XXX.ZZZ remote-port=514 src-address=:: syslog-facility=daemon syslog-severity=auto target=remote
/system logging
set 0 action=memory disabled=no prefix="" topics=info
set 1 action=memory disabled=no prefix="" topics=error
set 2 action=memory disabled=no prefix="" topics=warning
set 3 action=echo disabled=no prefix="" topics=critical
add action=remote disabled=no prefix="" topics=critical
add action=remote disabled=no prefix="" topics=info
add action=remote disabled=no prefix="" topics=error
add action=remote disabled=no prefix="" topics=system
add action=remote disabled=no prefix="" topics=wireless

with compact:

 /system logging export compact
/system logging
add action=remote topics=critical
add action=remote topics=info
add action=remote topics=error
add action=remote topics=system
add action=remote topics=wireless

Thanks

My export is broken, no tcp-flags on it.

Saludos.

MT Guys:

Thank you so much for the compact exports. Much easier to see what’s what!

How about a feature in The Dude to manage configurations? If The Dude senses that a router’s config has changed, have it automatically pull that config and store it.

Put a tftp client in ROS so that we can save a configuration directly to a tftp server.

export compact tftp=some.server.com/path/to/file.rsc

The TCP flags in firewall filter aren’t in compact or full as noted above

Compact

add action=add-src-to-address-list address-list="port scanners" \
    address-list-timeout=2w chain=input comment="Drop Port Scanners" \
    in-interface=ether1 protocol=tcp
add action=add-src-to-address-list address-list="port scanners" \
    address-list-timeout=2w chain=input in-interface=ether1 protocol=tcp
add action=add-src-to-address-list address-list="port scanners" \
    address-list-timeout=2w chain=input in-interface=ether1 protocol=tcp
add action=add-src-to-address-list address-list="port scanners" \
    address-list-timeout=2w chain=input in-interface=ether1 protocol=tcp
add action=add-src-to-address-list address-list="port scanners" \
    address-list-timeout=2w chain=input in-interface=ether1 protocol=tcp
add action=add-src-to-address-list address-list="port scanners" \
    address-list-timeout=2w chain=input in-interface=ether1 protocol=tcp
add action=add-src-to-address-list address-list="port scanners" \
    address-list-timeout=2w chain=input in-interface=ether1 protocol=tcp
add action=jump chain=input in-interface=ether1 jump-target=droplog \
    src-address-list="port scanners"

Full

add action=add-src-to-address-list address-list="port scanners" \
    address-list-timeout=2w chain=input comment="Drop Port Scanners" \
    disabled=no in-interface=ether1 protocol=tcp psd=21,3s,3,1
add action=add-src-to-address-list address-list="port scanners" \
    address-list-timeout=2w chain=input disabled=no in-interface=ether1 \
    protocol=tcp
add action=add-src-to-address-list address-list="port scanners" \
    address-list-timeout=2w chain=input disabled=no in-interface=ether1 \
    protocol=tcp
add action=add-src-to-address-list address-list="port scanners" \
    address-list-timeout=2w chain=input disabled=no in-interface=ether1 \
    protocol=tcp
add action=add-src-to-address-list address-list="port scanners" \
    address-list-timeout=2w chain=input disabled=no in-interface=ether1 \
    protocol=tcp
add action=add-src-to-address-list address-list="port scanners" \
    address-list-timeout=2w chain=input disabled=no in-interface=ether1 \
    protocol=tcp
add action=add-src-to-address-list address-list="port scanners" \
    address-list-timeout=2w chain=input disabled=no in-interface=ether1 \
    protocol=tcp
add action=jump chain=input disabled=no in-interface=ether1 jump-target=\
    droplog src-address-list="port scanners"

Hi Normis, Thank you for great feature. Can I add my special configurations like RoS default config?

This feature shows difference from
/system reset-configuration no-defaults=yes

You can Netinstall board with script of your configuration and ensure that that configuration is used as default after every
/system reset-configuration

So - No it is not possible to hide your default configuration from /export compact :wink:

Thank you macgaiver. Is it not possible even change default configuration using Netinstall?
If so, I need option that able to

/export [find where comment!="MyDefault"] file=blabla

default configuration is one thing while empty configuration is another.

Default you can change using netinstall tool and installing RouterOS with script file that is going to be loaded on the router automatically - it has nothing to do with configuration that export is formed against.

here you can see manual of what defaults there are on different boards:
http://wiki.mikrotik.com/wiki/Manual:Default_Configurations

and get some inspiration when creating yours.

2 items i noticed…

DNS and NTP settings are not being marked as dynamic when they’re set by dhcp-client, and are therefore included in a compact export.

This goes off topic, but while I’m talking about setting NTP via DHCP, it might be a good idea if the client was enabled and set to broadcast (

  1. That will change in 5.13

  2. why the current default of unicast is not good enough, also, NTP server on the RouterOS defaults to unicast mode and additional modes (broadcast, multicast and manycast) can be enabled in addition to unicast. So now the only thing that you have to do is to set up ntp-client to get the time, enable ntp-server and point other ntp clients to your RouterOS router.

i saw in the web site that 5.12 been removed this mornning and back again just now , is there any modifications on the new package ??

with thanks

no, just site maintenance

I got that backwards… it’s set to broadcast and not enabled. Here’s the NTP config as set from DHCP:

/system ntp client
set enabled=no mode=broadcast primary-ntp=172.17.2.4 secondary-ntp=0.0.0.0

it needs to be set to unicast and enabled when configured via DHCP.

Ok, what’s with the version numbers? My system reports 5.4 yet I don’t have a compact argument to export. Is the a doc somewhere that talks to version trees and the like?

JT

5.4 < 5.12

5.4 is not a short way to write 5.40 (a version that doesn’t yet exist). It is instead what came before 5.5, 5.6…, 5.9, 5.10, 5.11, and 5.12. The compact argument was only introduced in 5.12.

Please please please add feature, that can be export only special user defined configurations.

[admin@mikrotik] > export [find where comment!="MyDefault"]

Pls pls pls :slight_smile:

Great addition, I’ve been hoping this would be added since I’ve started using Mikrotik devices. Thanks for listening to customer requests.

please export config with fixed order that i can compare with tools like WinMerge.

I was testing this function and found some errors. Maybe it would help to improve it (or maybe I am the problem :slight_smile: )

I used RB450 and RB750GL, software v5.14.

I did just basic configuration of RB450 - added two IP addresses, did export compact and tried to import configuration to RB750GL.

First error is this one:

/interface wireless security-profiles
set [ find default=yes ] group-ciphers="" unicast-ciphers=""

For some reason RB450 compact export adds the line interface wireless (although it does not have wireless interfaces), which does not exists in RB750GL.

Second “error” is this one:

/tool mac-server
add disabled=no

After this import stops and asks for interface

interface:

This line in full exports looks like this:

/tool mac-server
add disabled=no interface=all

So if I write “all” after it stops, it continues, but maybe it would be better that import is done without stopping.

Hope this helps a little.

Is there a status report on the bugs people have found? Changelog doesn’t say anything about export compact since it was introduced in 5.12