<?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: How to automate getting packet captures of off an ASA in Network Security</title>
    <link>https://community.cisco.com/t5/network-security/how-to-automate-getting-packet-captures-of-off-an-asa/m-p/1059253#M914779</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, I appreciate the compliment.  And I did submit that.  For others who might want to submit their great idea as a Tech Tip here is the link:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-custom" href="http://www.cisco.com/warp/public/437/readertips/index.html" target="_blank"&gt;http://www.cisco.com/warp/public/437/readertips/index.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Brian&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 15 Aug 2008 12:45:25 GMT</pubDate>
    <dc:creator>bkhickman</dc:creator>
    <dc:date>2008-08-15T12:45:25Z</dc:date>
    <item>
      <title>How to automate getting packet captures of off an ASA</title>
      <link>https://community.cisco.com/t5/network-security/how-to-automate-getting-packet-captures-of-off-an-asa/m-p/1059251#M914777</link>
      <description>&lt;P&gt;For weeks I have been trying to figure out how to get packet captures off an an ASA before the buffer is full or overwritten.  It always seems like I was too late go get the capture I wanted manually so here is what I came up with.  I hope this helps someone and if anybody has any better ideas please pipe in.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using a circular-buffer and the Linux wget and crontab commands you can automate the download of your capture file off of your ASA and store as many captures as you have disk space.  There might be some overlap but at least you are going to have the packet captures you need.  I am using Debian Etch but the commands are very generic and should work with any Linux distribution or Cygwin if you are stuck with Windows.  My ASA software is version 7.2(3)12.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First, create an access-list for the captures you want on your ASA.  Let's say between two devices:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;	access-list cap extended permit ip host 10.10.150.1 host 192.168.0.1&lt;/P&gt;&lt;P&gt;	access-list cap extended permit ip host 192.168.0.1 host 10.10.150.1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Second, start your capture.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;	capture capout access-list cap interface outside circular-buffer&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Third, create an executable file on  your Linux box and enter all on one line:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;	wget -P /home/directory '&lt;A class="jive-link-custom" href="https://username:" target="_blank"&gt;https://username:&lt;/A&gt;'password'@ASA/capture/capout/pcap' -no-check-certificate&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will place your capture files in the /home/directory.  Unfortunately this is not very secure because the password to your ASA is in this file for anyone who has privileges to read.  So be careful where you put it and who can see it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fourth, create your crontab.  We will set the crontab to download the capture every half hour.  At the command prompt enter:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;	Crontab -e&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then add a line like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;	30 * * * *  /directory/of/your/executable_in_step_three&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, what will happen is every half hour the crontab will download the pcap file to the directory you specified.  The first one will be named pcap, the second pcap.1, third pcap.2 and so on.  You need to be careful to make sure your crontab is downloading the pcap file before sections start getting overwritten.  You can adjust either your crontab time or the buffer size on your ASA to accomplish this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Brian&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Mar 2019 13:29:34 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-security/how-to-automate-getting-packet-captures-of-off-an-asa/m-p/1059251#M914777</guid>
      <dc:creator>bkhickman</dc:creator>
      <dc:date>2019-03-11T13:29:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to automate getting packet captures of off an ASA</title>
      <link>https://community.cisco.com/t5/network-security/how-to-automate-getting-packet-captures-of-off-an-asa/m-p/1059252#M914778</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Brian,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   Thanks,  This is great.  You should submit as a Tech Tip.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Aug 2008 19:08:44 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-security/how-to-automate-getting-packet-captures-of-off-an-asa/m-p/1059252#M914778</guid>
      <dc:creator>jphilope</dc:creator>
      <dc:date>2008-08-11T19:08:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to automate getting packet captures of off an ASA</title>
      <link>https://community.cisco.com/t5/network-security/how-to-automate-getting-packet-captures-of-off-an-asa/m-p/1059253#M914779</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, I appreciate the compliment.  And I did submit that.  For others who might want to submit their great idea as a Tech Tip here is the link:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-custom" href="http://www.cisco.com/warp/public/437/readertips/index.html" target="_blank"&gt;http://www.cisco.com/warp/public/437/readertips/index.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Brian&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Aug 2008 12:45:25 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-security/how-to-automate-getting-packet-captures-of-off-an-asa/m-p/1059253#M914779</guid>
      <dc:creator>bkhickman</dc:creator>
      <dc:date>2008-08-15T12:45:25Z</dc:date>
    </item>
  </channel>
</rss>

