<?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: Need a help. Inject CLI command via API to PAN with client IP in Automation/API Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/need-a-help-inject-cli-command-via-api-to-pan-with-client-ip/m-p/12850#M335</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Not sure if this helps, but what we've done in this scenario is implement a little javascript heartbeat function on the (captive portal) destination server such that users close the page to trigger a logout() function (via window.onbeforeunload), which in turn clears the user-ip mapping in the palo via the restful api call..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="https://HOSTNAME/api/?type=op&amp;amp;cmd="&gt;https://HOSTNAME/api/?type=op&amp;amp;cmd=&lt;/A&gt;&lt;SPAN&gt;&amp;lt;clear&amp;gt;&amp;lt;user-cache&amp;gt;&amp;lt;ip&amp;gt;USER_IP&amp;lt;/ip&amp;gt;&amp;lt;/user-cache&amp;gt;&amp;lt;/clear&amp;gt;&amp;amp;key=APIKEY&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I wont post any example code here as what weve used is a little more convoluted (in that we use websockets to push messages via an AMQP broker that has workers proxying api calls to the palo) but please let me know if you want further details..&lt;/P&gt;&lt;P&gt;cheers &lt;/P&gt;&lt;P&gt;damian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 10 Mar 2013 19:20:02 GMT</pubDate>
    <dc:creator>dsouthard</dc:creator>
    <dc:date>2013-03-10T19:20:02Z</dc:date>
    <item>
      <title>Need a help. Inject CLI command via API to PAN with client IP</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/need-a-help-inject-cli-command-via-api-to-pan-with-client-ip/m-p/12849#M334</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would to make a log-out page for captive portal. which working by inject an CLI command to PAN with client IP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for example&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;clear user-cache ip 192.168.5.200&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. what php code can I use to collect client IP address ?&lt;/P&gt;&lt;P&gt;2. what php code can I inject API to PAN ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Jan 2013 14:59:35 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/need-a-help-inject-cli-command-via-api-to-pan-with-client-ip/m-p/12849#M334</guid>
      <dc:creator>mindterra</dc:creator>
      <dc:date>2013-01-28T14:59:35Z</dc:date>
    </item>
    <item>
      <title>Re: Need a help. Inject CLI command via API to PAN with client IP</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/need-a-help-inject-cli-command-via-api-to-pan-with-client-ip/m-p/12850#M335</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Not sure if this helps, but what we've done in this scenario is implement a little javascript heartbeat function on the (captive portal) destination server such that users close the page to trigger a logout() function (via window.onbeforeunload), which in turn clears the user-ip mapping in the palo via the restful api call..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="https://HOSTNAME/api/?type=op&amp;amp;cmd="&gt;https://HOSTNAME/api/?type=op&amp;amp;cmd=&lt;/A&gt;&lt;SPAN&gt;&amp;lt;clear&amp;gt;&amp;lt;user-cache&amp;gt;&amp;lt;ip&amp;gt;USER_IP&amp;lt;/ip&amp;gt;&amp;lt;/user-cache&amp;gt;&amp;lt;/clear&amp;gt;&amp;amp;key=APIKEY&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I wont post any example code here as what weve used is a little more convoluted (in that we use websockets to push messages via an AMQP broker that has workers proxying api calls to the palo) but please let me know if you want further details..&lt;/P&gt;&lt;P&gt;cheers &lt;/P&gt;&lt;P&gt;damian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 10 Mar 2013 19:20:02 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/need-a-help-inject-cli-command-via-api-to-pan-with-client-ip/m-p/12850#M335</guid>
      <dc:creator>dsouthard</dc:creator>
      <dc:date>2013-03-10T19:20:02Z</dc:date>
    </item>
  </channel>
</rss>

