Vous êtes sur la page 1sur 10

RESUMEN COMANDOS CCNA SECURITY

COMANDOS CAPITULO Nº2 CCNA SECURITY

********CONFIGURACION MD5 AUTENTIFICACION MD5********


1-Configurar OSPF autenticación MD5 para todos los routers en el área 0 .

R1(config)# router ospf 1


R1(config-router)# area 0 authentication message-digest
R1(config)# interface s0/0/0
R1(config-if)# ip ospf message-digest-key 1 md5 MD5pa55--(CONTRASEÑA)

2- Configurar NTP
R1(config)# ntp server 192.168.0.1
R1(config)# ntp authenticate
R1(config)# ntp trusted-key 1
R1(config)# ntp authentication-key 1 md5 NTPpa55--(PASSWOORD)

3- Configurar routers para registrar los mensajes en el servidor de Syslog

4-configurar para admitir conexiones SSH


R3(config)# username SSHadmin privilege 15 secret ciscosshpa55
R3(config)# ip domai-name ccnasecurity.com
R3(config)# crypto key generate rsa

R3(config)# ip domain-name ccnasecurity.co

COMANDOS CAPITULO Nº3 CCNA SECURITY

1- activacion de aaa
R1(CONFIG)# aaa new-model
R1(CONFIG)# aaa authentication login defaul local---metodo local
R1(CONFIG)# line console 0
R1(CONFIG-line)# login authentication default

2-crear listas locales para vty


R1(CONFIG)# aaa authentication login TELNET-LOGIN local
R1(CONFIG)# line vty 0 4
R1(CONFIG)# login authentication TELNET-LOGIN

3- CONFIGURACION BASADA EN TACAS+


R2(config)#username Admin2 privilege 15 secret admin2pa55
en tacas se agrega el username y la password****1812
***1 se configura el server tacas luego agregas al rt****
R2(config)#tacascs-server host 192.168.2.2--ip sever
R2(config)#tacacs-server key tacacspa55----key del server
R2(config)#aaa-new model
R2(config)#aaa authentication login default group tacacs+---creacion de un grupo default

4- metodo authentificaion aaa para consola


R2(CONFIG)# line console 0
R2(CONFIG-line)# login authentication default

5- configuracion radius server port 1645


client name = nombre rt
client ip= ip del gateway
server type= radius
secret = key de mi server

username = nombre username


passwor= contraseña dde mi username

R3(CONFIG)#username Admin3 secret admin3pa55


R3(CONFIG)#radius-server host 192.168.3.2---ip del radius
R3(CONFIG)#radius-server key radiuspa55

6- console radius authenticacion

R1(CONFIG)# aaa new-model


R1(CONFIG)# aaa authentication login defaul group radius local
R1(CONFIG)# line console 0
R1(CONFIG)# login authentication default

COMANDOS CAPITULO Nº4 CCNA SECURITY

1- CREAR ZONAS
R3(config)# license boot module c1900 technology-package securityk9
R3(config)# zone security IN-ZONE---(ZONA INTERNA)
R3(config-sec-zone) exit
R3(config-sec-zone)# zone security OUT-ZONE
R3(config-sec-zone)# exit
-------------------------------------------------------------------
2- Identificar tráfico utilizando una Clase - Mapa
R3(config)# access-list 101 permit ip 192.168.3.0 0.0.0.255 any--- ACCESLIST DE MI LAN
R3(config)# class-map type inspect match-all IN-NET-CLASS-MAP(NOMBRE DEL CALLMAP)
R3(config-cmap)# match access-group 101---> MISMO NUMERO DE MI ACL
R3(config-cmap)# exit

-----------------------------------------------------------------------------
3-Crear un mapa de la política para determinar qué hacer con el tráfico coincidente.
R3(config)# policy-map type inspect IN-2-OUT-PMAP(NOMBRE DE LA POLICY)

-------------------------------------------------------------------------------
4- Especificar un tipo de clase de inspeccionar y asignación de clase de referencia EN -NET - CLASE
-MAP
R3(config-pmap)# class type inspect IN-NET-CLASS-MAP(nombre del calss map)
R3(config-pmap-c)# inspect
R3(config-pmap-c)# exit
R3(config-pmap)# exit

-----------------------------------------------------------------------------------
5-Aplicar políticas de cortafuegos
R3(config)# zone-pair security IN-2-OUT-ZPAIR(nombre zona pariedad) source IN-ZONE destination
OUT-ZONE
R3(config-sec-zone-pair)# service-policy type inspect IN-2-OUT-PMAP--(nombre de la ploicy)
R3(config-sec-zone-pair)# exit
R3(config)#

------------------------------------------------------------------------------------
6-Asignar interfaces a las zonas de seguridad apropiadas .
R3(config)# interface g0/1
R3(config-if)# zone-member security IN-ZONE----el hacia mi lan
R3(config-if)# exit
R3(config)# interface s0/0/1
R3(config-if)# zone-member security OUT-ZONE---el hacia internet
R3(config-if)# exit

COMANDO CAPITULO Nº5 CCNA SECURITY

****** RT BASICO ********


DESACTIVAR LOS DNS LOOKUP
RT(CONFIG)# no ip domain-lookup
RT(CONFIG)# secuity password min-length 10
RT(CONFIG)# ip domain-name ccnasecurity.com
RT(CONFIG)# username admin1 algorithm-typ scrypt secret cisco12345
---------------------------------------------------------------

****** configurtacion de la encriptacion claves ra****


RT(CONFIG)# crypto key generate rsa
--------------------------------------------------------

***** CONFIGURACION DE LAS LINEAS DE CONSOLA Y VTY********


RT(CONFIG)#line console 0
RT(CONFIG-line)#login local
RT(CONFIG-line)# exec-timeout 5 0
RT(CONFIG-line)# logging synchronous

RT(CONFIG)#line vty 0 4
RT(CONFIG-line)# login local
RT(CONFIG-line)# transpot input ssh
RT(CONFIG-line)# exec-timeout 5 0

RT(CONFIG)#line aux 0
RT(CONFIG-line)# login local
RT(CONFIG-line)# exec-timeout 5 0

********OTRAS CONFIGURACIONES ***********

R1(config)# enable algorithm-type scrypt secret class12345

-------------------------------------------------------------
R1(config)# license boot module c1900 technology-package securityk9
1941
*****CONFIGURACION DE IPS******
1- CREAR EL DIRECTORIO
R1# mkdir ipsdir

2- CONFIGURAR EL IPS CRYPTO KEY


crypto key pubkey-chain rsa
.
R1(config)#
R1(config)# crypto key pubkey-chain rsa
R1(config-pubkey-chain)# named-key realm-cisco.pub signature
R1(config-pubkey-key)# key-string

**** creacion de la reglas ips******


R1(config)# ip ips name iosips
R1(config)# ip ips name ips list ?
R1(config)# ip ips config location flash:ipsdir

**** activacion de las notidicaciones hhtp*******


R1(config)#ip http server
R1(config)#ip ips notify sdee

**** notificaciones a un syslog*******

R1(config)# ip ips notify log


R1#clock set 01:20:00 8 march 2015
R1(config)# service timestamps log datetime msec
R1(config)# logging 192.168.1.3

***** configuracion de las signatures ips*******


R1(config)# ip ips signature-category
R1(config-ips-category)# category all
R1(config-ips-category-action)# retired true
R1(config-ips-category-action)# exit
R1(config-ips-category)# category ios_ips basic
R1(config-ips-category-action)# retired false
R1(config-ips-category-action)# exit
R1(config-ips-category)# exit

**** aplicando las reglas alas intefaces


R1(config)# interface g0/1
R1(config-if)#ip ips iosips in

COMANDOS CAPITULO Nº6 CCNA SECURITY

1-CONFIGURACION BASICA
S1(config)#line console 0
S1(config-line)#password ciscoconpass
S1(config-line)#exec-timeout 5 0
S1(config-line)#login
S1(config-line)#logging synchronous
S1(config)#ip domain-name ccnasecurity.com
S1(config)#username admin privilege 15 algorithm-type scrypt secret cisco12345
S1(config)#crypto key generate rsa general-keys modulus 1024
S1(config)#ip ssh time-out 90
S1(config)#ip ssh authentication-retries 2

S1(config)#line vty 0 4
S1(config-line)#privilege level 15
S1(config-line)#exec-timeout 5 0
S1(config-line)#login local
S1(config-line)#transport input ssh
S1(config-line)# exit
S1(config)#enable algorithm-type scrypt secret cisco12345

----------------------------------------------------------------------------------
2-*********SEGURIDAD DE PUERTO DEL SW*******
-------------------------------------------------------------------------------------
S1(config)#inte f0/1
S1(config-if)# switchport port-security
S1(config-if)# switchport mode acces
S1(config-if)# switchport port-security
S1(config-if)#end
s1# show port-security inte f0/1

--------------------------------------------------------------------------------------
3-*******CONFIGURACIONES MAC****************
-----------------------------------------------------------------------------------
NUMERO MAXIMO MAC POR PUERTOS
s1(config-if)#switchport port-security maximum
---------------------------------------------------------------------------------------

APRENDIDO MAC DINAMICAMENTE


s1(config-if) switchport port-security mac-address sticky
-------------------------------------------------------------------------------------

CONFIGURAR MANUALMENTE UNA MAC A UNA INTERFAZ


s1(config-if) switchport port-security mac-address xxxx xxxx xxxx (vlan|acces|voice)

ACTIVAR FUNCION DE NOTIFICACION DIRECCIONES MAC DE UN SWITCH


s1(config)# mac address-table notification

-------------------------------------------------------------------------------------------
4-*********** VIOLACIONES DE PUERTOS **********************
s1(config-if) switchport port-security violation(protect|restric|shutdown|shutdown vlan|)
---------------------------------------------------------------------------------------------
CONFIGURACION EN CONECCION TELEFONOS IP

s1(config) # intet f0/1


s1(config-if)# switchport mode acces
s1(config-if)# switchport port-security
s1(config-if)# switchport port-security maximum 3 ------ maximo de direeciones mac para ese
puerto
s1(config-if)# switchport port-security violation shutdown
s1(config-if)# switchort port-security aging time 120

---------------------------------------------------------------------------
5-********* CONFIGURACIONES TRUNK Y DHCP*******************
--------------------------------------------------------------------------
SEGURIDAD ESTABLECER LOS TRUNK EN MODO DE NO NEGOCIACION
Y CAMBIAR VLAN NATIVA en los puertos trunk
s1(config-if)# SWITCHPORT NONEGOTIATE
s1(config-if)# SWITCHPORT TRUNK NATIVE VLAN 999
-----------------------------------------------------
CONFIGURACION DE PUERTOS PROTEGIDOS LOS PUERTOS PROTEGISDOS NO
ENVIAN TRAFICO UNICASTE,BRODCAST,NI MULTICASTE A OTRO PUERTO PROTEGIDO

S1(CONFIG-IF)#switchport protected
--------------------------------------------------
PUERTOS TRUSTED Y UNTRUDTED QUE SON DE CONFIANZA PAARA EL DHCP SOLO SON DE
CONFIANZA DEL SW AL RT Y DE SW A SW NO DE SW A USER

S1(CONFIG)# ip dhcp snooping---- activamos proteccion dhcp


S1(CONFIG)# int f0/1
S1(CONFIG-if)# ip dhcp snooping trusted
S1(CONFIG-if)# exit
S1(CONFIG)#
S1(CONFIG)# inter range f0/5-24
S1(CONFIG-if-range)# ip dhcp snooping ñimit rate 6 ------------ se limitan las demas
S1(CONFIG)# ip dhcp snooping vlan 5,10.50,2----- permido solo aas vlan q hay
----------------------------------------------------------------------------------

configurar snooping global


s1(config) ip dhcp snooping
s1(config) ip dhcp snooping vlan 10----- dhcp snooping para una vlan
s1 (config) ip arp inpection vlan 10 ----- inpeccion dinamica arp
s1(config) int f/024
s1(config-if) ip dhcp snooping trut----puerto del sw al rt
s1(config-if) ip arp inpection trust ------ pueerto del sw al rt
s1(config int range f0/1-5
s1(config-range-if) ip verify source ----------configuramos el ip sourse guard

-------------------------------------------------------------------------------
6-****** ASIGNACION DE ROOT BRIGDGE***************
----------------------------------------------------------------------
asiganbacion de un root
spanning-tree vlan 1 root primary
spanning-tree vlan 1 root secondary
spanning-tree portfast----- patra que las conecciones se mas rapida de sw apcs en las interfaces
spannig-tree bpduguad enable ------ activar bpdu guar en puerto pc coonectados al sw

COMANDOS CAPITULO Nº8 CCNA SECURITY

***** configuracion de policy ik creacion*****


r1(config)# crypto isakmp policy 1
r1(config-isakmp)# hash sha ---- definicion de intefridad
r1(config-isakmp)# authentication pre-share
r1(config-isakmp)# group 24
r1(config-isakmp)# life time 3600
r1(config-isakmp)# encryption aes 3600
r1(config-isakmp)# end

********* COMANDOS SHOW ************

r1#show crypto isakmp policy ----- ver las politicas creadas


r1# show crypto isakmp sa ------------ ver si el tunnel esta creado

2******** CONFIGURACION DE CLAVE COMPARTIDA en ambos********


r1(config)# crypto isakmp key cisco12345 address 172.30.3.2------la del rt del otro lado

3****** CREANDO TUNNEL TRAFICO INTERESANTE ********

r1(config)# acces-list 101 permit ip 10.0.1.0 0.0.0.255 (mi lan interna)192.168.1.0 0.0.0.255 (lan del
otro lado)-------en ambos lados
r2(config)# acces-list 102 permit ip 192.168.1.0 0.0.0.255 (mi lan interna)10.0.1.0 0.0.0.255

4****** CONFIGURACION DE TRANFORMACION AMBOS LOS MISMOS*******

r1(config)# crypto ipsec tranform-set R1-R2 esp-aes esp-sha-hmac


r2(config)# crypto ipsec tranform-set R1-R2 esp-aes esp-sha-hmac

5***** configurar un mapa crypto ambos lo mismo *******

r1(config)# crypto map R1-R2_MAP 10 ipsec-isakmp


r1(config-crypto-map)# match address 101
r1(config-crypto-map)# set tranform-set R1-R2
r1(config-crypto-map)# set peer 172.30.2.2 (ip del otro router)
r1(config-crypto-map)# set pfs group24
r1(config-crypto-map)# set security-association lifetime seconds 900

r2(config)# crypto map R1-R2_MAP 10 ipsec-isakmp


r2(config-crypto-map)# match address 102
r2(config-crypto-map)# set tranform-set R1-R2
r2(config-crypto-map)# set peer 172.30.2.1 (ip del otro router)
r2(config-crypto-map)# set pfs group24
r2(config-crypto-map)# set security-association lifetime seconds 900

****** APLICAR LAS CRYPTO MAPS *******

R1(CONFIG)#interface s0/0/0-----(MI SERIAL HACIA EL RT)


R1(CONFIG-IF)# crypto map R1-R2_MAP
CAPITULO Nº9 CCNA SECURITY

Configure a logical VLAN 1 interface for the inside network (192.168.1.0/24) and set the security
level to the highest setting of 100.

CCNAS-ASA(config)# interface vlan 1


CCNAS-ASA(config-if)# nameif inside
CCNAS-ASA(config-if)# ip address 192.168.1.1 255.255.255.0---lan interior no tomar los dmz
CCNAS-ASA(config-if)# security-level 100

CCNAS-ASA(config-if)# interface vlan 2


CCNAS-ASA(config-if)# nameif outside
CCNAS-ASA(config-if)# ip address 209.165.200.226 255.255.255.248---conectada del asa asia
afuera
CCNAS-ASA(config-if)# security-level 0

a. Crear una ruta por defecto " quad cero " mediante el comando de la ruta , asociarlo con la
interfaz fuera de ASA , y señalan la / 0 dirección IP R1 G0 ( 209.165.200.225 ) como el gateway de
último recurs

CCNAS-ASA(config)# route outside 0.0.0.0 0.0.0.0 209.165.200.225---ip de la red exterior para


conectarse

a. Crear objeto de red en el interior - red y asignar atributos a él utilizando la subred y los
comandos nat .

CCNAS-ASA(config)# object network inside-net


CCNAS-ASA(config-network-object)# subnet 192.168.1.0 255.255.255.0--- porcion de mi red
interna
CCNAS-ASA(config-network-object)# nat (inside,outside) dynamic interface
CCNAS-ASA(config-network-object)# end

a. Crear la clase - mapa, política-mapa , y la política-servicio . Añadir la inspección de tráfico ICMP


a la lista de asignación de política mediante los siguientes comandos :
CCNAS-ASA(config)# class-map inspection_default
CCNAS-ASA(config-cmap)# match default-inspection-traffic
CCNAS-ASA(config-cmap)# exit
CCNAS-ASA(config)# policy-map global_policy
CCNAS-ASA(config-pmap)# class inspection_default
CCNAS-ASA(config-pmap-c)# inspect icmp
CCNAS-ASA(config-pmap-c)# exit
CCNAS-ASA(config)# service-policy global_policy global

Part 4: Configure DHCP, AAA, and SSH


CCNAS-ASA(config)# dhcpd address 192.168.1.5-192.168.1.36 inside
CCNAS-ASA(config)# dhcpd dns 209.165.201.2 interface inside
CCNAS-ASA(config)# dhcpd enable inside

Paso 2: Configurar AAA a utilizar la base de datos local para la autenticación .


CCNAS-ASA(config)# username admin password adminpa55
CCNAS-ASA(config)# aaa authentication ssh console LOCAL

Step 3: Configure remote access to the ASA.

CCNAS-ASA(config)# crypto key generate rsa modulus 1024


CCNAS-ASA(config)# ssh 192.168.1.0 255.255.255.0 inside
CCNAS-ASA(config)# ssh 172.16.3.3 255.255.255.255 outside--- red afuera
CCNAS-ASA(config)# ssh timeout 10

Part 5: Configure a DMZ, Static NAT, and ACLs


a. Configurar DMZ VLAN 3, que es donde el servidor web de acceso público residirá . Le asignará la
dirección IP 192.168.2.1/24 , el nombre de DMZ , y asignarle un nivel de seguridad de los 70.
Debido a que el servidor no necesita iniciar la comunicación con los usuarios en el interior , para
desactivar el reenvío de la interfaz VLAN 1 .
CCNAS-ASA(config)# interface vlan 3
CCNAS-ASA(config-if)# ip address 192.168.2.1 255.255.255.0
CCNAS-ASA(config-if)# no forward interface vlan 1
CCNAS-ASA(config-if)# nameif dmz
INFO: Security level for "dmz" set to 0 by default.
CCNAS-ASA(config-if)# security-level 70

CCNAS-ASA(config-if)# interface Ethernet0/2


CCNAS-ASA(config-if)# switchport access vlan 3

CCNAS-ASA(config)# object network dmz-server


CCNAS-ASA(config-network-object)# host 192.168.2.3---- ip del dmz
CCNAS-ASA(config-network-object)# nat (dmz,outside) static 209.165.200.227--se le asigna una ip
del asa
CCNAS-ASA(config-network-object)# exit

CCNAS-ASA(config)# access-list OUTSIDE-DMZ permit icmp any host 192.168.2.3 --- se permite
dmz
CCNAS-ASA(config)# access-list OUTSIDE-DMZ permit tcp any host 192.168.2.3 eq 80
CCNAS-ASA(config)# access-group OUTSIDE-DMZ in interface outside

Vous aimerez peut-être aussi