Here is the gist of the first security task, 9.1:
R9 should accept telnet on port 3005.
It should not allow telnet on port 23.
Configure a local user cisco with password of cisco and privilege level 15.
Telnet should require a login, but console access should not
I am going to use R5 as an example since I already have it up in Dynamips. First, to allow telnet on port 3005 use the rotary command:
R5(config)#username cisco privilege 15 password cisco
R5(config-line)#line vty 5
R5(config-line)#rotary 5
R5(config-line)#login local
Next we create an ACL to block telnet to port 23:
R5(config)#access-list 101 deny tcp any any eq telnet
R5(config)#access-list 101 permit ip any any
R5(config)#line vty 0 ?
<1-935> Last Line number
R5(config)#line vty 0 935
R5(config-line)#access-class 101 in
Let's try from R4:
R4#telnet 141.141.45.5
Trying 141.141.45.5 ...
% Connection refused by remote host
R4#telnet 141.141.45.5 3005
Trying 141.141.45.5, 3005 ... Open
User Access Verification
Username: cisco
Password:
R5#
Now we have already satisfied the last requirement right? "Telnet should require a login, but console access should not." But for some reason the proctor guide goes a step further and creates an aaa method for VTY while console uses the default. Here's what they have:
R5(config)#aaa new-model
R5(config)#aaa authentication login VTY local
R5(config)#aaa authentication login default none
R5(config)#line vty 5
R5(config-line)#login authentication VTY
The first command tells the router to enable the aaa commands. The second command defines a login list called VTY. Note that this is not used anywhere until it is applied in the last command. The third command configures that default login method to be "none" or no authentication. This method is applied to the console by default.
Hi, just came across this post while googling...
ReplyDeleteshouldn't you use
R5(config)#line con 0
instead of
R5(config)#line vty 5
You telnet to the VTY line, not the Console line.
ReplyDeleteHi there, just a quick question, it seems that you have excellent understanding of Cisco IOS features, how did you manage to learn all this. What book(s) did you refer? BTW, Love your BLOG, it has helped me immensely.
ReplyDeleteThanks,
Jit
Hello. I just read the doccd a lot, especially the application, addressing, system mgmt and configuration fundamentals guide. This is where a lot of the lesser known features reside. Also, I just played arounf the in the router a lot using ? to discover commands I didn't know a lot about.
ReplyDeleteGood luck!
Just want to say THANK YOU! :)
ReplyDeletehi, is there any other ways to telnet on the non standard port other than the rotary command(3000 to 3127 port)...?
ReplyDeleteThis comment has been removed by the author.
ReplyDeletehow to user a non standard port such as 6187 to use telnet?
ReplyDeletewe can use port map, but is there any other way to do it?
can we configure telnet on port 7200
ReplyDelete