<?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: Ansible PAN OS Collection - Can not connect to PA firewall. in Automation/API Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/ansible-pan-os-collection-can-not-connect-to-pa-firewall/m-p/318645#M2246</link>
    <description>&lt;P&gt;I have literally no prior experience with Palo Alto firewalls so it took me a while to figure it out. The problem was not related to SSL or Ansible. The test firewall has an empty &lt;STRONG&gt;list of permitted IP addresses&lt;/STRONG&gt; which is located under Device --&amp;gt; Interfaces --&amp;gt; Management so every host can manage the firewall. The other two had some IP specified and my one was not there. This is why I couldn't connect to API.&lt;/P&gt;</description>
    <pubDate>Thu, 26 Mar 2020 06:06:51 GMT</pubDate>
    <dc:creator>michael082</dc:creator>
    <dc:date>2020-03-26T06:06:51Z</dc:date>
    <item>
      <title>Ansible PAN OS Collection - Can not connect to PA firewall.</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/ansible-pan-os-collection-can-not-connect-to-pa-firewall/m-p/318459#M2233</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have three virtual machines, each hosting a PA Firewall. One VM - test one, has no SSL installed, the other two have a self-signed SSL certs installed. I can access the firewall web GUI on all three VMs using a web browser.&amp;nbsp;When I run the following playbook, Ansible can not connect to hosts with SSL certs in place:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-SPOILER&gt;&lt;DIV&gt;&lt;SPAN&gt;---&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;- &lt;/SPAN&gt;&lt;SPAN&gt;name&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;'Palo Alto PAN OS: Create a new tag object.'&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;hosts&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;all&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;connection&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;local&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;gather_facts&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;true&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;collections&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;- &lt;/SPAN&gt;&lt;SPAN&gt;paloaltonetworks.panos&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;tasks&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;- &lt;/SPAN&gt;&lt;SPAN&gt;name&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;Create a tag object.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;when&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;operation == "create"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;panos_tag_object&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;provider&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;'{{ provider }}'&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;name&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;'{{ tag_name }}'&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;color&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;'{{ tag_color }}'&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;comments&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;'{{ tag_comment }}'&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;- &lt;/SPAN&gt;&lt;SPAN&gt;name&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;Remove a tag object.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;when&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;operation == "remove"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;panos_tag_object&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;provider&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;'{{ provider }}'&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;name&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;'{{ tag_name }}'&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;color&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;'{{ tag_color }}'&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;state&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;absent&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/LI-SPOILER&gt;&lt;P&gt;I get the following error:&lt;/P&gt;&lt;LI-SPOILER&gt;The full traceback is:&lt;BR /&gt;WARNING: The below traceback may *not* be related to the actual failure.&lt;BR /&gt;File "/tmp/ansible_panos_tag_object_payload_sPdkhl/ansible_panos_tag_object_payload.zip/ansible_collections/paloaltonetworks/panos/plugins/module_utils/panos.py", line 146, in get_pandevice_parent&lt;BR /&gt;self.device = PanDevice.create_from_device(*pan_device_auth)&lt;BR /&gt;File "/home/kubicm01/.local/lib/python2.7/site-packages/pandevice/base.py", line 3358, in create_from_device&lt;BR /&gt;system_info = device.refresh_system_info()&lt;BR /&gt;File "/home/kubicm01/.local/lib/python2.7/site-packages/pandevice/base.py", line 3766, in refresh_system_info&lt;BR /&gt;system_info = self.show_system_info()&lt;BR /&gt;File "/home/kubicm01/.local/lib/python2.7/site-packages/pandevice/base.py", line 3723, in show_system_info&lt;BR /&gt;root = self.xapi.op(cmd="show system info", cmd_xml=True)&lt;BR /&gt;File "/home/kubicm01/.local/lib/python2.7/site-packages/pandevice/base.py", line 3484, in method&lt;BR /&gt;raise the_exception&lt;BR /&gt;fatal: [iaas0102]: FAILED! =&amp;gt; {&lt;BR /&gt;"changed": false,&lt;BR /&gt;"invocation": {&lt;BR /&gt;"module_args": {&lt;BR /&gt;"api_key": null,&lt;BR /&gt;"color": "red",&lt;BR /&gt;"comments": "comment",&lt;BR /&gt;"commit": true,&lt;BR /&gt;"device_group": "shared",&lt;BR /&gt;"ip_address": null,&lt;BR /&gt;"name": "new_sample_tag",&lt;BR /&gt;"password": null,&lt;BR /&gt;"port": 443,&lt;BR /&gt;"provider": {&lt;BR /&gt;"api_key": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",&lt;BR /&gt;"ip_address": "iaas0102",&lt;BR /&gt;"password": null,&lt;BR /&gt;"port": 443,&lt;BR /&gt;"serial_number": null,&lt;BR /&gt;"username": "admin"&lt;BR /&gt;},&lt;BR /&gt;"state": "present",&lt;BR /&gt;"username": "admin",&lt;BR /&gt;"vsys": "vsys1"&lt;BR /&gt;}&lt;BR /&gt;},&lt;BR /&gt;"msg": "Failed connection: URLError: reason: [Errno 110] Connection timed out"&lt;BR /&gt;}&lt;/LI-SPOILER&gt;&lt;P&gt;Please note, I use API keys.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I try to run:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;curl -k -X GET 'https://iaas0102/api/?type=keygen&amp;amp;user=admin&amp;amp;password=8372hl'&lt;/LI-CODE&gt;&lt;P&gt;I get:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;curl: (7) Failed connect to iaas0102:443; Connection timed out&lt;/LI-CODE&gt;&lt;P&gt;If I run the same command against the vm without SSL, I get the API Key. I run out of ideas how to approach this. Would appreciate any help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Michael&lt;/P&gt;</description>
      <pubDate>Wed, 25 Mar 2020 11:26:35 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/ansible-pan-os-collection-can-not-connect-to-pa-firewall/m-p/318459#M2233</guid>
      <dc:creator>michael082</dc:creator>
      <dc:date>2020-03-25T11:26:35Z</dc:date>
    </item>
    <item>
      <title>Re: Ansible PAN OS Collection - Can not connect to PA firewall.</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/ansible-pan-os-collection-can-not-connect-to-pa-firewall/m-p/318621#M2240</link>
      <description>&lt;P&gt;First things first:&amp;nbsp; if that is a legit password, you need to change your password immediately.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For even curl to be failing means this isn't specifically an Ansible issue...&amp;nbsp; Something deeper is going on.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Not sure how big a long shot this is:&amp;nbsp; if you're running the script from OSX catalina, then Apple has decided to change what they consider a valid SSL certificate at the OS level:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.apple.com/en-us/HT210176" target="_blank"&gt;https://support.apple.com/en-us/HT210176&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This means that the self-signed certs that PAN-OS uses (for example, when you launch a new instance in AWS / Azure / GCP) are invalid and you won't be able to connect.&amp;nbsp; Since the above is applicable to certs created after July 1, 2019, any instances you launched before should still work with Catalina.&lt;/P&gt;</description>
      <pubDate>Thu, 26 Mar 2020 00:05:59 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/ansible-pan-os-collection-can-not-connect-to-pa-firewall/m-p/318621#M2240</guid>
      <dc:creator>gfreeman</dc:creator>
      <dc:date>2020-03-26T00:05:59Z</dc:date>
    </item>
    <item>
      <title>Re: Ansible PAN OS Collection - Can not connect to PA firewall.</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/ansible-pan-os-collection-can-not-connect-to-pa-firewall/m-p/318645#M2246</link>
      <description>&lt;P&gt;I have literally no prior experience with Palo Alto firewalls so it took me a while to figure it out. The problem was not related to SSL or Ansible. The test firewall has an empty &lt;STRONG&gt;list of permitted IP addresses&lt;/STRONG&gt; which is located under Device --&amp;gt; Interfaces --&amp;gt; Management so every host can manage the firewall. The other two had some IP specified and my one was not there. This is why I couldn't connect to API.&lt;/P&gt;</description>
      <pubDate>Thu, 26 Mar 2020 06:06:51 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/ansible-pan-os-collection-can-not-connect-to-pa-firewall/m-p/318645#M2246</guid>
      <dc:creator>michael082</dc:creator>
      <dc:date>2020-03-26T06:06:51Z</dc:date>
    </item>
  </channel>
</rss>

