也许对该功能的工作方式存在误解......这是我的基本配置......基本功能不需要显式ACL即可工作
配置login block-for
功能前的基线配置
xconnect01#sh runn | i username|aaa|access-list
username cisco privilege 15 password 7 13061E010803
aaa new-model
aaa authentication login default local-case
aaa authentication enable default enable
aaa session-id common
xconnect01#
xconnect01#sh runn | b line vty
line vty 0 4
password 7 070C285F4D06
!
ntp clock-period 17180450
ntp server vrf mgmtVrf 172.16.1.5
end
xconnect01#
配置功能
现在我配置基本login block-for
功能...
xconnect01#conf t
Enter configuration commands, one per line. End with CNTL/Z.
xconnect01(config)# login block-for 120 attempts 3 within 60
xconnect01(config)#end
xconnect01#quit
Connection closed by foreign host.
[mpenning@tsunami ~]$
证明失败
输入一些错误的登录名以故意阻止自己。
[mpenning@tsunami ~]$ date; telnet 172.16.1.240
Thu Mar 6 06:05:20 CST 2014
Trying 172.16.1.240...
Connected to 172.16.1.240.
Escape character is '^]'.
User Access Verification
Username: foobarme
Password:
% Authentication failed
Username: foobarme
Password:
% Authentication failed
Username: foobarme
Password:
% Authentication failed
Connection closed by foreign host.
[mpenning@tsunami ~]$
演示积木 120 秒
注意在 my 之前的日期命令telnet
;这些文件正是我 telnet 到实验室路由器时的文件。
[mpenning@tsunami ~]$ date; telnet 172.16.1.240
Thu Mar 6 06:05:37 CST 2014
Trying 172.16.1.240...
telnet: Unable to connect to remote host: Connection refused
[mpenning@tsunami ~]$
[mpenning@tsunami ~]$ date; telnet 172.16.1.240
Thu Mar 6 06:06:51 CST 2014
Trying 172.16.1.240...
telnet: Unable to connect to remote host: Connection refused
[mpenning@tsunami ~]$
在 120 秒的静默期后证明登录成功
被屏蔽两分钟后,我可以重新登录...
[mpenning@tsunami ~]$ date; telnet 172.16.1.240
Thu Mar 6 06:07:56 CST 2014
Trying 172.16.1.240...
Connected to 172.16.1.240.
Escape character is '^]'.
User Access Verification
Username: cisco
Password:
xconnect01>