In this lab you will secure administrative access to the Cisco router in a small campus network.
R1(config)#enable password Duytan2
R1#exit
R1>enable
Password:Duytan2
R1#
R1(config)#enable secret Duytan1
R1#exit
You cannot enter Privileged Exec mode using the enable password because it has been superseded by the enable secret.
R1>enable
Password:Duytan2
Password:Duytan1
R1#
The enable password is shown in plain text but the enable secret is encrypted.
R1#show run
Building configuration...
Current configuration : 762 bytes
!
version 15.1
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname R1
!
enable secret 5 $1$mERr$J2XZHMOgpVVXdLjC9lYtE1
enable password Duytan2
R1(config)#service password-encryption
R1#show running-config
Building configuration...
Current configuration : 772 bytes
!
version 15.1
no service timestamps log datetime msec
no service timestamps debug datetime msec
service password-encryption
!
hostname R1
!
enable secret 5 $1$mERr$J2XZHMOgpVVXdLjC9lYtE1
enable password 7 0807404F0A1207180A59
R1(config)#line console 0
R1(config-line)#logging synchronous
R1(config-line)#exec-timeout 15
R1(config)#exit
R1(config)#line vty 0 15
R1(config-line)#logging synchronous
R1(config-line)#exec-timeout 15
R1(config)#exit
R1(config)#access-list 1 permit host 10.0.0.10
R1(config)#line vty 0 15
R1(config-line)#login
R1(config-line)#password Duytan3
R1(config-line)#access-class 1 in
R1(config)#banner login "
Enter TEXT message. End with the character '"'.
Authorised users only"
C:\> telnet 10.0.0.1
Trying 10.0.0.1 … Open
Authorised users only
User Access Verification
Password: Duytan3
R1>enable
Password: Duytan1
R1#exit
[Connection to 10.0.0.1 closed by foreign host]
C:\> telnet 10.0.0.1
Trying 10.0.0.1 …
% Connection refused by remote host
R1(config)#username admin secret Duytan4
R1(config)#line vty 0 15
R1(config-line)#login local
C:\> telnet 10.0.0.1
Trying 10.0.0.1 …Open
Authorised users only
User Access Verification
Username: admin
Password: Duytan4
R1>exit
[Connection to 10.0.0.1 closed by foreign host]
R1(config)#ip domain-name duytan.com
R1(config)#crypto key generate rsa
The name for the keys will be: R1.duytan.com
Choose the size of the key modulus in the range of 360 to
2048 for your General Purpose Keys. Choosing a key modulus greater than 512 may take a few minutes.
How many bits in the modulus [512]: 768
% Generating 768 bit RSA keys, keys will be non-exportable...[OK]
C:\> ssh –l admin 10.0.0.1
Open
Password: Duytan4
R1>exit
[Connection to 10.0.0.1 closed by foreign host]
You will not be able to SSH to R1 from PC2. Telnet and SSH access are both controlled by the ‘line vty’ configuration which has an access list applied only allowing access from PC1.
C:\> ssh –l admin 10.0.0.1
Trying 10.0.0.1 …
% Connection refused by remote host
R1(config)#line vty 0 15
R1(config-line)#transport input ssh
R1(config-line)#exit
R1(config)#ip ssh version 2
C:\> telnet 10.0.0.1
Trying 10.0.0.1 …Open
[Connection to 10.0.0.1 closed by remote host]
C:\> ssh –l admin 10.0.0.1
Open
Password: Duytan4
R1>exit
[Connection to 10.0.0.1 closed by foreign host]
No username and password are currently required to login to the console. The virtual terminal lines which control Telnet and SSH access have been secured but console access has not.
R1(config)#line console 0
R1(config-line)#login
% Login disabled on line 0, until 'password' is set
R1(config-line)#password Duytan5
R1(config-line)#end
R1#logout
R1 con0 is now available
Press RETURN to get started.
Authorised users only
User Access Verification
Password: Duytan5
R1>enable
Password: Duytan1
R1#
NTP Network Time Protocol
R1(config)#clock timezone PST -8
R1(config)#ntp server 10.0.1.100
R1#show clock
16:19:36.51 PST Mon Oct 2 2017
R1#show ntp status
Clock is synchronized, stratum 2, reference is 10.0.1.100
nominal freq is 250.0000 Hz, actual freq is 249.9990 Hz,
precision is 2**19
reference time is DD53255C.0000039C (00:16:28.924 UTC Tue
Oct 3 2017)
clock offset is 0.00 msec, root delay is 0.00 msec
root dispersion is 0.02 msec, peer dispersion is 0.02 msec.
Switch Management
(Note that it is best practice to NOT use VLAN 1 for any production traffic in a real world network and we would normally have a separate dedicated IP subnet for management traffic. We are using VLAN 1 in our lab environment to simplify the topology).
SW2(config)#int vlan 1
SW2(config-if)#ip address 10.0.1.50 255.255.255.0
SW2(config-if)#no shutdown
SW2(config-if)#exit
SW2(config)#ip default-gateway 10.0.1.1
» Tin mới nhất:
» Các tin khác: