Convert firewall rules into excel file


Is there a way to convert firewall configuration into an excel file format (or libreoffice calc). I would like to plan to do monthly review on the current firewall configuration with team members in order to cleanup and verify the current configuration if its was properly configured or if it needs modification.

Either you can take the json (config.boot as is) and use some kind of json to excel importer/converter or you could output the current config in “command-mode” and use that to as a text-file import to excel (whitespace as delimiter between columns).

show config commands | grep -i firewall

Or to cover potential sensitive information:

show config commands | strip-private | grep -i firewall

Hi @Apachez

After upload configuration commands into excel file I can’t re-arrange the column header to follow the configuration like rule number, action, description, protocol, source and destination address or address-group. Is there a way to convert these

Something like below :

I tried JSON To CSV Converter for the output of (note, probably bad for privacy as I used some lab config):

show configuration json

The result was… awful :smiley:

:joy: I tried it too and yes its awful :sweat_smile:

Btw thanks for helping. I will write it manually then. :smiling_face_with_tear:

If possible please post the resulting script in this thread or similar.

If you write it in pyhon you could probably do it straight in VyOS and then have that commited as some kind of export function. Im thinking because there are some libs already existing in the VyOS installation to iterate through the running-config.

I think as a dump it would be helpful if all variables are included even those who are “empty”.

Similar to how “show config all” is supposed to be working (but it doesnt seem like).

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.