<?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: List NAT tables with static-ip translations in General Topics</title>
    <link>https://live.paloaltonetworks.com/t5/general-topics/list-nat-tables-with-static-ip-translations/m-p/481421#M104169</link>
    <description>&lt;P&gt;Hi &lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/213724"&gt;@TigeRRR&lt;/a&gt; ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Very cool.&amp;nbsp; Even 'show rulebase nat | match "source\|static"' would require some automation to filter.&amp;nbsp; Since you want to automate the process, the best tool to use is the API.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.paloaltonetworks.com/pan-os/9-0/pan-os-panorama-api" target="_blank"&gt;https://docs.paloaltonetworks.com/pan-os/9-0/pan-os-panorama-api&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.paloaltonetworks.com/pan-os/8-1/pan-os-panorama-api/get-started-with-the-pan-os-xml-api/explore-the-api" target="_blank"&gt;https://docs.paloaltonetworks.com/pan-os/8-1/pan-os-panorama-api/get-started-with-the-pan-os-xml-api/explore-the-api&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What automation tools do you know/use?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;</description>
    <pubDate>Wed, 20 Apr 2022 18:26:20 GMT</pubDate>
    <dc:creator>TomYoung</dc:creator>
    <dc:date>2022-04-20T18:26:20Z</dc:date>
    <item>
      <title>List NAT tables with static-ip translations</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/list-nat-tables-with-static-ip-translations/m-p/481399#M104164</link>
      <description>&lt;P&gt;Hello all!&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I'd like to compile a list of all my NAT tables for &lt;STRONG&gt;static-ip&lt;/STRONG&gt; entries for all my firewalls, I don't know if there's a better way to do it but I'm trying to do it by running the following command on my firewalls and recording the output:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;show running nat-policy | match index\|source\|translate-to&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;The issue with this one is that it's showing all, I want to show only the ones with static IPs but if I replace&amp;nbsp;&lt;STRONG&gt;translate-to&lt;/STRONG&gt; with &lt;STRONG&gt;static-ip&lt;/STRONG&gt;, it doesn't exclude the entire block/entry but only the lines containing something other than &lt;STRONG&gt;static-ip&lt;/STRONG&gt; which is to be expected, is there a way to filter by config/rule block? I know Cisco has this "&lt;STRONG&gt;| section&lt;/STRONG&gt;" filter (Palo only has &lt;STRONG&gt;match&lt;/STRONG&gt; and &lt;STRONG&gt;except&lt;/STRONG&gt;) and Palo supposedly could use Regex but it appears to be very limited, how can I achieve the output I need by excluding the entire entries that contain dynamic-ip in the translation field? Or if there's an even better way to get this information?&lt;/P&gt;</description>
      <pubDate>Wed, 20 Apr 2022 17:32:56 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/list-nat-tables-with-static-ip-translations/m-p/481399#M104164</guid>
      <dc:creator>TigeRRR</dc:creator>
      <dc:date>2022-04-20T17:32:56Z</dc:date>
    </item>
    <item>
      <title>Re: List NAT tables with static-ip translations</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/list-nat-tables-with-static-ip-translations/m-p/481410#M104166</link>
      <description>&lt;P&gt;Hi &lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/213724"&gt;@TigeRRR&lt;/a&gt; ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can export your NAT rules from the GUI with the PDF/CSV button on the bottom.&amp;nbsp; Then you can open in Excel and filter the Translated Packet Source Translation column with "contains 'static'".&amp;nbsp; You could also Text to Columns the same column to break out the translated source into a separate column.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you have destination NAT, do the same for the Translated Packet Destination Translation column.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;</description>
      <pubDate>Wed, 20 Apr 2022 18:02:15 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/list-nat-tables-with-static-ip-translations/m-p/481410#M104166</guid>
      <dc:creator>TomYoung</dc:creator>
      <dc:date>2022-04-20T18:02:15Z</dc:date>
    </item>
    <item>
      <title>Re: List NAT tables with static-ip translations</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/list-nat-tables-with-static-ip-translations/m-p/481413#M104167</link>
      <description>&lt;P&gt;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/77347"&gt;@TomYoung&lt;/a&gt;&amp;nbsp;Thank you! Yes, I'm aware of this but I wanted to get this for multiple firewalls at once, and preferably have the results emailed to me on regular basis, this report can only be obtained from the GUI and it has to be done manually. Maybe you know of a way I can automate it?&lt;/P&gt;</description>
      <pubDate>Wed, 20 Apr 2022 18:05:39 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/list-nat-tables-with-static-ip-translations/m-p/481413#M104167</guid>
      <dc:creator>TigeRRR</dc:creator>
      <dc:date>2022-04-20T18:05:39Z</dc:date>
    </item>
    <item>
      <title>Re: List NAT tables with static-ip translations</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/list-nat-tables-with-static-ip-translations/m-p/481421#M104169</link>
      <description>&lt;P&gt;Hi &lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/213724"&gt;@TigeRRR&lt;/a&gt; ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Very cool.&amp;nbsp; Even 'show rulebase nat | match "source\|static"' would require some automation to filter.&amp;nbsp; Since you want to automate the process, the best tool to use is the API.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.paloaltonetworks.com/pan-os/9-0/pan-os-panorama-api" target="_blank"&gt;https://docs.paloaltonetworks.com/pan-os/9-0/pan-os-panorama-api&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.paloaltonetworks.com/pan-os/8-1/pan-os-panorama-api/get-started-with-the-pan-os-xml-api/explore-the-api" target="_blank"&gt;https://docs.paloaltonetworks.com/pan-os/8-1/pan-os-panorama-api/get-started-with-the-pan-os-xml-api/explore-the-api&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What automation tools do you know/use?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;</description>
      <pubDate>Wed, 20 Apr 2022 18:26:20 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/list-nat-tables-with-static-ip-translations/m-p/481421#M104169</guid>
      <dc:creator>TomYoung</dc:creator>
      <dc:date>2022-04-20T18:26:20Z</dc:date>
    </item>
    <item>
      <title>Re: List NAT tables with static-ip translations</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/list-nat-tables-with-static-ip-translations/m-p/481504#M104176</link>
      <description>&lt;P&gt;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/77347"&gt;@TomYoung&lt;/a&gt;&amp;nbsp;I haven't used API much but doesn't that also involve passing the same CLI commands but is pulled differently using an API key? Is it more advanced that I can use complex Regex and the likes?&lt;/P&gt;</description>
      <pubDate>Wed, 20 Apr 2022 22:34:54 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/list-nat-tables-with-static-ip-translations/m-p/481504#M104176</guid>
      <dc:creator>TigeRRR</dc:creator>
      <dc:date>2022-04-20T22:34:54Z</dc:date>
    </item>
    <item>
      <title>Re: List NAT tables with static-ip translations</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/list-nat-tables-with-static-ip-translations/m-p/481514#M104177</link>
      <description>&lt;P&gt;Hi &lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/213724"&gt;@TigeRRR&lt;/a&gt; ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In this case, you want to (1) retrieve the NAT policy from multiple firewalls, (2) filter out the static entries, and (3) build a table of the real and NATed IP addresses.&amp;nbsp; If you want to automate this process, you will need to program or script something, e.g. Python, Ansible, etc.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regardless of the tool you use, the API interface is much easier to program that the CLI.&amp;nbsp; In addition, the data is returned in database format (XML or JSON) so that you do not have to screen scrape and tabulate.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In response to your questions:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;You pass XML to the API interface instead of CLI.&lt;/LI&gt;&lt;LI&gt;You login with an API key instead of username/password.&lt;/LI&gt;&lt;LI&gt;The API interface does not allow complex RegEx.&amp;nbsp; That is done with your automation tool.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;So, configuring an automation tool and learning the API will have an initial steep learning curve, but once you build that foundation you could perform complex, repetitive tasks with ease.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry that I do not have a quick solution.&amp;nbsp; It sounded like you may already be using an automation tool.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Apr 2022 23:17:32 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/list-nat-tables-with-static-ip-translations/m-p/481514#M104177</guid>
      <dc:creator>TomYoung</dc:creator>
      <dc:date>2022-04-20T23:17:32Z</dc:date>
    </item>
    <item>
      <title>Re: List NAT tables with static-ip translations</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/list-nat-tables-with-static-ip-translations/m-p/482370#M104282</link>
      <description>&lt;P&gt;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/77347"&gt;@TomYoung&lt;/a&gt;&amp;nbsp;I guess this is something worth exploring, I don't have much exposure to it so I hope I'll be able to achieve something from this.&lt;BR /&gt;I don't have an automation tool per se, I just use my monitoring platform, it has a service account that logs in using SSH and passes whatever commands I want to the monitored devices, it would have worked very well if Palo's CLI commands weren't so limited.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Apr 2022 18:25:08 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/list-nat-tables-with-static-ip-translations/m-p/482370#M104282</guid>
      <dc:creator>TigeRRR</dc:creator>
      <dc:date>2022-04-25T18:25:08Z</dc:date>
    </item>
  </channel>
</rss>

