Community discussions

MikroTik App
 
rcy
just joined
Topic Author
Posts: 2
Joined: Tue Apr 17, 2018 12:14 pm

Flashfig on linux

Tue Apr 17, 2018 1:05 pm

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
 
Nick Kett
Frequent Visitor
Frequent Visitor
Posts: 62
Joined: Wed Jun 30, 2004 8:32 pm

Re: Flashfig on linux (Or from a mikrotik router without windows)

Tue Apr 24, 2018 3:05 pm

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?
 
rcy
just joined
Topic Author
Posts: 2
Joined: Tue Apr 17, 2018 12:14 pm

Re: Flashfig on linux

Thu Apr 26, 2018 3:11 pm

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.
 
johhenrik
just joined
Posts: 6
Joined: Fri Oct 05, 2018 4:04 pm

Re: Flashfig on linux

Tue Oct 09, 2018 1:34 pm

Did you ever solve this issue with the format of the file?
 
dougunder
newbie
Posts: 43
Joined: Tue May 01, 2018 10:53 pm

Re: Flashfig on linux

Tue Oct 09, 2018 3:53 pm

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
You do not have the required permissions to view the files attached to this post.
 
serkamil
just joined
Posts: 7
Joined: Wed Jun 01, 2016 5:25 pm

Re: Flashfig on linux

Fri Dec 01, 2023 1:58 pm

Hello,

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

Best Regards,
Kamil
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26912
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia
Contact:

Re: Flashfig on linux

Thu Jan 11, 2024 11:23 am

RSC is a plaintext file, what are you guys talking about?
 
jaclaz
Forum Guru
Forum Guru
Posts: 1981
Joined: Tue Oct 03, 2023 4:21 pm

Re: Flashfig on linux

Thu Jan 11, 2024 11:57 am

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.
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26912
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia
Contact:

Re: Flashfig on linux

Thu Jan 11, 2024 11:59 am

Well hacking up your own netinstall alternative, good luck. Sorry but we can't help.
 
Spam
just joined
Posts: 1
Joined: Mon Jan 15, 2024 4:56 pm

Re: Flashfig on linux

Mon Jan 15, 2024 5:03 pm

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
Last edited by Spam on Mon Jan 15, 2024 5:14 pm, edited 1 time in total.

Who is online

Users browsing this forum: bp0, nichky, seriosha and 32 guests