4.4.8 Packet Tracer – Configure Secure Passwords and SSH Answers

Packet Tracer – Configure Secure Passwords and SSH (Answers Version)

Answers Note: Red font color or gray highlights indicate text that appears in the instructor copy only.

Addressing Table

Device

Interface

IP Address

Subnet Mask

Default Gateway

RTA

G0/0/0

172.16.1.1

255.255.255.0

N/A

PCA

NIC

172.16.1.10

255.255.255.0

172.16.1.1

SW1

VLAN 1

172.16.1.2

255.255.255.0

172.16.1.1

Blank Line, No additional information

Scenario

The network administrator has asked you to prepare RTA and SW1 for deployment. Before they can be connected to the network, security measures must be enabled.

Intructions

Part 1:Configure Basic Security on the Router

  1. Configure IP addressing on PCA according to the Addressing Table.
  2. Console into RTA from the Terminal on PCA.
  3. Configure the hostname as RTA.
  4. Configure IP addressing on RTA and enable the interface.
  5. Encrypt all plaintext passwords.

RTA(config)# service password-encryption

  1. Set the minimum password length to 10.

RTA(config)# security passwords min-length 10

  1. Set a strong secret password of your choosing.

Note: Choose a password that you will remember, or you will need to reset the activity if you are locked out of the device.

  1. Disable DNS lookup.

RTA(config)# no ip domain-lookup

  1. Set the domain name to netsec.com (case-sensitive for scoring in PT).

RTA(config)# ip domain-name netsec.com

  1. Create a user of your choosing with a strong encrypted password.

RTA(config)# username any_user secret any_password

  1. Generate 1024-bit RSA keys.

Note: In Packet Tracer, enter the crypto key generate rsa command and press Enter to continue.

RTA(config)# crypto key generate rsa

The name for the keys will be: RTA.netsec.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]: 1024

  1. Block anyone for three minutes who fails to log in after four attempts within a two-minute period.

RTA(config)# login block-for 180 attempts 4 within 120

  1. Configure all VTY lines for SSH access and use the local user profiles for authentication.

RTA(config)# line vty 0 4

RTA(config-line)# transport input ssh

RTA(config-line)# login local

  1. Set the EXEC mode timeout to 6 minutes on the VTY lines.

RTA(config-line)# exec-timeout 6

  1. Save the configuration to NVRAM.
  2. Access the command prompt on the desktop of PCA to establish an SSH connection to RTA.

C:\> ssh /?

Packet Tracer PC SSH

Usage: SSH -l username target

C:\>

Part 2:Configure Basic Security on the Switch

Configure switch SW1 with corresponding security measures. Refer to the configuration steps on the router if you need additional assistance.

  1. Console into SW1 from the Terminal on PCA.
  2. Configure the hostname as SW1.
  3. Configure IP addressing on SW1 VLAN1 and enable the interface.
  4. Configure the default gateway address.
  5. Disable all unused switch ports.

Note: On a switch it is a good security practice to disable unused ports. One method of doing this is to simply shut down each port with the ‘shutdown’ command. This would require accessing each port individually. There is a shortcut method for making modifications to several ports at once by using the interface range command. On SW1 all ports except FastEthernet0/1 and GigabitEthernet0/1 can be shutdown with the following command:

SW1(config)# interface range F0/2-24, G0/2

SW1(config-if-range)# shutdown

%LINK-5-CHANGED: Interface FastEthernet0/2, changed state to administratively down

%LINK-5-CHANGED: Interface FastEthernet0/3, changed state to administratively down

<Output omitted>

%LINK-5-CHANGED: Interface FastEthernet0/24, changed state to administratively down

%LINK-5-CHANGED: Interface GigabitEthernet0/2, changed state to administratively down

The command used the port range of 2-24 for the FastEthernet ports and then a single port range of GigabitEthernet0/2.

  1. Encrypt all plaintext passwords.
  2. Set a strong secret password of your choosing.
  3. Disable DNS lookup.
  4. Set the domain name to netsec.com (case-sensitive for scoring in PT).
  5. Create a user of your choosing with a strong encrypted password.
  6. Generate 1024-bit RSA keys.
  7. Configure all VTY lines for SSH access and use the local user profiles for authentication.
  8. Set the EXEC mode timeout to 6 minutes on all VTY lines.
  9. Save the configuration to NVRAM.

Script

RTA

enable

configure terminal

service password-encryption

security passwords min-length 10

ip domain-name netsec.com

no ip domain-lookup

hostname RTA

interface GigabitEthernet0/0/0

ip address 172.16.1.1 255.255.255.0

no shutdown

enable secret any_password

username any_user secret any_password

crypto key generate rsa

1024

login block-for 180 attempts 4 within 120

line vty 0 4

transport input ssh

login local

exec-timeout 6

end

copy running-config startup-config

SW1

enable

configure terminal

hostname SW1

service password-encryption

enable secret my_password

no ip domain-lookup

ip domain-name netsec.com

username my_user secret my_password

interface range fastethernet0/2 – /24, gigabitethernet 0/2

shutdown

interface Vlan1

ip address 172.16.1.2 255.255.255.0

no shutdown

ip default-gateway 172.16.1.1

line vty 0 15

exec-timeout 6 0

login local

transport input ssh

end

copy running-config startup-config