<?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: schedule security rules in General Topics</title>
    <link>https://live.paloaltonetworks.com/t5/general-topics/schedule-security-rules/m-p/509509#M106067</link>
    <description>&lt;P&gt;Hi &lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/171718"&gt;@TerryZhou&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Unfortunately that is correct - if sessions are established during the business hours, they will continue to run even after the schedule expire and will not use the second rule with schedule active for out of business hours.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However you can force policy lookup and those existing sessions to match the "out of business hours" rule.&lt;/P&gt;
&lt;P&gt;In order to do that you need to force a commit with "Rematch Session" setting enabled under Device -&amp;gt; Setup -&amp;gt; Session&lt;/P&gt;
&lt;P&gt;A commit with "rematch session" will force new policy lookup for currently active sessions. And since the "business hours" rule has expired traffic will match the "out of business hours" rule.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Few ways to trigger commit:&lt;/P&gt;
&lt;P&gt;- Manually you can use "commit force" - since no change between running and candidate config, you need to use force&lt;/P&gt;
&lt;P&gt;- If you running Panorama 10.1 and above you can schedule push from Panorama -&amp;gt; Schedule Config Push&lt;/P&gt;
&lt;P&gt;- Using scripting magic and API to automate commit force at specific time&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 21 Jul 2022 16:28:42 GMT</pubDate>
    <dc:creator>aleksandar.astardzhiev</dc:creator>
    <dc:date>2022-07-21T16:28:42Z</dc:date>
    <item>
      <title>schedule security rules</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/schedule-security-rules/m-p/509453#M106058</link>
      <description>&lt;P&gt;I have 2 security rules, one needs to run office hours and one needs to run non-office hours. If the tcp session remains (not closed) can the same traffic use different security rules based on time ? or because the tcp session remains and it will stick with the current rule and never use the other security rule even the time changes?&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jul 2022 05:17:32 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/schedule-security-rules/m-p/509453#M106058</guid>
      <dc:creator>TerryZhou</dc:creator>
      <dc:date>2022-07-21T05:17:32Z</dc:date>
    </item>
    <item>
      <title>Re: schedule security rules</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/schedule-security-rules/m-p/509509#M106067</link>
      <description>&lt;P&gt;Hi &lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/171718"&gt;@TerryZhou&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Unfortunately that is correct - if sessions are established during the business hours, they will continue to run even after the schedule expire and will not use the second rule with schedule active for out of business hours.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However you can force policy lookup and those existing sessions to match the "out of business hours" rule.&lt;/P&gt;
&lt;P&gt;In order to do that you need to force a commit with "Rematch Session" setting enabled under Device -&amp;gt; Setup -&amp;gt; Session&lt;/P&gt;
&lt;P&gt;A commit with "rematch session" will force new policy lookup for currently active sessions. And since the "business hours" rule has expired traffic will match the "out of business hours" rule.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Few ways to trigger commit:&lt;/P&gt;
&lt;P&gt;- Manually you can use "commit force" - since no change between running and candidate config, you need to use force&lt;/P&gt;
&lt;P&gt;- If you running Panorama 10.1 and above you can schedule push from Panorama -&amp;gt; Schedule Config Push&lt;/P&gt;
&lt;P&gt;- Using scripting magic and API to automate commit force at specific time&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jul 2022 16:28:42 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/schedule-security-rules/m-p/509509#M106067</guid>
      <dc:creator>aleksandar.astardzhiev</dc:creator>
      <dc:date>2022-07-21T16:28:42Z</dc:date>
    </item>
    <item>
      <title>Re: schedule security rules</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/schedule-security-rules/m-p/509547#M106074</link>
      <description>&lt;P&gt;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/171718"&gt;@TerryZhou&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Rather than forcing a commit as&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/70130"&gt;@aleksandar.astardzhiev&lt;/a&gt;&amp;nbsp;suggested (this 100% works), I personally recommend scripting a session drop for anything matching the scheduled entry instead. This has an added benefit of not triggering a commit on a schedule in the event someone hasn't completely finished a change on the firewall, along with not failing if someone holds a lock or the config is invalid when the auto commit attempts to run.&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;/api/?type=op&amp;amp;cmd=&amp;lt;clear&amp;gt;&amp;lt;session&amp;gt;&amp;lt;all&amp;gt;&amp;lt;filter&amp;gt;&amp;lt;rule&amp;gt;[MyRule]&amp;lt;/rule&amp;gt;&amp;lt;/filter&amp;gt;&amp;lt;/all&amp;gt;&amp;lt;/session&amp;gt;&amp;lt;/clear&amp;gt;&amp;amp;key=[key]

# Replace [key] with API Key

# Replace [MyRule] with name of scheduled entry&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 21 Jul 2022 22:16:50 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/schedule-security-rules/m-p/509547#M106074</guid>
      <dc:creator>BPry</dc:creator>
      <dc:date>2022-07-21T22:16:50Z</dc:date>
    </item>
  </channel>
</rss>

