<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Panorama Security Rules Export  in Human Readable Format- Excel Sheet in General Topics</title>
    <link>https://live.paloaltonetworks.com/t5/general-topics/panorama-security-rules-export-in-human-readable-format-excel/m-p/213868#M62178</link>
    <description>&lt;P&gt;This are great recommendation. I will look into them. I must admit I have no skills in programming, but maybe the material you suggested can help me to develop some new basic skills.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks that is great point about Panorama's rule hierarchy. I am just getting to know Panorama.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Much appreciate your input&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 10 May 2018 05:23:19 GMT</pubDate>
    <dc:creator>HosseinMohajer</dc:creator>
    <dc:date>2018-05-10T05:23:19Z</dc:date>
    <item>
      <title>Panorama Security Rules Export  in Human Readable Format- Excel Sheet</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/panorama-security-rules-export-in-human-readable-format-excel/m-p/213293#M62070</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am new to Palto Alto. I have a requirement to download security rules of several firewalls so it can be viewed bu audit teams.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have downloaded the running configuration file of target firewalls I need and I have been able to format the output into a searchable excel file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, when I was looking at the security rule output I noticed it was missing security rules at were pushed from Panorama.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I get these panorama rules exported them as I did with local firewall config ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a mil&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 05 May 2018 23:17:04 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/panorama-security-rules-export-in-human-readable-format-excel/m-p/213293#M62070</guid>
      <dc:creator>HosseinMohajer</dc:creator>
      <dc:date>2018-05-05T23:17:04Z</dc:date>
    </item>
    <item>
      <title>Re: Panorama Security Rules Export  in Human Readable Format- Excel Sheet</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/panorama-security-rules-export-in-human-readable-format-excel/m-p/213444#M62092</link>
      <description>&lt;P&gt;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/89048"&gt;@HosseinMohajer&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;There isn't really a good way of gathering the post- pre- and running-config, as you are trully looking for the mergesp.xml file. The only way that I know of to actually get this is by pulling the tech-support file.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 07 May 2018 18:29:16 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/panorama-security-rules-export-in-human-readable-format-excel/m-p/213444#M62092</guid>
      <dc:creator>BPry</dc:creator>
      <dc:date>2018-05-07T18:29:16Z</dc:date>
    </item>
    <item>
      <title>Re: Panorama Security Rules Export  in Human Readable Format- Excel Sheet</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/panorama-security-rules-export-in-human-readable-format-excel/m-p/213455#M62096</link>
      <description>&lt;P&gt;I once wrote a powershell script that downloaded the security policies from a firewall using the API and created a CSV of the ruleset - I do not have it available to me at this time, but it didn't take terribly long to do.&amp;nbsp; powershell parses the XML into a collection of collections that makes it "easy" to iterate through the ruleset and pull the properties you are interested in.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A few resources to get you started, if you are interested:&lt;/P&gt;&lt;P&gt;Palo API documentation: &lt;A href="https://www.paloaltonetworks.com/documentation/80/pan-os/xml-api" target="_blank"&gt;https://www.paloaltonetworks.com/documentation/80/pan-os/xml-api&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Invoke-RestMethod, to make the API calls and get information from firewall: &lt;A href="https://blogs.technet.microsoft.com/heyscriptingguy/2013/10/21/invokerestmethod-for-the-rest-of-us/" target="_blank"&gt;https://blogs.technet.microsoft.com/heyscriptingguy/2013/10/21/invokerestmethod-for-the-rest-of-us/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;ForEach, to loop through items in a collection: &lt;A href="https://blogs.technet.microsoft.com/heyscriptingguy/2014/04/28/basics-of-powershell-looping-foreach/" target="_blank"&gt;https://blogs.technet.microsoft.com/heyscriptingguy/2014/04/28/basics-of-powershell-looping-foreach/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Export-CSV, to create your csv file once you have teh information you want to put in it: &lt;A href="https://blogs.technet.microsoft.com/heyscriptingguy/2014/02/04/use-powershell-to-create-csv-file-to-open-in-excel/" target="_blank"&gt;https://blogs.technet.microsoft.com/heyscriptingguy/2014/02/04/use-powershell-to-create-csv-file-to-open-in-excel/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regarding missing rules, when you pull the configuration from panorama - remember there are pre-rules and post-rules, and they can come from multiple levels before being pushed to the firewall.&amp;nbsp; the easiest way to get the entire ruleset is to obtain the ruleset directly from the firewall.&amp;nbsp; That being said, I believe I have seen the entire pre- or post- ruleset when I obtained teh configuration via, with the location listed for each rule.&lt;/P&gt;</description>
      <pubDate>Mon, 07 May 2018 18:19:29 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/panorama-security-rules-export-in-human-readable-format-excel/m-p/213455#M62096</guid>
      <dc:creator>JoeAndreini</dc:creator>
      <dc:date>2018-05-07T18:19:29Z</dc:date>
    </item>
    <item>
      <title>Re: Panorama Security Rules Export  in Human Readable Format- Excel Sheet</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/panorama-security-rules-export-in-human-readable-format-excel/m-p/213482#M62102</link>
      <description>&lt;P&gt;PAN-OS / Panorama 8.1 has export function:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.paloaltonetworks.com/documentation/81/pan-os/newfeaturesguide/management-features/configuration-table-export" target="_blank"&gt;https://www.paloaltonetworks.com/documentation/81/pan-os/newfeaturesguide/management-features/configuration-table-export&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 07 May 2018 19:33:51 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/panorama-security-rules-export-in-human-readable-format-excel/m-p/213482#M62102</guid>
      <dc:creator>Anon1</dc:creator>
      <dc:date>2018-05-07T19:33:51Z</dc:date>
    </item>
    <item>
      <title>Re: Panorama Security Rules Export  in Human Readable Format- Excel Sheet</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/panorama-security-rules-export-in-human-readable-format-excel/m-p/213867#M62177</link>
      <description>&lt;P&gt;Thansk a mil.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Might be an option, have not tried it. Suppose I pull it can it be edited easily through an exmel editor to be imported into excel.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The reason I ask, is that I can all the configuration I need in show running policy. It seems there is an option to display this in XML format, not sure it can be exported.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 May 2018 05:18:32 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/panorama-security-rules-export-in-human-readable-format-excel/m-p/213867#M62177</guid>
      <dc:creator>HosseinMohajer</dc:creator>
      <dc:date>2018-05-10T05:18:32Z</dc:date>
    </item>
    <item>
      <title>Re: Panorama Security Rules Export  in Human Readable Format- Excel Sheet</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/panorama-security-rules-export-in-human-readable-format-excel/m-p/213868#M62178</link>
      <description>&lt;P&gt;This are great recommendation. I will look into them. I must admit I have no skills in programming, but maybe the material you suggested can help me to develop some new basic skills.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks that is great point about Panorama's rule hierarchy. I am just getting to know Panorama.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Much appreciate your input&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 May 2018 05:23:19 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/panorama-security-rules-export-in-human-readable-format-excel/m-p/213868#M62178</guid>
      <dc:creator>HosseinMohajer</dc:creator>
      <dc:date>2018-05-10T05:23:19Z</dc:date>
    </item>
    <item>
      <title>Re: Panorama Security Rules Export  in Human Readable Format- Excel Sheet</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/panorama-security-rules-export-in-human-readable-format-excel/m-p/213895#M62183</link>
      <description>&lt;P&gt;I use powershell as an example simply because it is what I know, If you have someone in your organization with other scripting or programming experience, they would likely be able to come up with something to parse XML into a CSV.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you choose to take this on yourself, it may be easier to obtain the XML another way, then parse it in PowerShell, that will take a level of complexity out of the project.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;All of the microsoft Scripting Guy's blogs are great, he makes the topic understandable and leaves you with enough knowledge to apply the lesson at hand in your own way.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;once you have your XML as a variable (let's say $config) powershell represents xml as a collection of collections, so each "branch" in the XML is a property of it's parent, so for isntance $config.vsys.entry[0].ruleset.security.entry[1].name is the name of the second (computers count from&amp;nbsp;0) security policy in the ruleset of your first vsys (even in a single vsys firewall the vsys branch exists) $config.vsys.entry[0].ruleset.security.entry[1].action would be it's action (allow, deny, etc) $config.vsys.entry[0].ruleset.security.entry[100].name&amp;nbsp;would be the 101st rule's name, etc&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;First, write some "pseudo-code" of what you want to do, the major steps, then you can try to figure out how to do them.&lt;/P&gt;&lt;P&gt;For instance:&lt;/P&gt;&lt;P&gt;for each $rule in $config&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;write $rule.name, $rule.from, $rule.to, $rule.source, $rule.dest, $rule.action to a file (you may have other properties that are valuable to you)&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can adjust and fill in those steps as you go, and soon enough you will have a tool you can use again and again.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Learn some basic scripting techniques and you'll be a hero the rest of your career.&lt;/P&gt;</description>
      <pubDate>Thu, 10 May 2018 11:32:48 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/panorama-security-rules-export-in-human-readable-format-excel/m-p/213895#M62183</guid>
      <dc:creator>JoeAndreini</dc:creator>
      <dc:date>2018-05-10T11:32:48Z</dc:date>
    </item>
  </channel>
</rss>

