Siguran administrativni pristup prekidaču

Edukacije Brček
22 Jun 202406:54

Summary

TLDRThe video demonstrates how to secure access to a network switch by configuring password protections for both console and virtual terminal (vty) access. It walks through the steps of setting up passwords in user and privilege exec modes, encrypting them to enhance security, and configuring a message of the day (MOTD) banner as a legal warning. The video emphasizes using strong, complex passwords and shows how to view and verify configurations using the command line interface (CLI) of a Cisco switch.

Takeaways

  • 🔐 It's important to secure access to network devices so only administrators can make changes.
  • 🖥️ The initial configuration is done using a terminal emulation program to access the command line interface of the switch.
  • ⚠️ A security risk exists if no password is required for user exec mode or privilege exec mode.
  • 🔑 To secure the console connection, a password must be set using the 'password' and 'login' commands in line configuration mode.
  • 🛡️ Privilege exec mode should also be secured by setting an 'enable secret' password, which is encrypted in the configuration file.
  • 🔍 To verify passwords, use the 'show running-config' command to check the console and vty line settings.
  • 💻 Virtual terminal (vty) access should be secured by configuring a password for remote logins.
  • 🔒 Password encryption can be added using the 'service password-encryption' command, providing light encryption for all passwords.
  • ⚠️ Setting a banner message with 'Banner motd' serves as a legal warning to unauthorized users when they attempt to log in.
  • ✅ After securing the device, verifying configurations with the 'show running-config' command ensures that all settings, including encryption, are in place.

Q & A

  • What is the initial security risk mentioned when accessing the switch?

    -The initial security risk is that no password is required to access the switch's command line interface, allowing unrestricted access to both user exec mode and privilege exec mode.

  • What is the purpose of securing access to the console connection?

    -The purpose is to prevent unauthorized users from accessing the switch's command line interface by requiring a password before entering user exec mode.

  • What command is used to enter Global configuration mode?

    -The command 'config T' is used to enter Global configuration mode.

  • How can you set a password for the console connection?

    -To set a password for the console connection, enter line configuration mode using the command 'line console 0' and then set the password with the command 'password <password>'. In this example, the password 'Cisco' was used.

  • What is the difference between the 'enable' and 'enable secret' commands?

    -The 'enable' command simply sets a password for privilege exec mode, while 'enable secret' encrypts the password to enhance security.

  • What command is used to view the running configuration of the switch?

    -The 'show running config' command is used to view the current running configuration of the switch.

  • How do you secure virtual terminal (VTY) access for remote logins?

    -To secure virtual terminal access, you enter the command 'line vty 0 15' from Global configuration mode, then set a password with 'password <password>' and enable login with the 'login' command.

  • What command can you use to encrypt passwords in the configuration file?

    -The command 'service password-encryption' is used to apply encryption to all passwords in the switch’s configuration file.

  • Why is it important to set a banner message on the switch, and how do you configure it?

    -A banner message is important as it serves as a legal warning for unauthorized users. It can be configured using the 'banner motd' command, followed by the message framed between delimiters (e.g., '#').

  • How can you verify that the console password and banner message are properly configured?

    -You can verify the console password by exiting the switch and re-entering to check if the password prompt appears. The banner message will be displayed immediately after pressing 'Enter' when trying to access the switch.

Outlines

00:00

🔐 Securing Console and Privileged Access

This paragraph emphasizes the importance of securing network devices to ensure only administrators can access them. It begins with establishing a console connection to a switch, where the lack of password protection presents a security risk. The steps to secure access include setting passwords for both the console connection and privileged exec mode. A password 'Cisco' is used for the console, and 'class' for the privileged exec mode. The use of 'enable secret' ensures the privileged exec mode password is encrypted, enhancing security. The verification process confirms these security measures are in place, with access now requiring passwords.

05:01

🔒 Encrypting Passwords and Setting Login Banner

This section covers additional security configurations, including encrypting passwords to prevent them from being displayed in plain text in the configuration file. The command 'service password-encryption' is used to apply a basic level of encryption to all passwords. It also describes how to set a 'message of the day' (MOTD) banner, which provides a legal warning to unauthorized users attempting to access the switch. The steps conclude with testing the configuration, where both the encrypted passwords and the banner are displayed before allowing access.

Mindmap

Keywords

💡Console connection

A console connection refers to a direct connection to a device's command line interface (CLI) via terminal emulation software. In the video, the speaker demonstrates accessing the switch’s user EXEC mode through a console connection, emphasizing the need to secure this access to prevent unauthorized changes to the network device.

💡User EXEC mode

User EXEC mode is the initial access level in a network device’s command line interface, where limited monitoring commands can be executed but no configurations can be made. In the video, the speaker notes that the user EXEC mode is accessed without a password, highlighting the security risk this poses.

💡Privilege EXEC mode

Privilege EXEC mode grants advanced access to network device commands, allowing configurations to be changed. The video emphasizes the security vulnerability when this mode is entered without authentication, and demonstrates how to secure it by setting an enable password.

💡Global configuration mode

Global configuration mode is where a user can make configuration changes that affect the entire network device. In the video, the speaker enters this mode with the 'config T' command to set passwords and enhance security settings for both console and remote connections.

💡Password encryption

Password encryption is the process of converting passwords into a secure format so they are not displayed in plain text. The video explains how using the 'service password-encryption' command protects passwords in the configuration file, thereby improving the device’s security.

💡Enable secret

Enable secret is a command used to set an encrypted password for Privilege EXEC mode access. The video contrasts this with the 'enable password' command, explaining that 'enable secret' ensures the password is hashed in the configuration file, thus providing better security.

💡VTY lines

VTY (Virtual Teletype) lines refer to the virtual connections that allow remote access to a device. The video demonstrates how to configure VTY lines for remote login by setting passwords, and how to secure those passwords using encryption.

💡Banner message

A banner message, such as a Message of the Day (MOTD), is a legal notice displayed to users before login, typically warning unauthorized users. The video shows how to set up a banner message that reads 'Authorized access only. Violators will be prosecuted,' as part of the initial device configuration.

💡Running configuration file

The running configuration file contains the current configuration settings of a network device. In the video, the speaker reviews the running config to ensure that passwords for both console and VTY access are set and encrypted properly, highlighting its importance for verifying security settings.

💡Service password-encryption

The 'service password-encryption' command applies basic encryption to passwords in the running configuration. The video uses this command to obscure the plain text passwords set for both console and VTY access, demonstrating how it helps secure the device’s configuration from unauthorized viewing.

Highlights

Securing access to devices is crucial to prevent unauthorized changes and maintain network security.

The process begins with configuring the device through the command line interface (CLI) of the switch.

User exec mode is accessible without a password, presenting a security risk.

Privilege exec mode can also be accessed without authentication, adding to the vulnerability.

Access to the console connection should be secured by entering Global configuration mode and setting a password.

In line configuration mode, the 'password' and 'login' commands are used to set a console connection password.

To secure access to privilege exec mode, the 'enable secret' command is used, which ensures the password is encrypted.

After setting passwords, attempting to access the switch prompts for authentication, both for user and privilege exec modes.

The 'show running-config' command verifies that the enable secret password is hashed in the configuration file.

The 'line vty' command is used to secure virtual terminal access, which allows remote login to the switch.

By configuring all 16 vty lines (0-15), multiple remote logins can be managed and secured with a password.

The 'service password-encryption' command ensures that passwords are encrypted in the configuration file.

A 'banner motd' (message of the day) command is set to display a legal warning upon login attempts.

The banner warns unauthorized users and potential hackers about legal consequences for unauthorized access.

Verifying the setup confirms that both console and virtual terminal passwords are encrypted and a banner is displayed.

Transcripts

play00:05

when installing a device on a network

play00:07

it's important to secure access to the

play00:09

device so only an administrator will be

play00:12

able to access it and make changes to do

play00:15

this we'll need to perform some initial

play00:17

configuration settings I'll click on

play00:21

pc1 I'll click on the terminal emulation

play00:24

program and now you can see that I have

play00:27

a console connection into the switch

play00:29

command line I'll press

play00:32

enter and this takes me to the command

play00:34

line interface as you can see I'm logged

play00:37

into the switch and user exec mode no

play00:40

password was required to access the

play00:42

command line This is a security risk if

play00:46

I type the enable command you can see

play00:48

that I have now entered privilege exec

play00:50

mode also without any type of

play00:53

authentication this presents a great

play00:55

security risk since from privilege exec

play00:57

mode I have access to configure the

play00:59

switch the first thing you'll want to do

play01:01

is secure access to both the console

play01:03

connection and to privilege exec mode

play01:06

first I'll control access to the console

play01:08

connection to do that I'll get into

play01:11

Global configuration mode with the

play01:13

config T command and then I'll type in

play01:16

line console 0 to enter line

play01:20

configuration mode I can now put in a

play01:22

password for my console Connection by

play01:25

typing the command password and a

play01:27

password of Cisco Breeze of this

play01:30

demonstration I'm using simple passwords

play01:33

but you'll want to use strong complex

play01:34

passwords whenever possible I'll type in

play01:37

the login command which will require the

play01:40

password prior to entering user exec

play01:42

mode next I'll secure access to

play01:45

privilege exec mode to do this I'll type

play01:48

exit to return to Global configuration

play01:50

mode then I'll enter the command enable

play01:53

secret followed by the password class

play01:57

the secret parameter that I used assures

play01:59

me that the password class will be

play02:01

encrypted in the configuration file

play02:03

let's see if our passwords have been set

play02:05

correctly I'll do a contrl c to get to

play02:08

privilege exec mode and then I'll exit

play02:11

the switch now when I press enter I

play02:14

should be prompted for a password before

play02:16

establishing a console connection and it

play02:18

does this password should be Cisco as I

play02:21

type in the password for security

play02:23

purposes you won't be able to see any

play02:26

characters if I type it in correctly it

play02:28

should take me into user exec mode and

play02:30

it does and from here I'll type enable

play02:34

and you can see that now I'm prompted

play02:36

for another password this time I'll type

play02:38

in class and press enter and you can see

play02:41

now that I'm in privilege exec mode only

play02:44

those with a knowledge of the correct

play02:46

passwords will be able to configure this

play02:48

device let's take a look at our running

play02:50

configuration file up to this point I'll

play02:53

do that by typing in the command show

play02:56

running config you can see at the top of

play02:59

the running running configuration file

play03:01

that the enable secret password has been

play03:04

hashed within the file to see the rest

play03:06

of the configuration I'll press the

play03:08

space bar on my keyboard and I'll go

play03:10

down towards the bottom where you can

play03:12

see the configuration for the console

play03:14

line here it shows a password of Cisco

play03:18

and you can see it in plain text we'll

play03:20

change this a little later now that I've

play03:23

secured access to the console Port I'll

play03:25

also want to secure virtual terminal

play03:27

access for remote logins from global

play03:30

configuration

play03:32

mode I'll type in the command line

play03:36

vty and then how many lines I want to

play03:39

allow remote access to the Cisco switch

play03:41

supports 16 simultaneous remote logins

play03:44

through virtual terminals to configure

play03:46

all 16 I simply type in zero a space and

play03:51

15 and press enter and then I'll put in

play03:54

the command password Cisco and then

play03:57

login let's take a look at these

play03:59

passwords in our running configuration

play04:01

file I'll do a contrl c to get to

play04:04

privilege exec mode and then I'll do a

play04:06

show run which is short for show running

play04:09

config I'll space bar all the way down

play04:12

to the end and you can see under the

play04:15

configuration for the console line is

play04:17

the vty line configuration the iOS

play04:20

automatically breaks this down into two

play04:22

groups the first five lines 0 through 4

play04:26

followed by the next 10 lines 5 through

play04:29

15 team as with the console password you

play04:32

can see that the vty line passwords are

play04:35

also seen in plain text we can add

play04:37

greater security to the switch if we can

play04:39

encrypt these passwords so that they are

play04:41

obscured in the configuration file to do

play04:44

this I'll go back to Global

play04:46

configuration mode then I'll enter the

play04:48

command

play04:50

service

play04:52

password

play04:53

encryption this command will put a light

play04:56

level of encryption on all passwords on

play04:58

the switch to verify that password

play05:00

encryption has been set I'll exit Global

play05:03

configuration

play05:05

mode and type Show run to view the

play05:08

running configuration file if I space

play05:12

bar down to the end you can now see that

play05:14

the console password as well as the vty

play05:17

line password has been encrypted another

play05:21

important initial configuration command

play05:24

is setting a banner message this is a

play05:26

message that will be presented to users

play05:28

when they log in and serves as a legal

play05:31

warning for any wouldbe hackers to do

play05:33

this I'll go to Global configuration

play05:36

mode and then I'll type in the command

play05:38

Banner motd that stands for message of

play05:42

the day the message that I type will

play05:44

need to be framed between two delimiters

play05:46

or characters just make sure that

play05:48

whatever character you choose is not

play05:50

used within the body of your message for

play05:52

instance I'll use a pound sign for my

play05:55

delimiters and then in between I'll put

play05:58

in the message

play06:00

authorized access only

play06:04

violators will be

play06:09

prosecuted to the full extent of the

play06:14

law and then I'll end it with another

play06:17

pound sign and now the banner is set now

play06:20

let's verify it I'll do a contrl c and

play06:23

then type exit to leave the switch and

play06:26

then I'll press enter notice that I'm

play06:28

presented with the Banner warning I just

play06:30

typed in as well as a request for a

play06:32

password just to get access to the

play06:34

console I'll put in the password Cisco

play06:36

and press enter and now I'm in user exec

play06:39

mode and then I'll type the command

play06:41

enable and I'm asked for another

play06:43

password to reach privilege exec mode

play06:46

I'll type in class and now I have full

play06:49

access to the switch

Rate This

5.0 / 5 (0 votes)

الوسوم ذات الصلة
Network SecurityDevice AccessPassword ProtectionConsole AccessCisco SwitchConfigurationPrivilege Exec ModeEncryptionLogin BannerTerminal Setup
هل تحتاج إلى تلخيص باللغة الإنجليزية؟