cisco privilege權限

             Cisco網絡設備對於訪問用戶的不一樣,能夠像windows系統裏的帳戶設置同樣,爲了系統或設備的安全區別建立用戶。經過權限的分配以實施安全的設備管理,怎樣在Cisco路由設備裏面控制相應用戶的訪問?那麼咱們就須要知道privilege&privilege view 如何配置了。數據庫

             privilege這東西很簡單也很好玩的,接下來就來作個小實驗吧。windows

 

              r1與r2之間網段設置爲192.168.1.0/24,左邊爲:192。168。1。1 ,右邊爲192。168。1。2。安全

              咱先看下privilege的配置吧,需求:須要給chengxi用戶一個四級的密碼ccnp,只能使用configure terminal 其它命令不執行。網絡

             命令:ide

                       username  chengxi privilege 4 password ccnp測試

                        line vty 0 4this

                        login local   spa

                         exit3d

                         enable secret level 4  ccnpblog

                         privilege  exec level 4 configure terminal

測試(r2------>r1):

 

  只能進入全局模式但不能執行任何動做:

 

那麼privilege  的測試成功了,屬於level 4的用戶只能使用configure terminal命令。

若是咱們在本地轉換用戶級別的話如:enable password level 4 ccie

 

那就登陸進去就要先須要輸入使能密碼了,上面開始進入level 4的用戶直接enable 4 回車就進入特權模式了,由於他是從r2 telnet r1的,直接認證進入特權模式了。

若是咱們要對用戶行爲定位更精確的話,可使用privilege view 來進行角色建立,多個privilege view 能夠造成一個superview。。

          下面咱們就來建立一個privilege view 爲A ,用戶名與密碼依舊是chengxi與ccnp。vty 認證也同樣是本地數據庫認證。可是咱們要建立privilege view A就先要開啓aaa new-model ,而後再回到EXEC模式下輸入:enable view

提示password: xxxx,輸入level 15級的密碼便可。

如:

 再進入全局模式裏輸入parser view A.就進入了parser view A配置了,你能夠設置登陸密碼,容許使用的命令或執行的動做。

        那麼咱們如今要建立特權視圖A,容許在EXEC模式下執行configure terminal ,在接口模式下只能配置fa0/1。其它配置一概否認。

parser view A
 secret  rhce

commands interface include shutdown
 commands interface include ip address
 commands interface include ip
 commands interface include no shutdown
 commands interface include no ip address
 commands interface include no ip
 commands interface include no
 commands configure include interface
 commands exec include configure terminal
 commands exec include configure
 commands exec include show
 commands configure include interface FastEthernet0/1

配置好後咱們如今就能夠去測試了。

r2---->r1:

 

如今咱們已經進入了view A裏面了,密碼可不是level 15的密碼了啊,是view A裏定義的那個rhce啊。進去了以後哦,

 

看到了吧,其它命令都不可檢測。呵呵。這就是咱們「受制於人」的效果啊。另外我還在上一張圖裏面給你們展現了一個小 case。就是alias別名的做用。看到了吧。我把telnet 192.168.1.1也就是r2 telnet r1的命令用一個r2tor1來代替了。。因此在exec裏面只要輸入r2tor1就能夠telnet上r1了。呵呵。這個好玩吧。

相關文章
相關標籤/搜索