Flashfig on linux

Hello !

I was looking for an Linux solution for Flashfig. As I couldn’t find one, I tried to build one myself.

I am pretty close now as I succeeded to push a configuration via Flashfig with a standard DHCP and TFTP server. Flashfig simply use the BOOTP protocol with option 60,128,129, next-server and boot filename. It then retrieve the configuration file with TFTP.

However, there is a tricky part. The configuration is compressed and I cannot determine what compression is used. So I am unable to fully reproduce a Linux solution of Flashfig. My current solution is to sniff the compressed configuration sent by the Windows Flashfig tool and retrieve the hex stream of the compressed file. After that, I am able to create a file with this hex stream and use it on my own TFTP server.

As you notice, it is not very handy. I would appreciate if anyone can help me find how the configuration is compressed. For the moment, I think I identify the file signature at the beginning of every file sent. It always start with 0x31 0x32 0x33 0x20 0xff 0xfe 0x04 0x00.

Cheers

Hi,
I too want to do this… but from the DHCP/TFTP services on another mikrotik router.
IE, I want to be able to send the rsc file from a mikrotik “server” via flashfig when I plug-in new routers.
I can get the file transfer via bootp, but don’t know how to compress the file beforehand.

Did you get anywhere with this?

Yes, I can compress the file but it is not handy. I do a first flashfig with the Windows Mikrotik tools and I capture the payload with Wireshark.

Then, I reuse the payload on my own tftp server and it’s working.

Did you ever solve this issue with the format of the file?

We use Flashfig on LTS Ubuntu via wine.

Works better then is does in win 10.

Have some scripted ssh for re-provisoning etc

Getting flash fig to work is a work of art all it’s self.

Keep it simple as possible just get the device online and pull the config from an ftp.

I’ve attached what we use.

Other tip:

Uses the Atom editor.
Really nice editor and someone wrote a microtik scripting module.

Finally the attached file was actually generated with
$ /export compact file=flashfig.rsc
You need to start with a clean (dhcp on ether 1, nothing else) Hap or whatever.
Add in the scripts and tasks you need then export.
flashfig.rsc (1.1 KB)

Hello,

@rcy, @Nicka Ketta and other, did you find how is compressed file (gzip, lzma, zip, 7zip, ect.)?

Best Regards,
Kamil

RSC is a plaintext file, what are you guys talking about?

Probably they are referring to what is actually transmitted to the device(s), likely flashfig “converts” the source .rsc to a binary blob or some kind (compressed or more likely encoded) and transmits over the lan this latter.

Well hacking up your own netinstall alternative, good luck. Sorry but we can’t help.

Hi,

did someone figgured this out? I want to achieve the same thing.
I need to be able to get zero config to mikrotik device without using windows.

Thanks