Technical Forum
Ask questions. Discover Answers.
cancel
Showing results for 
Search instead for 
Did you mean: 
Custom Alert Banner

F5 Firewall Policy Import to Excel via browser extension

lttarvina
Altostratus
Altostratus

Is there any specific way or any web browser extension which will export the ACL of AFM in excel file?

8 REPLIES 8

JRahm
Community Manager
Community Manager

You could use the iControl REST API to retrieve the rules from AFM and then format that data into a csv or excel sheet. The endpoints for AFM are under:

Thank you for providing a quicker resolution. I appreciate your time and attention on this matter, and I'm grateful for your efforts. Could you tell me what this link, https://big-ip-hostname/mgmt/tm/security/firewall/, is for? Even access to it is impossible.

JRahm
Community Manager
Community Manager

that is a REST interface for where you would choose which part of the AFM policy you would want to retrieve, where big-ip-hostname is your big-ip hostname or IP address.

Hello and once again, I appreciate your response to my question.

Are there any references for a detailed process on how to use the iControl REST API to retrieve the rules from AFM and format that data into a csv or excel file?  I wish to perform or do the shared references.

Thank you so much.

JRahm
Community Manager
Community Manager

can you give me an idea of what rules you are wanting to retrieve? I'm not that familiar with AFM operationally, but if you can provide more details on what you are looking for, I might be able to work a sample up for you.

Hi and thank you again for answering my query.

I used the wrong term ACL but what I mean is if there is any specific way or any web browser extension which will export the AFM security policy in excel file for security purpose?

JRahm
Community Manager
Community Manager

I am not aware of a browser extension to do that, but I was able to cook up some sample code for you using the iControl REST interface with python in this gist on GitHub. Creates an excel workbook with a worksheet for each policy and their associated rules. I hid a few of the columns that aren't important to the rules themselves. Feel free to expand/alter as needed. Screenshot:

afm_export.png

GlenWillms
F5 Employee
F5 Employee

I don't have the ability to test this, but you may be able to use Power Query in Excel (or Power BI) to pull the AFM rules straight into Excel for easy data refreshes. 

Here is a link (https://community.powerbi.com/t5/Power-Query/Using-a-REST-API-as-a-data-source/td-p/50400) on how to get REST data in Power BI, but Power Query in Excel is virtually identical.