Jump to content
Калькуляторы

Tacacs cmd regexp

Здравствуйте, кто имел опыт составления cmd regexp для Tacacs??

Задача какая, разрешить ТОЛЬКО смотреть:

 

sh ip bgp summary
sh ip bgp <ip address|host>

 

И все, ибо, как например на страничке прописав в поле bgp: regexp .* или neighbors интересное покажет.

На данный момент так:

 

cmd = show {
permit "ip bgp"
permit "ip bgp summary"
}

 

Единственное что получилось, прописать первыми строки deny "ip bgp neighbors" ..

Так:

 

cmd = show {
           permit ip\sbgp\s[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+
           deny ip\sbgp\s.*
}

 

не работает, хотя много примеров таких есть:

 

All other commands are denied (by default).
user=fred {

   cmd = telnet {
# permit specified telnets
permit 131\.108\.13\.[0-9]+
permit 128\.[0-9]+\.12\.3
   }
   cmd = show {
# permit show commands
permit .*
   }
}

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.