<?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: Checking Logs from the CP CLI in Firewall and Security Management</title>
    <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Checking-Logs-from-the-CP-CLI/m-p/244065#M47497</link>
    <description>&lt;P&gt;cpstat fw -f log_connection will show if you're connected to the log server and how many logs you're sending.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;you used to be able to run 'fw log -flnt' on the gateway to dump fw.log file to stdout and "tail" it for new logs. not sure if this still works, or may only work if you are disconnected from the log server so the firewall is logging locally.&lt;/P&gt;</description>
    <pubDate>Tue, 18 Mar 2025 13:00:33 GMT</pubDate>
    <dc:creator>Lloyd_Braun</dc:creator>
    <dc:date>2025-03-18T13:00:33Z</dc:date>
    <item>
      <title>Checking Logs from the CP CLI</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Checking-Logs-from-the-CP-CLI/m-p/244018#M47482</link>
      <description>&lt;P&gt;Hello, Guys.&lt;/P&gt;
&lt;P&gt;Is it possible to see the traffic logs through the CLI of a FW, and not from the SmartConsole?&lt;/P&gt;
&lt;P&gt;I want to see the traffic of a flow, for the last 7 days, at the moment of executing the command (if possible).&lt;/P&gt;
&lt;P&gt;SOURCE IP: 192.168.59.180&lt;BR /&gt;IP DESTINATION: 10.100.100.5&lt;BR /&gt;Service: 88&lt;BR /&gt;Days: Last Week&lt;/P&gt;
&lt;P&gt;If it is possible to print the log in the CLI, could you please share the syntax with an example?&lt;/P&gt;
&lt;P&gt;I don't have access now to the SmartConsole, so I want to try to see if there are relevant logs, standing on the same FW.&lt;/P&gt;
&lt;P&gt;Greetings.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Mar 2025 04:20:37 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Checking-Logs-from-the-CP-CLI/m-p/244018#M47482</guid>
      <dc:creator>Matlu</dc:creator>
      <dc:date>2025-03-18T04:20:37Z</dc:date>
    </item>
    <item>
      <title>Re: Checking Logs from the CP CLI</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Checking-Logs-from-the-CP-CLI/m-p/244021#M47483</link>
      <description>&lt;P&gt;The logs aren't stored on the gateways*, they get generated and sent to the log servers. There is an API available for pulling logs from the log server that you can use from its CLI.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://sc1.checkpoint.com/documents/R81.20/WebAdminGuides/EN/CP_R81.20_LoggingAndMonitoring_AdminGuide/Content/Topics-LMG/API-for-Logs.htm" target="_blank"&gt;https://sc1.checkpoint.com/documents/R81.20/WebAdminGuides/EN/CP_R81.20_LoggingAndMonitoring_AdminGuide/Content/Topics-LMG/API-for-Logs.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;*Unless the log server is offline.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Mar 2025 05:25:10 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Checking-Logs-from-the-CP-CLI/m-p/244021#M47483</guid>
      <dc:creator>emmap</dc:creator>
      <dc:date>2025-03-18T05:25:10Z</dc:date>
    </item>
    <item>
      <title>Re: Checking Logs from the CP CLI</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Checking-Logs-from-the-CP-CLI/m-p/244028#M47486</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.checkpoint.com/t5/user/viewprofilepage/user-id/82839"&gt;@Matlu&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;you can use the following command:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class="language-sh"&gt;fw log -l -b "June 12, 2024 12:33:00" "June 12, 2024 15:34:00"&lt;/CODE&gt; | grep &amp;lt;IP or other parameter&amp;gt;&lt;/PRE&gt;
&lt;P&gt;or the management API (&lt;A href="https://sc1.checkpoint.com/documents/latest/APIs/index.html?#cli/show-logs~v2%20" target="_self"&gt;Management API Reference&lt;/A&gt;) - here is an example:&lt;/P&gt;
&lt;PRE class="code"&gt;mgmt_cli show logs new-query.time-frame "today" new-query.max-logs-per-request "2" new-query.filter "blade:Threat Emulation"  --format json&lt;/PRE&gt;
&lt;P&gt;In both cases, you still need to adjust your filters.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Mar 2025 08:02:00 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Checking-Logs-from-the-CP-CLI/m-p/244028#M47486</guid>
      <dc:creator>HeikoAnkenbrand</dc:creator>
      <dc:date>2025-03-18T08:02:00Z</dc:date>
    </item>
    <item>
      <title>Re: Checking Logs from the CP CLI</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Checking-Logs-from-the-CP-CLI/m-p/244061#M47495</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;The command #fw log....... command, can it be executed in the same GW? &lt;BR /&gt;Or is it only executed in the SMS?&lt;/P&gt;
&lt;P&gt;How can you be sure if the GW is really generating logs?&lt;/P&gt;
&lt;P&gt;Greetings.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Mar 2025 11:56:06 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Checking-Logs-from-the-CP-CLI/m-p/244061#M47495</guid>
      <dc:creator>Matlu</dc:creator>
      <dc:date>2025-03-18T11:56:06Z</dc:date>
    </item>
    <item>
      <title>Re: Checking Logs from the CP CLI</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Checking-Logs-from-the-CP-CLI/m-p/244065#M47497</link>
      <description>&lt;P&gt;cpstat fw -f log_connection will show if you're connected to the log server and how many logs you're sending.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;you used to be able to run 'fw log -flnt' on the gateway to dump fw.log file to stdout and "tail" it for new logs. not sure if this still works, or may only work if you are disconnected from the log server so the firewall is logging locally.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Mar 2025 13:00:33 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Checking-Logs-from-the-CP-CLI/m-p/244065#M47497</guid>
      <dc:creator>Lloyd_Braun</dc:creator>
      <dc:date>2025-03-18T13:00:33Z</dc:date>
    </item>
    <item>
      <title>Re: Checking Logs from the CP CLI</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Checking-Logs-from-the-CP-CLI/m-p/244135#M47513</link>
      <description>&lt;P&gt;fw log is executed where the logs are stored (not the gateway unless the connection to management/log server is down).&lt;BR /&gt;The cpstat command &lt;a href="https://community.checkpoint.com/t5/user/viewprofilepage/user-id/8834"&gt;@Lloyd_Braun&lt;/a&gt;&amp;nbsp;should tell you what you want.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Mar 2025 00:09:50 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Checking-Logs-from-the-CP-CLI/m-p/244135#M47513</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2025-03-19T00:09:50Z</dc:date>
    </item>
    <item>
      <title>Re: Checking Logs from the CP CLI</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Checking-Logs-from-the-CP-CLI/m-p/244136#M47514</link>
      <description>&lt;P&gt;&lt;a href="https://community.checkpoint.com/t5/user/viewprofilepage/user-id/21670"&gt;@HeikoAnkenbrand&lt;/a&gt;&amp;nbsp;gave the best option, in my opinion.&lt;/P&gt;
&lt;P&gt;Otherwise, you can check /var/log/messages files or $FWDIT/log/fw.log file&lt;/P&gt;
&lt;P&gt;Andy&lt;/P&gt;</description>
      <pubDate>Wed, 19 Mar 2025 00:37:41 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Checking-Logs-from-the-CP-CLI/m-p/244136#M47514</guid>
      <dc:creator>the_rock</dc:creator>
      <dc:date>2025-03-19T00:37:41Z</dc:date>
    </item>
  </channel>
</rss>

