Automation
Automation

Scripting How-To: Listing Firewall Filters

by Juniper Employee on ‎07-26-2016 11:28 AM - edited on ‎08-23-2017 11:02 AM by Administrator Administrator (2,276 Views)

Question

What is the equivalent script of the following CLI command that lists destination addresses for firewall filters:

 

show firewall family inet

 

Answer

   var $get-filter = <get-configuration database = "committed"> {
            <configuration> {
                <firewall> {
                    <family> {
                        <inet>;
                    }
                }
            }
        }
        var $config = jcs:invoke($get-filter);