<?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 acs command set: how to permit only interfaces Gi [1-5]/0/[1-48] and in config-if, permit all commands? in Network Access Control</title>
    <link>https://community.cisco.com/t5/network-access-control/acs-command-set-how-to-permit-only-interfaces-gi-1-5-0-1-48-and/m-p/3199380#M555421</link>
    <description>&lt;P&gt;Hi Team,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope someone can help me on this subject because I'm on this for 2 weeks.&lt;/P&gt;
&lt;P&gt;My client wants to configure command sets to do two things:&lt;/P&gt;
&lt;P&gt;- permit only interfaces Gi [1-5]/0/[1-48]&lt;/P&gt;
&lt;P&gt;AND&lt;/P&gt;
&lt;P&gt;- in config-if permit all commands&lt;/P&gt;
&lt;P&gt;For information, Some of the client equipments have 52 ports.&lt;/P&gt;
&lt;P&gt;For the interfaces, I tried the following using wildcards:&lt;/P&gt;
&lt;P&gt;Interface GigabitEthernet 0/0/^&lt;/P&gt;
&lt;P&gt;Interface GigabitEthernet 1/0/^&lt;/P&gt;
&lt;P&gt;Interface GigabitEthernet 2/0/^&lt;/P&gt;
&lt;P&gt;Interface GigabitEthernet 3/0/^&lt;/P&gt;
&lt;P&gt;Interface GigabitEthernet 4/0/^&lt;/P&gt;
&lt;P&gt;Interface GigabitEthernet 5/0/^&lt;/P&gt;
&lt;P&gt;Deny Interface $/0/49&lt;/P&gt;
&lt;P&gt;Deny Interface $/0/50&lt;/P&gt;
&lt;P&gt;Deny Interface $/0/51&lt;/P&gt;
&lt;P&gt;Deny Interface $/0/52&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I'm not wrong, the wildcard "^" and "$" can be used.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This doesn't seem to work. Can someone help me on this?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Many thanks&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 21 Feb 2020 18:36:13 GMT</pubDate>
    <dc:creator>hichamemorchid</dc:creator>
    <dc:date>2020-02-21T18:36:13Z</dc:date>
    <item>
      <title>acs command set: how to permit only interfaces Gi [1-5]/0/[1-48] and in config-if, permit all commands?</title>
      <link>https://community.cisco.com/t5/network-access-control/acs-command-set-how-to-permit-only-interfaces-gi-1-5-0-1-48-and/m-p/3199380#M555421</link>
      <description>&lt;P&gt;Hi Team,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope someone can help me on this subject because I'm on this for 2 weeks.&lt;/P&gt;
&lt;P&gt;My client wants to configure command sets to do two things:&lt;/P&gt;
&lt;P&gt;- permit only interfaces Gi [1-5]/0/[1-48]&lt;/P&gt;
&lt;P&gt;AND&lt;/P&gt;
&lt;P&gt;- in config-if permit all commands&lt;/P&gt;
&lt;P&gt;For information, Some of the client equipments have 52 ports.&lt;/P&gt;
&lt;P&gt;For the interfaces, I tried the following using wildcards:&lt;/P&gt;
&lt;P&gt;Interface GigabitEthernet 0/0/^&lt;/P&gt;
&lt;P&gt;Interface GigabitEthernet 1/0/^&lt;/P&gt;
&lt;P&gt;Interface GigabitEthernet 2/0/^&lt;/P&gt;
&lt;P&gt;Interface GigabitEthernet 3/0/^&lt;/P&gt;
&lt;P&gt;Interface GigabitEthernet 4/0/^&lt;/P&gt;
&lt;P&gt;Interface GigabitEthernet 5/0/^&lt;/P&gt;
&lt;P&gt;Deny Interface $/0/49&lt;/P&gt;
&lt;P&gt;Deny Interface $/0/50&lt;/P&gt;
&lt;P&gt;Deny Interface $/0/51&lt;/P&gt;
&lt;P&gt;Deny Interface $/0/52&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I'm not wrong, the wildcard "^" and "$" can be used.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This doesn't seem to work. Can someone help me on this?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Many thanks&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Feb 2020 18:36:13 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-access-control/acs-command-set-how-to-permit-only-interfaces-gi-1-5-0-1-48-and/m-p/3199380#M555421</guid>
      <dc:creator>hichamemorchid</dc:creator>
      <dc:date>2020-02-21T18:36:13Z</dc:date>
    </item>
    <item>
      <title>Re: acs command set: how to permit only interfaces Gi [1-5]/0/[1-48] and in config-if, permit all commands?</title>
      <link>https://community.cisco.com/t5/network-access-control/acs-command-set-how-to-permit-only-interfaces-gi-1-5-0-1-48-and/m-p/3200492#M555450</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;The caret '^' and $ are special regular expression operators (not wildcards)&amp;nbsp;and you have to use them as follows:&lt;/P&gt;
&lt;P&gt;^ is used to match the beginning of a string&lt;/P&gt;
&lt;P&gt;$ is used to match the end of the string&lt;/P&gt;
&lt;P&gt;You can't just place them willy nilly in your expression &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp; No worries - we have all been there, and regex doesn't come easily to most people.&amp;nbsp; Needs loads of practice but is really powerful once you understand it.&lt;/P&gt;
&lt;P&gt;e.g.&lt;/P&gt;
&lt;P&gt;Interface GigabitEthernet 0/0/^&amp;nbsp; is wrong because the ^ operator doesn't work at the end of a line., and likewise for&amp;nbsp;Deny Interface $/0/49 because $ is always at the end of the line.&lt;/P&gt;
&lt;P&gt;Here is a regular expression&amp;nbsp;I came up with to cater for your interface statement&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;interf.*\sgig.*[1-5]\/0\/[1-48]&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Test it out on &lt;A href="https://regex101.com/" target="_blank"&gt;https://regex101.com/&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 826px;"&gt;&lt;img src="https://community.cisco.com/t5/image/serverpage/image-id/2088i0A42D8C25FB78933/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As for the remaining stuff, you can make a list of all the commands that are allowed, e.g. like ip address, or shutdown, no shutdown etc.&lt;/P&gt;
&lt;P&gt;See how you go.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Oct 2017 23:20:59 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-access-control/acs-command-set-how-to-permit-only-interfaces-gi-1-5-0-1-48-and/m-p/3200492#M555450</guid>
      <dc:creator>Arne Bier</dc:creator>
      <dc:date>2017-10-17T23:20:59Z</dc:date>
    </item>
    <item>
      <title>Re: acs command set: how to permit only interfaces Gi [1-5]/0/[1-48] and in config-if, permit all commands?</title>
      <link>https://community.cisco.com/t5/network-access-control/acs-command-set-how-to-permit-only-interfaces-gi-1-5-0-1-48-and/m-p/3200668#M555471</link>
      <description>&lt;P&gt;Hi Arne,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for your feedback.&lt;/P&gt;
&lt;P&gt;I'll test the regex you provided and let you know if this works in my side.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;</description>
      <pubDate>Wed, 18 Oct 2017 08:19:31 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-access-control/acs-command-set-how-to-permit-only-interfaces-gi-1-5-0-1-48-and/m-p/3200668#M555471</guid>
      <dc:creator>hichamemorchid</dc:creator>
      <dc:date>2017-10-18T08:19:31Z</dc:date>
    </item>
    <item>
      <title>Re: acs command set: how to permit only interfaces Gi [1-5]/0/[1-48] and in config-if, permit all commands?</title>
      <link>https://community.cisco.com/t5/network-access-control/acs-command-set-how-to-permit-only-interfaces-gi-1-5-0-1-48-and/m-p/3211582#M555479</link>
      <description>&lt;P&gt;Hi Ame,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried to test your suggestion via the ACS CLI but doesn't found how to implement it.&lt;/P&gt;
&lt;P&gt;Do you know how to do the same via the ACS web interface.&lt;/P&gt;
&lt;P&gt;Please see screenshot attached&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Nov 2017 13:51:34 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-access-control/acs-command-set-how-to-permit-only-interfaces-gi-1-5-0-1-48-and/m-p/3211582#M555479</guid>
      <dc:creator>hichamemorchid</dc:creator>
      <dc:date>2017-11-06T13:51:34Z</dc:date>
    </item>
    <item>
      <title>Re: acs command set: how to permit only interfaces Gi [1-5]/0/[1-48] and in config-if, permit all commands?</title>
      <link>https://community.cisco.com/t5/network-access-control/acs-command-set-how-to-permit-only-interfaces-gi-1-5-0-1-48-and/m-p/3212777#M555487</link>
      <description>&lt;P&gt;I don't have an ACS to test but I was able to enter these commands below that (with some modifications) may do the trick.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The idea is that once you have entered conf t, then in theory you only can go to "interface" next and in there you'll have to list all the commands you need (I have started you off with a few).&amp;nbsp; Don't forget the end and exit commands.&lt;/P&gt;
&lt;P&gt;IOS has this other concept that you may want to investigate - it's called "views" - and I think that may be another possible solution to do RBAC.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.omnisecu.com/ccna-security/parser-views-role-based-access-control-rbac.php" target="_blank"&gt;http://www.omnisecu.com/ccna-security/parser-views-role-based-access-control-rbac.php&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ACS-regex.PNG" style="width: 814px;"&gt;&lt;img src="https://community.cisco.com/t5/image/serverpage/image-id/3024i3935CC40B174391B/image-size/large?v=v2&amp;amp;px=999" role="button" title="ACS-regex.PNG" alt="ACS-regex.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Nov 2017 23:14:23 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-access-control/acs-command-set-how-to-permit-only-interfaces-gi-1-5-0-1-48-and/m-p/3212777#M555487</guid>
      <dc:creator>Arne Bier</dc:creator>
      <dc:date>2017-11-07T23:14:23Z</dc:date>
    </item>
  </channel>
</rss>

