Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Cisco Switching Black Book - Sean Odom, Hanson Nottingham.pdf
Скачиваний:
87
Добавлен:
24.05.2014
Размер:
2.89 Mб
Скачать

Configuring a Telnet Session Time−Out Value

To lower the chances for vulnerability when an administrator walks away from a logged−in Telnet session, you can configure and apply a time−out condition to unused VTY sessions. Here’s how:

HSNRSM (config)# line vty 0 4

HSNRSM (config−line)# exec−timeout 5 0

We just set the timeout value to five minutes and zero seconds.

Related solution:

Found on page:

Configuring Telnet

67

Implementing Privilege Levels on a 1900EN

To assign a user a privilege level and a defined set of commands you first need to select a user and associate that user with a privilege level. To do this, use the following command in Global Configuration mode:

1900EN(config)# privilege configure level 3 password

You should assign a password for each configured privilege level. To assign the password brad1 to privilege level 3, use the following command:

1900EN (config)# enable secret level 3 brad1

When Brad wants to log in to the switch, he will use the following command:

1900EN (config)# username blarson password brad1

This setup allows the user blarson to use certain show commands by default, but gives him no access to the debug or configuration commands.

To allow the user to use all the debug commands in privilege level 3, use the following command:

1900EN (config)# privilege exec level 3 debug

To allow users with a privilege level 3 to use only a certain command syntax for debug, such as debug ip, use the following command:

1900EN (config)# privilege exec level 3 debug ip

Note Privilege level 0 includes five commands associated with the privilege level: disable, enable, exit, help, and logout.

Configuring Line Console Time−Out Values

To configure a time−out value, use the following command. The time−out value is being set to five minutes, measured in seconds:

hsn(config)# line console hsn(config)# time−out 300

Tip You can use the lock command to lock an unused Telnet session. After you issue the lock command, the system will ask you to enter and verify an unlocking password.

To configure a Set/Clear command−based switch with a time−out value of five minutes, use the following command:

hsn# set logout 5

267

To configure the time−out value to five minutes on the console port of an IOS−based route processor or router, use the following command:

HSNRSM (config)# line console 0

HSNRSM (config−line)# exec−timeout 5

To configure the time−out value to five minutes on the VTY port of an IOS−based route processor or router, use the following command:

HSNRSM (config)# line vty 0 4

HSNRSM (config−line)# exec−timeout 5

Tip To configure seconds beyond a round number of minutes, you can add an additional value to the command. For example, if you want the exec−timeout to be 5 minutes and 10 seconds, the command is exec−timeout 5 10.

Configuring Banner Messages

To configure a Message Of The Day (MOTD) banner on a Set/Clear command−based switch, use the following command from a Privileged mode prompt:

CAT5K(enable) set banner motd ÔWe Prosecute Unauthorized Access!’

To configure a MOTD banner on a Cisco IOS command−based switch or route processor, use the following command from a Global Configuration mode prompt:

1912EN(config)# banner login ÔWe Prosecute Unauthorized Access!’

Enabling HTTP Access

Starting with the release of version 11.0(6) of the Cisco IOS, Cisco included HTTP server software, which allows you manage the Cisco IOS from a Web browser. This software makes managing your switches easier—but opens one giant security hole.

By default, access through HTTP is disabled. To enable access through HTTP, use the following command:

CAT5KRSM(config)# ip http server

An access list can be configured to allow you to choose the IP address of the network device that can be used to access the switch. For example, use the following command to allow a PC with the IP address 15.47.112.10 for access list 2:

CAT5KRSM(config)# access−list 2 permit 15.47.112.10

Suppose this is the only statement in the access list. Because of the implied “deny all,” once this access list is applied, only a PC with IP address 15.47.112.10 will be able to manage the switch. Before this filter will work, however, you must still apply the access list, state the authentication type, and configure the username and password. To apply the access list, use the following command:

CAT5KRSM(config)# ip http access−class 2

You can apply four types of authentication to HTTP access on a switch or router. Table 13.4 describes each of the four types of authentication.

Table 13.4: The four HTTP authentication types for a switch route processor or router.

268

Syntax

Description

aaa

Allows authentication, authorization, and accounting (AAA) to be used for

 

authentication

enable

Allows the enable password method; the default method of HTTP server user

 

authentication

local

Allows the local user database on the Cisco router, route processor, or access

 

server to be used for authentication

tacacs

Allows the Terminal Area Security Access Control (TACACS) or Extended

 

TACACS (XTACACS) server to be used for authentication

To apply the authentication type, use the following command:

CAT5KRSM(config)# ip http authentication local

Note To disable the configured authentication type, use the no ip authentication command. To configure the username hsn with the password team, use the following command:

CAT5KRSM(config)# username hsn password team

You can provide an additional layer of protection when using Cisco’s IOS ClickStart software or the Cisco Web browser interface. To do so, change the default TCP access port 80 to port 50, or any port you plan to use. To set the TCP port to 50, use the following command:

CAT5KRSM(config)# ip http port 50

You can reset the HTTP TCP port to its default by using the following command:

CAT5KRSM(config)# no ip http 50

Enabling Port Security

To enable dynamic port security on a Set/Clear command−based switch for module 3 port 3, use the following command:

CAT5K>(enable) set port security 3/3 enable

Port 3/3 port security enabled with the learned mac address.

Trunking disabled for Port 3/3 due to Security Mode

To show a port configuration for port security, use the following show command:

CAT5K> (enable) show port 3/3

The output should look similar to this:

Port Name

Status

Vlan Level Duplex Speed Type

—————————————— ————————— ———— —————— —————— ————— ———————

3/3

connected 2

normal half

100 100BaseTX

Port Security

Secure−Src−Addr

Last−Src−Addr

Shutdown

Trap IfIndex

———— ————————

————————————————

——————————————— ————————

———— ——————

3/3 enabled

00−15−20−4c−78−a1

00−15−20−4c−78−a1

 

Port Broadcast−Limit Broadcast−Drop

—————————————————— ——————————————

3/3

 

0

 

Port Align−Err

FCS−Err

Xmit−Err

Rcv−Err

UnderSize

269

———— —————————— ——————————

——————————

——————————

————————

 

3/3

0

0

0

 

0

 

0

 

Port Single−Col Multi−Coll

Late−Coll Excess−Col

Carri−Sen

Runts Giants

———— —————————— ——————————

———————— ——————————

————————

————

——————

3/3

0

0

0

0

 

0

0

0

Last−Time−Cleared

——————————————————————————

Fri Dec 22 2000, 19:53:38

To enable static port security for module 1 port 3, manually specify the secure MAC address of the attached interface 00−15−20−4c−78−a1 using the following command:

CAT5K> (enable) set port security 3/1 enable 00−15−20−4c−78−a1 Port 3/1 port security enabled with 00−15−20−4c−78−a1

as the secure mac address CAT5K> (enable)

On a Cisco IOS command−based switch, you can use the port secure interface configuration command to enable addressing security. In Interface Configuration mode, to assign a port to allow only one MAC address, use the following command:

2924XL(config−if)# port secure max−mac−count 1

Tip You can assign max−mac−count a value between 1 and 132.

Displaying the MAC Address Table

Use the show mac−address−table command from Privileged EXEC Mode to display the MAC address table. Here is the command and syntax placement—Table 13.5 contains a description of each syntax element:

Table 13.5: The show mac−address−table command’s optional syntax descriptions.

Syntax

Description

static

Displays the static addresses

dynamic

Displays the dynamic addresses

secure

Displays the secure addresses

self

Displays addresses added by the switch itself

aging−time

Displays aging−time for dynamic addresses for all VLANs

count

Displays a count for different kinds of MAC addresses

address

Displays information for a specific MAC address

hw−addr

Displays information for the given MAC address

interface

Displays addresses for the specific port

atm

Adds dynamic addresses to an ATM module slot/port

slot

Associates the dynamic address with a slot (1 or 2) port

port

Adds dynamic addresses to a port (the port number is always 0 for ATM

 

interfaces)

vlan

Displays addresses for a specified VLAN

vlan−id

Displays addresses for the VLAN

show mac−address−table [static|dynamic|secure|self| aging−time|count]

[address hw−addr] [interface interface] [atm slot/port][vlan vlan−id]

The output from the show mac−address−table command should look like the following:

270

Dynamic Addresses Count:

5

Secure Addresses (User−defined) Count: 0

Static Addresses (User−defined) Count: 0

System Self Addresses Count:

12

Total MAC addresses:

8

Non−static Address Table:

 

 

 

Destination Address Address Type VLAN

Destination Port

—————————

——————

——

——————————

00−15−20−5c−80−a1

Dynamic

 

3

FastEthernet0/6

00−15−20−5c−80−a1

Dynamic

 

1

FastEthernet0/4

00−15−20−5c−80−b4

Dynamic

 

1

FastEthernet0/4

00−15−20−5c−80−12

Dynamic

 

3

FastEthernet0/6

00−15−20−5c−80−c5

Dynamic

 

3

FastEthernet0/6

Tip You can use the no port secure command to disable addressing security or to set the maximum number of addresses allowed on the interface to the default value of 132.

271

Соседние файлы в предмете Программирование