<?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: create acs 5.8 regular expression for command sets in Network Access Control</title>
    <link>https://community.cisco.com/t5/network-access-control/create-acs-5-8-regular-expression-for-command-sets/m-p/3743745#M25088</link>
    <description>&lt;P&gt;Do not use * operator for everything. It is 0 or more occurance.&lt;/P&gt;
&lt;P&gt;There are a few pointers in the community on regular expresssions. Please look at those&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.cisco.com/t5/security-documents/acs-command-sets-arguments-regexp-interface-range/ta-p/3126213" target="_blank"&gt;https://community.cisco.com/t5/security-documents/acs-command-sets-arguments-regexp-interface-range/ta-p/3126213&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.cisco.com/t5/policy-and-access/need-help-in-creating-a-regex-in-acs-5-8/td-p/3221315" target="_blank"&gt;https://community.cisco.com/t5/policy-and-access/need-help-in-creating-a-regex-in-acs-5-8/td-p/3221315&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;I have some examples of regular expression in the ISE device admin prescriptive guide. You can look at that as well.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.cisco.com/t5/security-documents/cisco-ise-device-administration-prescriptive-deployment-guide/ta-p/3738365" target="_blank"&gt;https://community.cisco.com/t5/security-documents/cisco-ise-device-administration-prescriptive-deployment-guide/ta-p/3738365&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;-Krishnan&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 12 Nov 2018 06:50:54 GMT</pubDate>
    <dc:creator>kthiruve</dc:creator>
    <dc:date>2018-11-12T06:50:54Z</dc:date>
    <item>
      <title>create acs 5.8 regular expression for command sets</title>
      <link>https://community.cisco.com/t5/network-access-control/create-acs-5-8-regular-expression-for-command-sets/m-p/3743731#M25081</link>
      <description>&lt;P&gt;Hello, I'm struggling with some regex issues on my ACS command sets.&lt;/P&gt;
&lt;P&gt;I can of course block access to various commands and had blocked access to various interfaces; however, I'm unable to block access to our trunk interfaces while allowing access to our edge interfaces.&lt;/P&gt;
&lt;P&gt;Using:&lt;/P&gt;
&lt;P&gt;deny int* g1/1/1&lt;/P&gt;
&lt;P&gt;deny int* g1/1/2&lt;/P&gt;
&lt;P&gt;worked to keep low level admins out of those interfaces while allowing them access to:&lt;/P&gt;
&lt;P&gt;g1/0/1, g1/0/2 etc...&lt;/P&gt;
&lt;P&gt;I handled interface commands normally:&lt;/P&gt;
&lt;P&gt;deny switchport&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now I need to deny access to those very same interfaces, g1/1/1, g1/1/2 etc..&lt;/P&gt;
&lt;P&gt;while allowing access go g1/0/1 - 24, g1/0/1 - 48 and also for stacks.&lt;/P&gt;
&lt;P&gt;I worked up a regex that I created from findings Googling around.&lt;/P&gt;
&lt;P&gt;permit int* g*([1-4/])*0/([1-4]|1[0-9]|2[0-9]|3[0-9]|4[0-8])$&lt;/P&gt;
&lt;P&gt;should this be&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;permit int* g*([1-4/])0\/1[0-8]|2[0-8]|3[0-8]|4[0-8])$&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Our switches are 24 and 48 porters.&lt;/P&gt;
&lt;P&gt;So the stacks would range 1/0/1 - 24 or 48 and 2/0/1 - 24 or 48 etc.. up to 4 stacks.&lt;/P&gt;
&lt;P&gt;The second value should always be a zero.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Nov 2018 06:22:42 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-access-control/create-acs-5-8-regular-expression-for-command-sets/m-p/3743731#M25081</guid>
      <dc:creator>Eric R. Jones</dc:creator>
      <dc:date>2018-11-12T06:22:42Z</dc:date>
    </item>
    <item>
      <title>Re: create acs 5.8 regular expression for command sets</title>
      <link>https://community.cisco.com/t5/network-access-control/create-acs-5-8-regular-expression-for-command-sets/m-p/3743743#M25086</link>
      <description>&lt;P&gt;if you looking to deny regex you can do same way as permit this time we change 0 to 1&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Deny interf.*\sgig.*[1]\/2\/[1-2]&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;good regex tool&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://regex101.com/" target="_blank"&gt;https://regex101.com/&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Nov 2018 06:49:12 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-access-control/create-acs-5-8-regular-expression-for-command-sets/m-p/3743743#M25086</guid>
      <dc:creator>balaji.bandi</dc:creator>
      <dc:date>2018-11-12T06:49:12Z</dc:date>
    </item>
    <item>
      <title>Re: create acs 5.8 regular expression for command sets</title>
      <link>https://community.cisco.com/t5/network-access-control/create-acs-5-8-regular-expression-for-command-sets/m-p/3743745#M25088</link>
      <description>&lt;P&gt;Do not use * operator for everything. It is 0 or more occurance.&lt;/P&gt;
&lt;P&gt;There are a few pointers in the community on regular expresssions. Please look at those&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.cisco.com/t5/security-documents/acs-command-sets-arguments-regexp-interface-range/ta-p/3126213" target="_blank"&gt;https://community.cisco.com/t5/security-documents/acs-command-sets-arguments-regexp-interface-range/ta-p/3126213&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.cisco.com/t5/policy-and-access/need-help-in-creating-a-regex-in-acs-5-8/td-p/3221315" target="_blank"&gt;https://community.cisco.com/t5/policy-and-access/need-help-in-creating-a-regex-in-acs-5-8/td-p/3221315&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;I have some examples of regular expression in the ISE device admin prescriptive guide. You can look at that as well.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.cisco.com/t5/security-documents/cisco-ise-device-administration-prescriptive-deployment-guide/ta-p/3738365" target="_blank"&gt;https://community.cisco.com/t5/security-documents/cisco-ise-device-administration-prescriptive-deployment-guide/ta-p/3738365&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;-Krishnan&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Nov 2018 06:50:54 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-access-control/create-acs-5-8-regular-expression-for-command-sets/m-p/3743745#M25088</guid>
      <dc:creator>kthiruve</dc:creator>
      <dc:date>2018-11-12T06:50:54Z</dc:date>
    </item>
    <item>
      <title>Re: create acs 5.8 regular expression for command sets</title>
      <link>https://community.cisco.com/t5/network-access-control/create-acs-5-8-regular-expression-for-command-sets/m-p/3745405#M25096</link>
      <description>&lt;P&gt;Hi, I created this command set, permit int* g*^([1-4][\/][0][\/][1-4])$, and ran it through regex 101.&lt;/P&gt;
&lt;P&gt;It gave me a Full match in the Match Information section on 1/0/1 and other interfaces using 1/0/? format.&lt;/P&gt;
&lt;P&gt;It fails on g1/1/? format which is what I want.&lt;/P&gt;
&lt;P&gt;However, I'm still not able to access the interface.&lt;/P&gt;
&lt;P&gt;I modified the one you sent, .*\sgig.*[1-4]\/[1-4]\/[1-2], and no joy.&lt;/P&gt;
&lt;P&gt;They pass regex 101, thanks for that link btw.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ej&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Nov 2018 23:25:01 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-access-control/create-acs-5-8-regular-expression-for-command-sets/m-p/3745405#M25096</guid>
      <dc:creator>Eric R. Jones</dc:creator>
      <dc:date>2018-11-12T23:25:01Z</dc:date>
    </item>
    <item>
      <title>Re: create acs 5.8 regular expression for command sets</title>
      <link>https://community.cisco.com/t5/network-access-control/create-acs-5-8-regular-expression-for-command-sets/m-p/3745697#M25101</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I tested this one in&amp;nbsp; the regex 101 tester ^([1-4]\/[1-4]\/[1-4])$.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;It worked and the group that reappeared shows all 3 sections.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Hopefully this will work following the g* to signify gigabitethernet.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;So in my mind the rule should read.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Grant&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; command&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; attribute&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;deny&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;int*&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; g^([1-4]\/[1-4]\/[1-4])$&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;So when the user enters:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;config t&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;int g1/1/1&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;They should see a reply that this command is not authorized.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;ej&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Nov 2018 12:09:21 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-access-control/create-acs-5-8-regular-expression-for-command-sets/m-p/3745697#M25101</guid>
      <dc:creator>Eric R. Jones</dc:creator>
      <dc:date>2018-11-13T12:09:21Z</dc:date>
    </item>
  </channel>
</rss>

