Iewb-Sc-Vol2 ALLSOLUTIONS v5 02
Iewb-Sc-Vol2 ALLSOLUTIONS v5 02
Iewb-Sc-Vol2 ALLSOLUTIONS v5 02
Copyright Information
Copyright © 2003 - 2011 Internetwork Expert, Inc. All rights reserved.
The following publication, Internetwork Expert’s CCIE Security Lab Workbook Volume II,
was developed by Internetwork Expert, Inc. All rights reserved. No part of this publication may
be reproduced or distributed in any form or by any means without the prior written permission
of Internetwork Expert, Inc.
Cisco®, Cisco® Systems, CCIE, and Cisco Certified Internetwork Expert, are registered
trademarks of Cisco® Systems, Inc. and/or its affiliates in the U.S. and certain countries.
All other products and company names are the trademarks, registered trademarks, and
service marks of the respective owners. Throughout this manual, Internetwork Expert,
Inc. has used its best efforts to distinguish proprietary trademarks from descriptive
names by following the capitalization styles used by the manufacturer.
Disclaimer
The following publication, Internetwork Expert’s CCIE Security Lab Workbook Volume II,
is designed to assist candidates in the preparation for Cisco Systems’ CCIE Security Lab
exam. While every effort has been made to ensure that all material is as complete and
accurate as possible, the enclosed material is presented on an “as is” basis. Neither the
authors nor Internetwork Expert, Inc. assume any liability or responsibility to any person or
entity with respect to loss or damages incurred from the information contained in this
workbook.
This workbook was developed by Internetwork Expert, Inc. and is an original work of the
aforementioned authors. Any similarities between material presented in this workbook
TM
and actual CCIE lab material is completely coincidental.
Table of Contents
IEWB-SC-VOL2 Lab 1 Solutions...................................................... 7
IEWB-SC-VOL2 Lab 2 Solutions.................................................. 131
IEWB-SC-VOL2 Lab 3 Solutions.................................................. 215
IEWB-SC-VOL2 Lab 4 Solutions.................................................. 297
IEWB-SC-VOL2 Lab 5 Solutions.................................................. 403
IEWB-SC-VOL2 Lab 6 Solutions.................................................. 515
IEWB-SC-VOL2 Lab 7 Solutions.................................................. 667
IEWB-SC-VOL2 Lab 8 Solutions.................................................. 755
IEWB-SC-VOL2 Lab 9 Solutions.................................................. 861
IEWB-SC-VOL2 Lab 10 Solutions................................................ 951
!
! Create an SLA monitor object to ping R5
!
sla monitor 1
type echo protocol ipIcmpEcho 183.4.125.5 interface outside
timeout 1000
frequency 1
!
! Start monitoring
!
sla monitor schedule 1 start-time now life forever
!
! Track the SLA object
!
track 1 rtr 1 reachability
!
! Create a default route tracking the SLA object
!
route outside 0 0 183.4.125.5 track 1
The next step is creating a tacking object that reflects the SLA monitor status.
The final step is configuring a static route bound to the tacking object and
configuring the routing process to advertise a default route.
Verify the SLA object operational state and track object status. After this, ensure
that the default route is in the routing tables of the ASA and SW2.
Now shutdown R5’s VLAN125 interface and check that the ASA detects this
event. Since the default route is no longer in the routing table, it is not advertised
via OSPF.
ASA1:
!
! Enable physical failover link
!
interface ethernet 0/2
no shutdown
!
! Configure standby IP addresses
!
interface Ethernet 0/0
ip address 183.4.125.12 255.255.255.0 standby 183.4.125.13
!
interface Ethernet 0/1
ip address 192.10.4.12 255.255.255.0 standby 192.10.4.13
!
! Designate unit as primary and name failover interface
!
failover lan unit primary
failover lan interface failover Ethernet0/2
!
! Enable stateful faiolver on the same link
!
failover link failover Ethernet0/2
!
! Configure failover addressing
!
failover interface ip failover 10.10.10.12 255.255.255.0 standby
10.10.10.13
!
! Set interface polling timers to minimum
!
failover polltime interface msec 500 holdtime 5
!
! Disable the inside interface monitoring
!
no monitor-interface inside
!
! Enable failover
!
failover
ASA2:
interface ethernet 0/2
no shutdown
!
failover lan interface failover Ethernet0/2
!
failover link failover Ethernet0/2
!
failover interface ip failover 10.10.10.12 255.255.255.0 stan
10.10.10.13
!
failover
By default all interfaces on the unit are monitored. This means we need to
explicitly disable inside interface monitoring to satisfy the scenario requirements.
Additonally, the requirement to respond to an interface failure in the shortest
amount of time translates into using shortest polling timers for the interfaces.
Notice that this does not affect the failover link polling – detecting failover link
issues is separate from detecting the physical interface failures.
After this, ensure that only the outside interface is monitored by the firewall.
Now simulate an interface failure by shutting down the switch port connected to
the primary unit’s outside interface. Check the failover status again.
Rack4SW2#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Rack4SW2(config)#interface fastEthernet 0/12
Rack4SW2(config-if)#shutdown
Rack4SW2(config-if)#
Confirm that you may still reach R5 from SW2, even with the primary firewall
failed.
Rack4SW2#telnet 183.4.125.5
Trying 183.4.125.5 ... Open
Password: cisco
Rack4R5>
!
! L3/L4 class-map for UDP traffic
!
class-map UDP_TRAFFIC
match access-list UDP
!
! L3/L4 class-map for TCP traffic
!
class-map TCP_TRAFFIC
match access-list TCP
!
! TCP Inspection Map to permit TCP Option 19 (MD5 Auth)
!
tcp-map OPTION19
tcp-options range 19 19 allow
!
! Apply connection limit & inspection policy
!
policy-map global_policy
!
class TCP_TRAFFIC
set connection conn-max 5000 per-client-max 1000
set connection advanced-options OPTION19
class UDP_TRAFFIC
set connection conn-max 1000 per-client-max 500
!
! By inspecting ICMP we permit the returning packets
!
class inspection_default
inspect icmp
For adjusting TCP/UDP session parameters we first need MPF classes matching
the respective protocols. We use access-list for matching TCP and UDP packets
and then create the respective class-maps. The last step is configuring the
classes under a policy-map. Since we do not have any specific policy-maps
applied anywhere, we use the default “global_policy” and assign our custom
classes there.
Global policy:
Service-policy: global_policy
Class-map: inspection_default
Inspect: dns migrated_dns_map_1, packet 0, drop 0, reset-drop 0
Inspect: ftp, packet 0, drop 0, reset-drop 0
Inspect: h323 h225 _default_h323_map, packet 0, drop 0, reset-drop 0
Inspect: h323 ras _default_h323_map, packet 0, drop 0, reset-drop 0
Inspect: rsh, packet 0, drop 0, reset-drop 0
Inspect: rtsp, packet 0, drop 0, reset-drop 0
Inspect: esmtp _default_esmtp_map, packet 0, drop 0, reset-drop 0
Inspect: sqlnet, packet 0, drop 0, reset-drop 0
Inspect: skinny, packet 0, drop 0, reset-drop 0
Inspect: sunrpc, packet 0, drop 0, reset-drop 0
Inspect: xdmcp, packet 0, drop 0, reset-drop 0
Inspect: sip, packet 0, drop 0, reset-drop 0
Inspect: netbios, packet 0, drop 0, reset-drop 0
Inspect: tftp, packet 0, drop 0, reset-drop 0
Class-map: TCP_TRAFFIC
Set connection policy: conn-max 5000 per-client-max 1000
current conns 0, drop 0
Set connection advanced-options: OPTION19
Retransmission drops: 0 TCP checksum drops : 0
Exceeded MSS drops : 0 SYN with data drops: 0
Out-of-order packets: 0 No buffer drops : 0
Reserved bit cleared: 0 Reserved bit drops : 0
IP TTL modified : 0 Urgent flag cleared: 0
Window varied resets: 0
TCP-options:
Selective ACK cleared: 0 Timestamp cleared : 0
Window scale cleared : 0
Other options cleared: 0
Other options drops: 0
Class-map: UDP_TRAFFIC
Set connection policy: conn-max 1000 per-client-max 500
current conns 0, drop 0
!
! Access-list to permit inbound UDP traffic (traceroute ports)
! and ICMP echo messages (pings)
!
access-list OUTSIDE_IN extended permit udp any any range 33434 33524
access-list OUTSIDE_IN extended permit icmp any any echo
!
! Apply the access-list
!
access-group OUTSIDE_IN in interface outside
!
! Access-list to classify ICMP traffic
!
access-list ICMP extended permit icmp any any
!
! L3/L4 class-map for ICMP traffic
!
class-map ICMP_TRAFFIC
match access-list ICMP
!
! Policy-map to rate-limit ICMP traffic
!
policy-map OUTSIDE
class ICMP_TRAFFIC
police input 56000
police output 56000
!
! Apply the service policy
!
service-policy OUTSIDE interface outside
From the above description we may conclude the following: In order to permit
inbound traceroute we need to allow the UDP port range starting at 33434 and
up till the maximum port number that a traceroute can use. The default hop count
that the UNIX traceroute will use by default is 30, so we need to open the ports
up to 33524. Next, since the task requires hiding the identity of the hosts inside
the firewall, we configure the firewall to inspect the ICMP error messages, such
as ICMP unreachables. By default those do not have their addresses translated
to easy troubleshooting across the firewall, but enabling ICMP inspection for
error messages using the command icmp inspect error will enable
translations.
The next requiremet is permitting the ping operations inbound on the outside
interface: this is accomplished by permitting inbound ICMP echo messages – the
echo-replies from the inside are permitted automatically by the virtue of security-
levels. And the final requirement is limiting the ICMP traffic rate on the outside
interface: this requires an interface-level policy map, since applying policing
globally would affect all interfaces. We create a class-map matching ICMP traffic
and apply a policy-map with policing statements. Since no burst values are
specified we let the firewall pick up the default values for us.
Rack4R1#traceroute 183.4.125.8
Rack4R1#ping 183.4.125.8
Verify traffic rate-limiting for ICMP packets. Notice that policing function drops
outbound packets, as the rate exceeds 56Kbps.
Interface outside:
Service-policy: OUTSIDE
Class-map: ICMP_TRAFFIC
Input police Interface outside:
cir 56000 bps, bc 1750 bytes
conformed 992 packets, 120260 bytes; actions: transmit
exceeded 0 packets, 0 bytes; actions: drop
conformed 0 bps, exceed 0 bps
Output police Interface outside:
cir 56000 bps, bc 1750 bytes
conformed 1003 packets, 121250 bytes; actions: transmit
exceeded 7 packets, 7798 bytes; actions: drop
conformed 0 bps, exceed 0 bps
Rack4ASA(config)#
!
! A single line ACL entry
!
access-list OUTSIDE_IN permit icmp any any object-group TRACERT
Rack4SW2#traceroute 150.4.1.1
!
! Permission for port redirection
!
access-list OUTSIDE_IN extended permit tcp any host 183.4.125.12 eq
telnet
Rack4R5#telnet 183.4.125.12
Trying 183.4.125.12 ... Open
+-----------------------------------------------------------------------+
| |
| Welcome to BB2. These commands are available for use at privilege 0 |
| |
| ping show ip bgp |
| telnet show ip bgp neighbors |
| traceroute show ip bgp summary |
| show ip route show ip interface brief |
| show ip protocols |
| |
| The reference configuration for this device is available at: |
| http://www.ine.com/downloads/bb2.txt |
| |
+-----------------------------------------------------------------------+
BB2>
!
! Traceroute responses ACL and Class-Map
!
ip access-list extended TRACEROUTE_RESPONSES_ACL
permit icmp any any time-exceed
permit icmp any any port-unreach
!
!
! Traffic to the inside HTTP server
!
ip access-list extended INSIDE_HTTP_SERVER_ACL
permit tcp any host 183.4.46.100 eq 80
permit tcp any host 183.4.46.100 eq 443
!
class-map type inspect match-all INSIDE_HTTP_SERVER_CMAP
match access-group name INSIDE_HTTP_SERVER_ACL
match protocol tcp
!
class-map type inspect match-any ALLOWED_TRAFFIC_CMAP
match protocol tcp
match protocol icmp
match protocol udp
!
! Policy for the inside->outside traffic
!
policy-map type inspect INSIDE_TO_OUTSIDE_PMAP
class type inspect ALLOWED_TRAFFIC_CMAP
inspect
class class-default
drop
!
! Policy for the outside->inside traffic
!
policy-map type inspect OUTSIDE_TO_INSIDE_PMAP
class type inspect INSIDE_HTTP_SERVER_CMAP
inspect
class TRACEROUTE_RESPONSES_CMAP
pass
class class-default
drop
!
! Define a zone pair and apply the policy
!
zone-pair security INSIDE_TO_OUTSIDE source INSIDE destination OUTSIDE
service-policy type inspect INSIDE_TO_OUTSIDE_PMAP
!
! Define a zone pair and apply the policy
!
zone-pair security OUTSIDE_TO_INSIDE source OUTSIDE destination INSIDE
service-policy type inspect OUTSIDE_TO_INSIDE_PMAP
!
! Assign the zones to the interfaces
!
interface Serial 0/0.123
zone-member security INSIDE
!
interface FastEthernet 0/0
zone-member security OUTSIDE
The traffic going INSIDE to OUTSIDE includes TCP, UDP and ICMP protocols –
no other specifics have been defined. The traffic in opposite direction includes
HTTP and HTTPS sessions to a pre-defined IP as well as “traceroute return
traffic” which included ICMP port-unreachcale and ICMP time-exceeded
messages.
Traffic going from INSIDE to outside could be matching using “match protocol”
statement:
However, matching the HTTP and HTTPS traffic to the internat server could be
accomplished in multiple ways. The solution matches an access-list allowing just
HTTP and HTTPs traffic to the server and then combines this match with “match
protocol tcp” which is sufficient to inspect HTTP and HTTPs sessions. This,
however, does not allows for deep session inspection in HTTP. But since we are
not required to do so, we could just stay with this configurartion:
In this situation, bot solutions work, but you should prefer the second one if deep
packet inspection has been requested. Finally, the traceroute “returning” traffic
includes two ICMP message types, and these could not be allowed by inspecting
traffic going from inside to outside. So we create an access-list matching these
messages, envelop it into a class-map and finally attach this to a policy-map, with
a pass statement – the ICMP error messages could not be inspected. Notice that
this implies that there is no corellatio among the returning ICMP error messages
and outgoing UDP probes sent by traceroute utility.
Rack4R2#traceroute 204.12.4.254
Rack4R2#ping 204.12.4.254
Rack4R2#telnet 204.12.4.254
Trying 204.12.4.254 ... Open
BB3>exit
BB3>ping 150.4.3.3
BB3>ping 150.4.1.1
Note
You can ping R1 since the traffic is classified as destined to the firewall itself
(zone self), not as transit.
interface FastEthernet0/24
ip access-group 160 in
!
! Permit BGP & ICMP response to R6
!
ip access-list extended FROM_BB
permit tcp host 54.4.7.254 eq bgp host 54.4.7.6
permit tcp host 54.4.7.254 host 54.4.7.6 eq bgp
permit icmp any any echo-reply
evaluate MIRROR
!
interface Virtual-Template 1
ip access-group FROM_BB1 in
ip access-group TO_BB1 out
!
! Reflexive ACL expiration timeout
!
ip reflexive-list timeout 120
Rack4R3#ping 54.4.7.254
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 54.4.7.254, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 20/23/28 ms
Rack4R3#telnet 54.4.7.254
Trying 54.4.7.254 ... Open
BB1>
Notice how the temporary access-list entries are created to allow the returning
traffic.
Rack4R6#show ip access-lists
...
Reflexive IP access list MIRROR
permit tcp host 54.4.7.254 eq telnet host 183.4.0.3 eq 11024 (230
matches) (time left 113)
Extended IP access list FROM_BB1
permit tcp host 54.4.7.254 eq bgp host 54.4.7.6 (3 matches)
permit tcp host 54.4.7.254 host 54.4.7.6 eq bgp
permit icmp any any echo-reply (5 matches)
evaluate MIRROR
Extended IP access list TO_BB1
permit tcp any any reflect MIRROR
permit udp any any reflect MIRROR
permit icmp any any (5 matches)
Now verify that connections initiated from BB1 are blocked by the inbound
access list on the Virtual-Access interface.
BB1>ping 183.4.0.5
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 183.4.0.5, timeout is 2 seconds:
U.U.U
Success rate is 0 percent (0/5)
BB1>telnet 183.4.0.5
Trying 183.4.0.5 ...
% Destination unreachable; gateway or host down
!
! Static route for the new network
!
ip route 10.7.7.0 255.255.255.0 Null0
!
! ‘Create’ a new network to translate the local subnet
! and advertise it into OSPF to provide connectivity
!
router ospf 1
redistribute static subnets
!
ip nat inside source static network 10.41.41.0 10.7.7.0 /24
R4:
interface Serial0/0.345
ip nat outside
!
interface Serial0/1
ip nat outside
!
interface FastEthernet0/1
ip nat inside
!
! Static route for the new network
!
ip route 10.4.4.0 255.255.255.0 Null0
!
! We ‘create’ a new network to translate the local subnet
! and advertise it into OSPF to provide connectivity
!
router ospf 1
redistribute static subnets
!
ip nat inside source static network 10.41.41.0 10.4.4.0 /24
!
! The password above is arbitrary
!
!
! Create RSA keys: configure domain-name first
!
ip domain-name ine.com
crypto key generate rsa general modulus 512
!
! Configure & authenticate the trustpoint for AAA/CA server
!
crypto ca trustpoint INE1
enrollment url http://150.4.5.5
enrollment mode ra
crl optional
!
crypto ca authenticate INE1
crypto ca enroll INE1
!
! Common ISAKMP & IPsec settings
!
crypto isakmp policy 10
encr 3des
hash md5
!
crypto ipsec transform-set AES256 ah-md5-hmac esp-aes 256
R3:
!
! Traffic to encrypt
!
ip access-list extended VLAN41_TO_VLAN4
permit ip 10.7.7.0 0.0.0.255 10.4.4.0 0.0.0.255
!
! By using the looback interface as the source for ISAKMP exchange
! and IPSec packets tunneling
! we protect the communication against local physical
! interface failure
!
crypto map VPN local-address Loopback0
crypto map VPN 10 ipsec-isakmp
set peer 150.4.4.4
set transform-set AES256
match address VLAN41_TO_VLAN4
!
interface Serial1/1.345 point-to-point
crypto map VPN
R4:
!
! Traffic to encrypt
!
ip access-list extended VLAN4_TO_VLAN41
permit ip 10.4.4.0 0.0.0.255 10.7.7.0 0.0.0.255
!
! By using the Looback interface for ISAKMP exchange
! and IPSec packets tunneling
! we protect the communication against local physical
! interface failure
!
crypto map VPN local-address Loopback0
crypto map VPN 10 ipsec-isakmp
set peer 150.4.3.3
set transform-set AES256
match address VLAN4_TO_VLAN41
!
interface Serial0/0.345 point-to-point
crypto map VPN
!
interface Serial0/1
crypto map VPN
The configurations are very symmetric on both R3 and R4, so you may
effectively use a notepad application to create one config, then copy it and
modify to match another router. In fact this is the recommended approach for
configuration almost anything in the CCIE exam.
By default, ISAKMP messages are sourced off the interface where the crypto-
map applies to. The same IP address is used in the outer header of the ESP-
encapsulated traffic. Of course, thie makes the whole configuration rely on the
interace status. Using the command crypto map <XXX> local-address
allows for changing the source for ISKAMP/ESP packets.and making IPsec
configuration independent of the point of attachment. This achieves the
necessary level of the IPsec redundancy.
Once again, we would like to point out the advantage of VTI-based configuration:
they are easier to read and understand, the could be bound to a logical interface,
and they offer significantly more logical approach to configuring IPsec. However,
still many deployments are based on “legacy” crypto-map syntax and therefore
you need to know it. Not to mention that the ASA firewall still does not support
the concept of VTI tunnel.
Password: cisco
Re-enter password: cisco
Rack4R4(config)#
Fingerprint: AE11D86D 62E91A73 5C430955 739EC1A3
%CRYPTO-6-CERTRET: Certificate received from Certificate Authority
CA Certificate
Status: Available
Certificate Serial Number: 0x1
Certificate Usage: Signature
Issuer:
cn=INE
ou=Security
Subject:
cn=INE
ou=Security
Validity Date:
start date: 12:20:45 UTC Jul 31 2010
end date: 12:20:45 UTC Jul 30 2013
Associated Trustpoints: INE1
Now check that protected network may ping each other and that traffic is actually
encrypted:
Subnet translation:
Inside global Inside local Outside local Outside global /prefix
10.7.7.0 10.41.41.0 --- --- /24
interface: Serial1/1.345
Crypto map tag: VPN, local addr. 150.4.3.3
protected vrf:
local ident (addr/mask/prot/port): (10.7.7.0/255.255.255.0/0/0)
remote ident (addr/mask/prot/port): (10.4.4.0/255.255.255.0/0/0)
current_peer: 150.4.4.4:500
PERMIT, flags={origin_is_acl,}
#pkts encaps: 5, #pkts encrypt: 5, #pkts digest 5
#pkts decaps: 5, #pkts decrypt: 5, #pkts verify 5
#pkts compressed: 0, #pkts decompressed: 0
#pkts not compressed: 0, #pkts compr. failed: 0
#pkts not decompressed: 0, #pkts decompress failed: 0
#send errors 5, #recv errors 0
!
! AAA list for local network authorizaion
! Required to apply ISAKMP authorization via
! local database
!
aaa authorization network EZVPN local
!
! Authentication list: ezVPN auth is local by default, but it does
! not hurt defining and using this list.
!
aaa authentication login EZVPN local
!
! Apply AAA list to the console
!
line console 0
login authentication CONSOLE
!
! ISAKMP policy to support Cisco VPN Clients
!
crypto isakmp policy 10
encr 3des
authentication pre-share
group 2
!
! DPD Keepalives, enabled periodically
!
crypto isakmp keepalive 10 periodic
!
! Pool to allocate addresses for remote clients
!
ip local pool EZVPN_POOL 192.168.0.1 192.168.0.50
!
! Assign this pool to ISAKMP process, so that mode config may work
! with address assignment
!
crypto isakmp client configuration address-pool local VPN_POOL
!
! Split-tunneling Access-List
!
ip access-list extended SPLIT_TUNNEL
permit ip 183.4.0.0 0.0.255.255 any
!
! Client configuration group
!
crypto isakmp client configuration group IELAB
key CISCO
dns 183.4.46.100
wins 183.4.46.100
domain ine.com
pool EZVPN_POOL
acl SPLIT_TUNNEL
!
! ISAKMP Profile for the EZVPN group
!
crypto isakmp profile IELAB
match identity group IELAB
isakmp authorization list EZVPN
client authentication list EZVPN
client configuration address respond
client configuration group IELAB
virtual-template 1
!
! Phase 2 encryption and authentication.
!
crypto ipsec transform-set 3DES_SHA esp-3des esp-sha-hmac
!
! IPsec profile defiens protection settings
!
crypto ipsec profile IELAB
set transform-set 3DES_SHA
set reverse-route tag 100
set isakmp-profile IELAB
!
! Virtual Template to clone access interfaces.
!
interface Virtual-Template1 type tunnel
ip unnumbered Loopback0
tunnel mode ipsec ipv4
tunnel protection ipsec profile IELAB
!
! Redistribute RRI routes
!
router ospf 1
redistribute static subnets route-map STATIC_TO_OSPF
!
! Only redistribute RRI routes
!
route-map STATIC_TO_OSPF
match tag 100
o Enable AAA and define AAA lists for the ezVPN server. Make sure you
protected yourself from potentional console lockouts. Notice that in the
exam you may be required to keep local authentication for the console
line.
o Define the ISAKMP authentication settings and various global ISAKMP
parameters, such as DPD keepalives or timeouts.
o Create an address-pool if you are configuring ezVPN client mode and
allow the ISAKMP to draw addresses from this pool.
o Configure the ezVPN client group and split-tunnel access-lists. Define the
group key, associate the address pool if needed and bind the split-tunnel
ACL. Define other settings as required in the scenario.
o Create an ISAKMP profile that binds together the following attributes:
o Create an IPsec profile (Phase 2) settings to be used along with the future
tunnels. You will need to to define an IPsec transform-set prior to this. The
profile may need to define RRI settings if RRI is used for ezVPN.
o The next step is creating a virtual-template interface of type “tunnel” and
assigning the IPSec protection profile for this VTI. Notice that you need to
define an IP address on the VTI for ezVPN to work correctly – otherwise
IP processing will not be enabled on the interface.
o Lastly, configure the routing process for redistribution of RRI information,
e.g. using a route-map matching the tags you defined for RRIs.
Note
Configure SW2 port Fa 0/20 so that the Test PC appears in VLAN 2. Configure
the Test PC IP address respectively. Here is a sample configuration.
SW2:
interface FastEthernet0/20
switchport access vlan 2
switchport mode access
spanning-tree portfast
Test PC:
Note
Next, configure the Cisco EzVPN Client application for connection with R2. Set
the parameters per the task specification.
When connected, check ezVPN client statistics page. Notice the split-tunnel
network downloaded from the server, the cipher and the hash.
Now send some traffic from R3 to the VPN client’s IP address. Check that R3
learns the new route via OSPF. Check IPsec counters and ISAKMP parameters
using the show crypto commands.
Rack4R3#ping 192.168.0.1
interface: Virtual-Access2
Crypto map tag: Virtual-Access2-head-0, local addr 10.0.0.2
!
! Configure transform-set
!
crypto ipsec transform-set 3DES_MD5 esp-3des esp-md5-hmac
!
! Access-list to select traffic to encrypt
!
access-list VLAN8_TO_VLAN5 permit ip 10.8.8.0 255.255.255.0 10.5.5.0
255.255.255.0
!
! Do not forget the NAT exemption rule
!
nat (inside) 0 access-list VLAN8_TO_VLAN5
!
! Crypto map configuration
!
crypto map VPN 10 match address VLAN8_TO_VLAN5
crypto map VPN 10 set peer 183.4.125.5
crypto map VPN 10 set transform-set 3DES_MD5
!
! Apply crypto map to the outside interface
!
crypto map VPN interface outside
!
! Tunnel-group filter (filters traffic inside the IPsec tunnel)
!
access-list VPN_FILTER extended deny icmp any any echo
access-list VPN_FILTER extended deny icmp any any echo-reply
access-list VPN_FILTER extended permit ip any any
!
! Configure group-policy that applies tunnel ACL
!
group-policy VPN_POLICY internal
group-policy VPN_POLICY attributes
vpn-filter value VPN_FILTER
!
! Create LAN-to-LAN tunnel group to match the remote-peer
!
tunnel-group 183.4.125.5 type ipsec-l2l
!
! Apply group policy
!
tunnel-group 183.4.125.5 general-attributes
default-group-policy VPN_POLICY
!
! Configure pre-shared key for authentication
!
tunnel-group 183.4.125.5 ipsec-attributes
pre-shared-key CISCO
!
! Permit tunneled traffic to bypass outside access-list
! This is ON by default, by never hurts to make sure its enabled
!
sysopt connection permit-vpn
R5:
crypto isakmp policy 10
auth pre
hash md5
encr 3des
!
! ASA uses DH group2 by default, so mirror it
!
group 2
!
! Pre-shared key for the ASA
!
crypto isakmp key CISCO address 183.4.125.12
!
! Transform-set and access-list to classify traffic for IPSec
!
crypto ipsec transform-set 3DES_MD5 esp-3des esp-md5-hmac
!
ip access-list ext VLAN5_TO_VLAN8
permit ip 10.5.5.0 0.0.0.255 10.8.8.0 0.0.0.255
!
! Static route to VLAN8
!
ip route 10.8.8.0 255.255.255.0 183.4.125.12
!
! Crypto map
!
crypto map VPN 10 ipsec-isakmp
match address VLAN5_TO_VLAN8
set transform 3DES_MD5
set peer 183.4.125.12
!
interface FastEthernet 0/1
crypto map VPN
http://blog.ine.com/2009/04/19/understanding-how-asa-firewall-matches-tunnel-
group-names/
To better understand the logic that ASA uses for tunnel-group matching when
establishing an IPsec session.In our case, the tunnel-group name equals the
peer’s IP address, as we are using main mode with pre-shared keys. We are also
required to filter the tunnel-encapsulated traffic. There are two ways of doing this:
As usual, if using NAT in the firewall, do not forget to exclude the VPN traffic from
translation, since translation applies prior to encryption. Also, remember that
ISAKMP is by default off in the ASA firewall.
For the IOS configuration, you need to use crypto-maps as the ASA does not
properly interoperate with the “wildcard” IPsec SA proxy IDs used in VTI-based
IPsec implementation.
Password: cisco
Rack4R5>exit
Generate ICMP packets and cofirm that those are being filtered:
Connection : 183.4.125.5
Index : 1 IP Addr : 183.4.125.5
Protocol : IPSecLAN2LAN Encryption : 3DES
Hashing : MD5
Bytes Tx : 1047 Bytes Rx : 855
Login Time : 04:49:17 UTC Fri Feb 9 2007
Duration : 0h:01m:13s
Filter Name : VPN_FILTER
Active SA: 1
Rekey SA: 0 (A tunnel will report 1 Active and 1 Rekey SA during rekey)
Total IKE SA: 1
!
! Class map to match voice traffic inside a tunnel group
!
class-map VPN_VOICE
match dscp ef
match tunnel-group 183.4.125.5
!
! Class map to match traffic inside the tunnel group.
! Notice that we match the VPN traffic flow, it’s the only
! way to match “tunnel-group”. Since we have just one L2L
! tunnel, we effectively limit it to 2Mbps
!
class-map VPN_DATA
match tunnel-group 183.4.125.5
match flow ip destination-address
!
! Add policy actions to the policy map
! The order of class maps is important! See Breakdown
!
policy-map OUTSIDE
class VPN_VOICE
priority
class VPN_DATA
police output 2000000
class-map XXX
match tunnel-group YYY
match flow ip destination-address
Firstly, you can only match flows when matching tunnel-group in the same class
map. The reason is that this match command was introduced to allow per-flow
traffic policing for VPN connections. For example, if you have multiple ezVPN
clients and you the above two commands, the associated policy action will apply
to every traffic flow separately. Secondly, policing is the only working per-flow
QoS command – everything else will apply to traffic aggregately or not work at
all. Speaking of aggregate QoS, when using construct like this:
class-map ZZZ
match XXX
match tunnel-group YYY
The class-map will match traffic for ALL flows landing on the tunnel-group YYY
and matching the additional criterion XXX. Notice that you cannot police such
traffic – the ASA only supports per-flow policing for tunnel-group traffic!
In our case, we have two classes: one aggregate matching VoIP traffic for the
L2L VPN group, distinguished by EF marking and another per-flow, matching
every flow for L2L VPN. Since there is just one flow, it’s the same as aggregate –
the reason we match per-flow is that you cannot apply policing to tunnel-groups
on aggregate basis “explicitly”.
Notice that with out configuration VoIP traffic will not be policed – only a single
QoS action is applied. The reason is that for QoS actions, ASA matches flow only
against a SINGLE class in a policy map. And this is the class that is placed first
in the policy map. Thus, even though the VoIP traffic marked with EF
theoretically matches VPN_DATA and VPN_VOICE, the match is landed on the
first class in sequence – VPN_VOICE. In fact, such order-dependent
configurations are not recommended. You may want to use some other definition
for VPN_DATA, such as:
class-map VPN_DATA
match dscp 0
match tunnel-group 183.4.125.5
But this only works if all other traffic is marked with DSCP value of 0. Or
configuration matches any traffic, but results in order dependent configuration.
Unfortunately, there is no “match not” command in MPF syntax.
Recall that DSCP EF has the actual code-point value of 46. Therefore, the
corresponding TOS byte is 46*4=184. Set this as the TOS value for IP SLA
operation.
SW2:
ip sla 1
udp-echo 10.5.5.5 32767 source-ip 10.8.8.8 source-port 32767 control
disable
tos 184
timeout 1000
frequency 1
ip sla schedule 1 life forever start-time now
Interface outside:
Service-policy: OUTSIDE
Class-map: ICMP_TRAFFIC
Input police Interface outside:
cir 56000 bps, bc 1750 bytes
conformed 948 packets, 73944 bytes; actions: transmit
exceeded 0 packets, 0 bytes; actions: drop
conformed 624 bps, exceed 0 bps
Output police Interface outside:
cir 56000 bps, bc 1750 bytes
conformed 948 packets, 73944 bytes; actions: transmit
exceeded 0 packets, 0 bytes; actions: drop
conformed 624 bps, exceed 0 bps
Class-map: VPN_VOICE
Priority:
Interface outside: aggregate drop 0, aggregate transmit 581
Class-map: VPN_DATA
Output police Interface outside:
cir 2000000 bps, bc 62500 bytes
conformed 0 packets, 0 bytes; actions: transmit
exceeded 0 packets, 0 bytes; actions: drop
conformed 0 bps, exceed 0 bps
Class-map: class-default
Default Queueing
!
! Traffic that requires authentication, notice that
! the virtual HTTP is also included
!
access-list AUTH permit tcp any any eq 135
access-list AUTH permit tcp any host 192.10.4.100 eq www
!
aaa authentication match AUTH inside TACACS+
!
! Virutal HTTP provides transparent redirection back
! to the URL entered by the end-user, and HTTP server
! capability for authentication
!
virtual http 192.10.4.100
AAA Server
Step 1:
Start by creating a new user on the AAA server. Launch the ACS application and
follow to User Setup ,then enter then name “USER1” and click the Add/Edit
button. After this, enter the Password value of “CISCO” and confirm it. Click the
Submit button when you’re done.
Step 2:
Add the AAA Client in the ACS. In the ACS application, click Network
Configuration then click the Add Entry button. Fill in the fields according to
the screenshot below and click Submit + Apply.
Step 2:
!
! Safeguard the console
!
aaa authentication login CONSOLE none
!
! The default list will be applied to HTTP authentication
!
aaa authentication login default group tacacs+
!
! Auth-proxy is authorzied via TACACS+
!
aaa authorization auth-proxy default group tacacs+
!
! Apply AAA list to the console
!
line console 0
login authentication CONSOLE
!
! TACACS+ server settings, use Loopback0 as source of requests
!
tacacs-server host 10.0.0.100 key CISCO
ip tacacs source-interface Loopback0
!
! Enable HTTP server and configure authentication via AAA
! HTTP server is used for auth-proxy authentication session
!
ip http server
ip http authentication aaa
ip http secure-server
ip http secure-port 4343
!
! Needed for Auth-Proxy Interception
!
ip port-map https port tcp 4343
!
! Auth-proxy rule intercepts HTTP traffic
!
ip auth-proxy name AUTH_PROXY http
!
! Acess-list denies TCP 135 traffic by default
! Everythig else is permitted
!
ip access-list extended VLAN46_IN
deny tcp any any eq 135
permit ip any any
!
! Apply the auth-proxy rule and access-list
!
interface FastEthernet0/0
ip auth-proxy AUTH_PROXY
ip access-group VLAN46_IN in
AAA Server
Step 1:
Launch the ACS Server administration and click the Network Configuration
button and then click the Add Entry button. Fill in the fields per the screenshot
below and click the Submit + Apply button.
Step 2:
Configure the ACS Interface to support Auth Proxy service. Click the Interface
Configuration button then click the TACACS+ (Cisco IOS) link. Under the
New Services section, check the checkboxes corresponding to both user and
group profiles (so that it appears on both the user and group configuration pages)
and add the service name as “auth-proxy”.
Step 3:
Now add a new user and configure auth-proxy settings for it. Click the User
Setup button, then enter the new user name as “TCP135” and click the
Add/Edit button. On the next page, set the Password to “CISCO” and scroll
down to the TACACS+ Settings auth-proxy section of the page. Fill the
section according to the screenshot below. Notice that it activates the new “auth-
proxy” service for this user and additionally specifies the proxy ACL to be
downloaded via TACACS+.
Configure the port connected to the Test PC in VLAN 46 and configure the IP
address of 183.4.46.200 for the Test PC. Set R4 as the default gateway for the
Test PC.
Step 2:
Initiate HTTPS session on port 4343 to a server behind R4, for example to R5, by
opening the URL https://150.X.5.5:4343 You should see the browser prompt,
asking you for credentials. Enter the name “TCP135” along with the password of
“CISCO”. You should see the popup “Authentication Successful!” window.
Step 3:
Rack4R4#show ip access-lists
Extended IP access list VLAN46_IN
permit tcp host 183.4.46.200 any eq 135
10 deny tcp any any eq 135
20 permit ip any any (218 matches)
Extended IP access list VLAN4_TO_VLAN41
!
! Configure a list for local authentication
!
aaa authentication login LOCAL_AUTH local-case
!
! Authorize exec separately; this is possible with TACACS+
!
aaa authorization exec default group tacacs+
!
! Configure accounting for Level5 commands via TACACS+
!
aaa accounting commands 5 default start-stop group tacacs+
!
! Assign ‘clear’ command to privilege level 5
!
privilege exec level 5 clear line
privilege exec level 5 clear counters
!
! Add a user to local database, notice that password is stored
! as an md5 hash, not in the default reversible format
!
username NOC secret CISCO
!
! TACACS+ settings
!
tacacs-server host 10.0.0.100 key CISCO
ip tacacs source-interface loopback 0
!
! Apply AAA list to VTY lines
!
line vty 0 4
login authentication LOCAL_AUTH
AAA Server
Step 1:
Add R5 as AAA client to the ACS server. Click the Network Configuration
button, and then click the Add Entry button. Fill in the fields according to the
screenshot below. Click the Submit+Apply button when you’re done.
Step 2:
Make sure that Shell(exec) service is enabled within the ACS Interface. Click
the Interface Configuration button, then click the TACACS+ (Cisco
IOS) link, then make sure the Shell(exec) service is selected for both User
and Group profile configuration. When done, click the Submit button.
Step 3:
Add a new user for remote authorization in the ACS next. In the ACS Admin
utility, click the User Setup button then add new user named “NOC”. On the
next page that appears, specify the Password value of “CISCO” for this user.
Scroll down to the TACACS+ Settings and check the Shell(exec) checkbox.
Then, check the “Privilege level” field and assign the value of “5” to this field.
o Locally authenticate remote user logging into the device. This means we
need a local username.
o Assign the user to privilege level 5 upon login: this could be done locally,
but we are not allowed to do this. Thus, we need a remote serve to
authorize exec process.
o The above “separation” of authentication and authorization is only possible
with TACACS+, so we know which AAA protocol to use.
o Finally we need to let the new user use some privileged commands. This
could be achieved by changing the commands local privilege level to 5.
o Accounting is also required but this is trivial, as we could use the same
TACACS+ session for this purpose.
Use of Loopback interface for sourcing the TACACS+ session is a common best
practice as it allows uniquely identifying device irrespective of the outgoing
interface used to reach the AAA server:
Username: NOC
Password: CISCO
Rack4R5#show privilege
Current privilege level is 5
Rack4R5#clear ?
aaa Clear AAA values
backhaul-session-manager Backhaul Session Manager information
bsc Clear counters in <show bsc> command
bstun Clear counters displayed in show bstun
call Call
counters Clear counters on one or all interfaces
drip Clear drip
h323 Clear H.323 items
line Reset a terminal line
memory Memory counters
ncia Native Client Interface Architecture (NCIA)
rpms-proc Clear RPMS Process Information
scp Clear SCP commands
statistics Statistics
stun Clear counters displayed in show stun
Rack4R5#conf t
^
% Invalid input detected at '^' marker.
Rack4R5#clear counters
Clear "show interface" counters on all interfaces [confirm]
Verify TACACS+ Accounting. Click the Reports & Activity button in the
ACS Admin, the select TACACS+ Administration and click the TACACS+
Administration Active.csv file.
!
! Safeguard the console line
! Disable authentication *and*
! exec authorization
!
aaa authentication login CONSOLE none
aaa authorization exec CONSOLE none
!
line console 0
login authentication CONSOLE
authorization exec CONSOLE
!
! Configure dot1x (EAP) authentication via RADIUS
!
aaa authentication dot1x default group radius
!
dot1x system-auth-control
!
! Create VLANs 200 and 201 (guest & auth-fail vlans)
!
vlan 200,201
!
! Guest VLAN is used for clientless hosts
! Auth-Fail VLAN is used for clients,
! that failed authentication
!
interface FastEthernet0/17
switchport mode access
dot1x port-control auto
dot1x guest-vlan 201
dot1x auth-fail vlan 200
!
! Configure RADIUS server
!
ip radius source-interface Loopback0
!
radius-server host 10.0.0.100 key CISCO
Step 1:
Add the switch as a new RADIUS client in the ACS. Run the ACS Admin utility
and click the Network Configuration button then click the Add Entry button.
Fill in the form per the screenshot below and click the Submit + Apply button.
Step 2:
Add new user in the ACS. Click the User Setup button, then enter the name
“HOST” and lick the Add/Edit button. Set the password of “CISCO” on the next
page and click the Submit button.
Notice that we disabled both authentication and exec authorization for the
console line. In the older Catalyst IOS versions, exec authorization was ON by
default for console line, so by turning off your authentication you authomatically
disabled console access. This issue has been fixed in recent releases, but you
should better be careful and disable exec authorization explicitly.
Next, configure R3 as a 802.1x supplicant and use its connection to SW1 for the
simulation-based verificaton.
R3:
dot1x credentials TEST
username HOST
password 0 CISCO
!
interface FastEthernet0/0
no ip address
dot1x port-control auto
dot1x pae supplicant
dot1x credentials TEST
SW1:
interface FastEthernet0/3
switchport mode access
dot1x pae authenticator
dot1x port-control auto
dot1x violation-mode protect
dot1x guest-vlan 201
dot1x auth-fail vlan 200
spanning-tree portfast
Wait some time for R3 to authenticate to the switch, and check the show
commands again:
AAA Server:
Step 1:
Create a new group in the ACS server. Click the Group Setup button and select
any unused group. Rename it to the group named “DOT1X” and then click the
Edit Settings button. On the top of the screen, select Jump to: RADIUS
(IETF). Scroll down and set values for the following attributes:
Tunnel-Type=”VLAN”,
Tunnel-Medium-Type=”802”,
Tunnel-Private-Group-ID”=”255” (VLAN number).
Step 2:
Assign this profile to the user “HOST”. Click the User Setup button, find the
user named “HOST” and assign it to the group “DOT1X”.
Rack4SW1#debug radius
RADIUS: 43 41 43 53 3A 30 2F 31 37 37 34 61 2F 39 36 30
[CACS:0/1774a/960]
RADIUS: 39 30 37 30 37 2F 35 30 30 30 33 [ 90707/50003]
RADIUS: Message-Authenticato[80] 18
RADIUS: 3C 8F E5 66 5F D8 66 BC BC D3 D6 67 E2 3E 96 D7 [
<f_fg>]
RADIUS(0000000A): Received from id 1645/11
RADIUS/DECODE: EAP-Message fragments, 4, total 4 bytes
R4:
interface FastEthernet0/0
ip ospf message-digest-key 1 md5 CISCO
!
interface Serial0/0.345
ip ospf message-digest-key 45 md5 CISCO45
!
interface Serial0/1
ip ospf message-digest-key 45 md5 CISCO45
!
router ospf 1
area 0 authentication message-digest
R5:
router ospf 1
area 0 authentication message-digest
!
interface Serial0/0.345
ip ospf message-digest-key 35 md5 CISCO35
ip ospf message-digest-key 45 md5 CISCO45
!
interface Serial0/1
ip ospf message-digest-key 45 md5 CISCO45
R6:
interface FastEthernet0/0
ip ospf message-digest-key 1 md5 CISCO
!
router ospf 1
area 0 authentication message-digest
Next 0x0(0)/0x0(0)
Last flood scan length is 1, maximum is 10
Last flood scan time is 4 msec, maximum is 4 msec
Neighbor Count is 2, Adjacent neighbor count is 2
Adjacent with neighbor 150.4.4.4
Adjacent with neighbor 150.4.3.3
Suppress hello for 0 neighbor(s)
Message digest authentication enabled
Youngest key id is 45
Rollover in progress, 1 neighbor(s) using the old key(s):
key id 35
!
! Logging via SMTP
!
logging recipient-address [email protected]
logging from-address [email protected]
logging mail critical
logging on
!
smtp-server 183.4.119.100
Task 6.1
IPS:
IPS# setup
At any point you may enter a question mark '?' for help.
User ctrl-c to abort configuration dialog at any prompt.
Default settings are in square brackets '[]'.
<snip>
service host
network-settings
host-ip 204.12.4.10/24,204.12.4.1
host-name Rack9IPS
telnet-option disabled
ftp-timeout 300
no login-banner-text
exit
time-zone-settings
offset 0
standard-time-zone-name UTC
exit
summertime-option disabled
ntp-option disabled
exit
service web-server
port 443
exit
service event-action-rules rules0
overrides
override-item-status Enabled
risk-rating-range 90-100
exit
exit
IPS# reset
IPS:
Configure the IPS to be managed both from the AAA server and the host on the
same VLAN as the IPS (this is going to be the Test PC). This allows for
bypassing the slow WAN links when configuring the sensor using GUI.
Rack4IPS# conf t
Rack4IPS(config)# service host
Rack4IPS(config-hos)# network-settings
Rack4IPS(config-hos-net)# access-list 204.12.4.200/32
Rack4IPS(config-hos-net)# access-list 10.0.0.100/32
Rack4IPS(config-hos-net)# exit
Rack4IPS(config-hos)# exit
Apply Changes:?[yes]: yes
Rack4IPS# conf t
Rack4IPS(config)# service interface
Rack4IPS(config-int)# physical-interfaces GigabitEthernet/0
Rack4IPS(config-int-phy)# admin-state enabled
Rack9IPS(config-int-phy)# subinterface-type vlan-group
Rack9IPS(config-int-phy-vla)# subinterface 1
Rack9IPS(config-int-phy-vla-sub)# vlans range 125
Rack9IPS(config-int-phy-vla-sub)# exit
Rack9IPS(config-int-phy-vla)# exit
Rack9IPS(config-int-phy)# exit
Rack9IPS(config-int)# exit
Apply Changes?[yes]: yes
Now add the sensor into the IPS Manager Express for monitoring. Start the
application on the AAA server, select Devices and click the “Plus” button. Notice
that the HTTPS port is 10443, not the default 443.
Configure the Test PC in the same VLAN as the IPS (110) and assign it the IP
address of 204.12.X.200. This address is allowed to manage the IPS sensor.
Connect to the sensor via HTTPS and launch IDM. From the main IDM menu,
select Configuration and then Signature Definitions/sig0. On the
right pane, change the Select By mode to “Sig Name” and locate all signatures
with the word “ICMP”. Point on the signature with the ID 2004 and click the
Enable button, then click the Apply button.
Now launch the IPS Manager Express in the AAA server. Select Event
Monitoring from the toolbar and change the Time setting to “Real Time” then
click the Apply button. You should see the ICMP Echo Request signature firing
periodically, similarly to the screenshot below.
Note
Launch the IDM to complete this task. You may use the Test PC configured in
VLAN110 with the IP address 204.12.X.10 to accomplish this, as this is the
fastest way to access the sensor.
Select Monitoring > Active Host Blocks and then click the Add button.
Fill in the fields similar to the screenshot below, but using your rack number.
Notice that the No Timeout radio button is selected. When you’re done, click
the Apply button.
Note
In the IDM, select Configuration, then Blocking and next Device Login
Profiles. After this, click the Add button. Fill in the fields similar to the
screenshot below. Notice that we’re using the default username/password to
access the ASA remotely, which is “pix/cisco”. Click OK and then click Apply
Changes.
Note
Now select Blocking > Blocking Devices and click the Add button. Fill in
the form similar to the screenshot below and click the OK/Apply buttons in
sequence. Notice that SSH is selected as the communication protocol.
Now there is still a fews things left to do. First, we need to configure the ASA for
remote SSH access. Next, we should configure R1 zone-based firewall to permit
SSH sessions across R1 and to the ASA. Since there are no explicit restrictions,
we permit SSH access to the ASA from any address and permit any SSH
connections from the IPS across R1.
R1:
!
! Permit transit SSH in ZFW configuration
!
ip access-list extended SSH_FROM_IPS_ACL
permit tcp host 204.12.4.10 any eq 22
!
class-map type inspect SSH_FROM_IPS_CMAP
match access-group name SSH_FROM_IPS_ACL
match protocol tcp
!
policy-map type inspect OUTSIDE_TO_INSIDE_PMAP
class SSH_FROM_IPS_CMAP
inspect
Lastly, we should retrieve the RSA hostkey of the ASA and add it to the known-
host keys database in the IPS. To do this, launch the IDM and navigate to
Configuration > SSH > Known Host Keys and press the Add button.
Enter the IP address of the ASA unit and press the Retrieve Host Key
button. After this, press the OK button and then the Apply button.
1) Store the signing key from Cisco in routers NVRAM. They key in R6’s flash
memory. Simply run the command
Rack4R6#more flash:/realm-cisco.pub.key.txt
crypto key pubkey-chain rsa
named-key realm-cisco.pub signature
key-string
30820122 300D0609 2A864886 F70D0101 01050003 82010F00 3082010A 02820101
00C19E93 A8AF124A D6CC7A24 5097A975 206BE3A2 06FBA13F 6F12CB5B 4E441F16
17E630D5 C02AC252 912BE27F 37FDD9C8 11FC7AF7 DCDD81D9 43CDABC3 6007D128
B199ABCB D34ED0F9 085FADC1 359C189E F30AF10A C0EFB624 7E0764BF 3E53053E
5B2146A9 D7A5EDE3 0298AF03 DED7A5B8 9479039D 20F30663 9AC64B93 C0112A35
FE3F0C87 89BCB7BB 994AE74C FA9E481D F65875D6 85EAF974 6D9CC8E3 F0B08B85
50437722 FFBE85B9 5E4189FF CC189CB9 69C46F9C A84DFBA5 7A0AF99E AD768C36
006CF498 079F88F8 A3B3FB1F 9FB7B3CB 5539E1D1 9693CCBB 551F78D2 892356AE
2F56D826 8918EF3C 80CA4F4D 87BFCA3B BFF668E9 689782A5 CF31CB6E B4B094D3
F3020301 0001
quit
exit
exit
2) Load the signature definition file. The IPS signatures are stored in the flash
memory of the router as well. Issue the command similar to the one below:
And wait till it loads all the engines. Notice that if you don’t have much of the
signatures “Retired” in your configuration, this process might drain the router out
of memory.
Now we need to enable the ICMP echo and echo reply signatures. The IDs for
these signatures remain the same during all versions of the IPS engine, and they
are 2004 and 2000.
Rack4R6#conf t
Rack4R6(config)#ip ips signature-definition
Rack4R6(config-sigdef)#signature 2000 0
Rack4R6(config-sigdef-sig)#status
Rack4R6(config-sigdef-sig-status)#retired false
Rack4R6(config-sigdef-sig-status)#exit
Rack4R6(config-sigdef-sig)#exit
Rack4R6(config-sigdef)#signature 2004 0
Rack4R6(config-sigdef-sig)#status
Rack4R6(config-sigdef-sig-status)#enabled true
Rack4R6(config-sigdef-sig-status)#retired false
Rack4R6(config-sigdef-sig-status)#exit
Rack4R6(config-sigdef-sig)#exit
Rack4R6(config-sigdef)#exit
Do you want to accept these changes? [confirm]
Finally, change the target value rating for the network 183.4.146.0/24
Note
First, check the basic IPS configuration information. Notice the interfaces
enabled for IPS and syslog event notification. Also, the part of CLI configuration
is category definition.
Check that the ICMP signatures are actually enabled in the IPS configuration.
Rack4R6#show logging
<snip>
Generate some test traffic and ensure that the IPS engine catches it.
Rack4R6#ping 119.0.0.1
Rack4R6#
%IPS-4-SIGNATURE: Sig:2000 Subsig:0 Sev:25 ICMP Echo Reply [119.0.0.1:0
-> 54.4.7.6:8] VRF:NONE RiskRating:25
%IPS-4-SIGNATURE: Sig:2000 Subsig:0 Sev:25 ICMP Echo Reply [119.0.0.1:0
-> 54.4.7.6:8] VRF:NONE RiskRating:25
%IPS-4-SIGNATURE: Sig:2000 Subsig:0 Sev:25 ICMP Echo Reply [119.0.0.1:0
-> 54.4.7.6:8] VRF:NONE RiskRating:25
%IPS-4-SIGNATURE: Sig:2000 Subsig:0 Sev:25 ICMP Echo Reply [119.0.0.1:0
-> 54.4.7.6:8] VRF:NONE RiskRating:25
%IPS-4-SIGNATURE: Sig:2000 Subsig:0 Sev:25 ICMP Echo Reply [119.0.0.1:0
-> 54.4.7.6:8] VRF:NONE RiskRating:25
!
! Specify syslog host and logging level
!
logging 10.0.0.100
logging trap informational
Rack4R4#show logging
Syslog logging: enabled (0 messages dropped, 1 messages rate-limited, 0
flushes, 0 overruns, xml disabled)
Console logging: level debugging, 58 messages logged, xml disabled
Monitor logging: level debugging, 0 messages logged, xml disabled
Buffer logging: disabled, xml disabled
Logging Exception size (4096 bytes)
Count and timestamp logging messages: disabled
Trap logging: level informational, 65 message lines logged
Logging to 10.0.0.100, 0 message lines logged, xml disabled
!
! Generate the RSA key
!
ip domain name ine.com
!
crypto key generate rsa general modulus 512
!
! Restrict VTY access
!
access-list 60 permit 183.4.0.0 0.0.255.255
!
! Apply access-restrictions and configure input transport
!
line vty 0 4
login local
transport input ssh
access-class 60 in
Rack4R4#show ip ssh
SSH Enabled - version 1.5
Authentication timeout: 120 secs; Authentication retries: 3
Rack4R6#sho ip ssh
SSH Enabled - version 1.5
Authentication timeout: 120 secs; Authentication retries: 3
Password: CISCO
Rack4R6>
Rack4R4#telnet 150.4.6.6
Trying 150.4.6.6 ...
% Connection refused by remote host
!
! Class to match VPN traffic
!
class-map VPN_TRAFFIC
match access-group name VPN_TRAFFIC
!
! Class to distinguish voice traffic (using the DSCP value)
!
class-map VOICE_TRAFFIC
match dscp ef
!
! Tunnel policy to provide priority treatment for voice traffic
! inside the VPN tunnel
!
policy-map TUNNEL_POLICY
class VOICE_TRAFFIC
priority 128
!
! Interface policy to provide minimum bandwidth guarantee
! and limit the maximum transmissin speed
!
! Here “shape” limits maxmimum speed, and “bandwidth” provides
! minimum bandwidth reservation in case of congestion
!
policy-map INTERFACE_POLICY
class VPN_TRAFFIC
shape average 2000000
bandwidth 2000
service-policy TUNNEL_POLICY
!
! Set interface bandwidth and apply the QoS Policy
!
interface FastEthernet 0/1
service-policy out INTERFACE_POLICY
R5:
ip telnet tos B8
Now connect to R5 across the VPN using the telnet session and then check the
policy-map statistics. Ensure that there are matches for packets marked with
DSCP value of EF.
Username: NOC
Password: CISCO
Service-policy : TUNNEL_POLICY
!
! A /32 route used as next-hop to “drop” the packets
! It should be configured on every participating router.
!
ip route 192.0.2.1 255.255.255.255 null0
!
! Blackhole route, the one we want to “screen”
! (In this case – route to the server under attack)
!
ip route 183.4.37.200 255.255.255.255 null0 tag 100
!
! Route-map to signal RTHB information.
!
! Note that Origin and Local Pref are changed to ensure
! that route is alwasy preferred by BGP best-path selection.
!
! No-Export community is used to contain RTBH route inside our AS.
! Match Tag is used for scalable route lookup.
!
route-map STATIC_TO_BGP permit 10
match tag 100
set local-preference 200
set origin igp
set community no-export
set ip next-hop 192.0.2.1
R1 & R6:
router bgp 100
neighbor 150.4.2.2 remote-as 100
neighbor 150.4.2.2 update-source Loopback0
!
ip route 192.0.2.1 255.255.255.255 null0
To make sure, issue the following command to check the CEF next-hop for the
prefix. You should repeat this command on all border BGP routers.
You can’t get access to the backbone routers in the real lab, but in INE-
compatible racks you could. Do a traceroute and ensure the packets are dropped
at R6.
BB1-FRS>traceroute 183.4.37.200
!
! In this case, we want to attract the traffic for network 112.0.0.0/8
! which is suspected to be the source of the attack. We use special
! tag to distinguish such ‘sinkhole’ networks.
!
ip route 112.0.0.0 255.0.0.0 Null0 tag 200
!
! Next, we need a way to intercept and log ICMP unreachable messages
!
ip access-list ext LOG_UNREACHABLES
permit icmp any any unreachable log
permit ip any any
!
interface Serial 0/0.123
ip access-group LOG_UNREACHABLES in
!
! Tune access-list logging to log every ACL line hit
!
ip access-list log-update threshold 1
!
! Redistribute static routes into OSPF so non-BGP hosts may reach it
!
route-map STATIC_TO_OSPF
match tag 200
!
router ospf 1
redistribute static subnets route-map STATIC_TO_OSPF
Rack4R2#show ip access-lists
Extended IP access list LOG_UNREACHABLES
10 permit icmp any any unreachable log (5 matches)
20 permit ip any any (3734 matches)
Rack4R2#show logging
Syslog logging: enabled (1 messages dropped, 0 messages rate-limited,
0 flushes, 0 overruns, xml disabled, filtering
disabled)
<snip>
ASA2:
ciscoasa# conf t
ciscoasa(config)# mode multiple
WARNING: This command will change the behavior of the device
WARNING: This command will initiate a Reboot
Proceed with change mode? [confirm]
Convert the system configuration? [confirm]
ASA2:
hostname Rack4ASA2
!
! Automatically generate MAC addresses for the shared interface
!
mac-address auto
!
! Configure ContexA settings
!
context ContextA
allocate-interface Ethernet0/0 outside
allocate-interface Ethernet0/1 insideA
config-url disk0:/ContextA.cfg
!
! Configure ContextA as admin-context
! Erase the old admin context
!
admin-context ContextA
no context admin noconfirm
!
! Configure ContexB settings
!
context ContextB
allocate-interface Ethernet0/0 outside
allocate-interface Ethernet0/2 insideB
config-url disk0:/ContextB.cfg
!
! Enable physical interfaces allocated to contexts
!
interface Ethernet0/0
no shutdown
!
interface Ethernet0/1
no shutdown
!
interface Ethernet0/2
no shutdown
ASA2/ContextA:
interface insideA
nameif inside
ip address 204.12.4.13 255.255.255.0
no shutdown
!
interface outside
nameif outside
ip address 132.1.137.113 255.255.255.0
no shutdown
ASA2/ContextB:
interface insideB
nameif inside
ip address 132.1.138.13 255.255.255.0
no shutdown
!
interface outside
nameif outside
ip address 132.1.137.213 255.255.255.0
no shutdown
!
! Redistribute static subnets to provide full connectivity
!
router ospf 1
redistribute static subnets
Note
Confirm that other routers can see the networks redistributed into IGP as OSPF
external prefixes. Keep in mind that you cannot reach SW2 or BB3 right now, as
the necessary firewall configurations have not been applied yet.
!
! Permit only the default route to R2.
!
router rip
distribute-list DEFAULT_ONLY out interface inside
R2:
key chain RIP
key 1
key-string CISCO
!
interface FastEthernet0/0
ip rip authentication key-chain RIP
1 Pitfall
Do not apply a key-chain to an interface before it has been created in
the global configuration. When making changes to a key-chain, remove
it from the interface and reapply it after the changes have been made.
Redistributing: rip
Default version control: send version 2, receive version 2
Interface Send Recv Triggered RIP Key-chain
FastEthernet0/0 2 2 RIP
Automatic network summarization is not in effect
Maximum path: 4
Routing for Networks:
132.1.0.0
Passive Interface(s):
VoIP-Null0
Serial0/0
Serial0/0.1234
Serial0/1
Virtual-Access1
Loopback0
Routing Information Sources:
Gateway Distance Last Update
132.1.29.9 120 00:00:11
Distance: (default is 120)
Rack4R2#debug ip rip
RIP protocol debugging is on
Rack4R2#
RIP: received packet with text authentication CISCO
RIP: received v2 update from 132.1.29.9 on Ethernet0/0
0.0.0.0/0 via 0.0.0.0 in 1 hops
ASA1:
interface Ethernet0/0
rip authentication mode md5
rip authentication key CISCO key_id 1
Rack4R6#show ip protocols
Routing Protocol is "rip"
Sending updates every 30 seconds, next due in 5 seconds
Invalid after 180 seconds, hold down 180, flushed after 240
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Redistributing: rip
Default version control: send version 2, receive version 2
Interface Send Recv Triggered RIP Key-chain
Ethernet0/0 2 2 RIP
Loopback0 2 2
Automatic network summarization is not in effect
Maximum path: 4
Routing for Networks:
132.1.0.0
150.4.0.0
Routing Information Sources:
Gateway Distance Last Update
132.1.69.9 120 00:00:04
Distance: (default is 120)
Rack4R6#debug ip rip
RIP protocol debugging is on
Rack4R6#
RIP: received packet with MD5 authentication
RIP: received v2 update from 132.1.69.9 on Ethernet0/0
0.0.0.0/0 via 0.0.0.0 in 1 hops
<snip>
!
! Translate all inside addresses
!
nat (inside) 1 0.0.0.0 0.0.0.0
global (outside) 1 interface
!
! Policy NAT for ICMP packets
!
nat (inside) 2 access-list ICMP
global (outside) 2 132.1.69.222
!
! Static NAT to keep BGP session intact
!
static (inside,outside) 150.4.2.2 150.4.2.2
Rack4ASA1(config)#
ICMP echo request from inside:132.1.29.2 to outside:150.4.6.6 ID=73
seq=115 len=72
ICMP echo request translating inside:132.1.29.2/73 to
outside:132.1.69.222/1
ICMP echo request from inside:132.1.29.2 to outside:150.4.6.6 ID=74
seq=115 len=72
<output omitted>
Rack4R2#telnet 150.4.6.6
Trying 150.4.6.6 ... Open
Password:
Rack4R6>
R2:
!
! Set BGP password
!
router bgp 100
neighbor 150.4.6.6 password CISCO
!
ip route 150.4.6.6 255.255.255.255 132.1.29.9
ASA1:
!
! A TCP inspection policy, that permits TCP option 19
! This option is used to authenticate the BGP peering
! It carries the actual hash value.
!
tcp-map BGP
tcp-options range 19 19 allow
!
! Class-map to classify BGP traffic
!
class-map BGP
match port tcp eq bgp
!
! Actual policy that disables TCP random-sequencing for
! BGP sessions and applies TCP inspection policy
!
policy-map global_policy
class BGP
set connection advanced-options BGP
set connection random-sequence-number disable
ASA1:
static (inside,outside) tcp 132.1.69.100 80 132.1.29.100 80
static (inside,outside) tcp 132.1.69.100 443 132.1.29.100 443
!
! Time-range to match weekdays
!
time-range WEEKDAYS
periodic weekdays 00:00 to 23:59
!
! Access-Control Policy
!
access-list OUTSIDE_IN permit tcp any host 132.1.69.100 eq 80 time
WEEKDAYS
access-list OUTSIDE_IN permit tcp any host 132.1.69.100 eq 443 time
WEEKDAYS
ASA1:
!
! Static PAT
!
static (inside,outside) tcp 132.1.69.100 ftp 132.1.29.101 ftp
static (inside,outside) tcp 132.1.69.100 10021 132.1.29.101 10021
!
! Configure ACL to permit TCP connections on ports 21/10021
!
access-list OUTSIDE_IN extended permit tcp any host 132.1.69.100 eq ftp
access-list OUTSIDE_IN extended permit tcp any host 132.1.69.100 eq
10021
!
! Match port 10021
!
class-map FTP_10021
match port tcp eq 10021
!
! Inspect FTP on port 10021
!
policy-map global_policy
class FTP_10021
inspect ftp
R2:
ip alias 132.1.29.100 80
ip alist 132.1.29.101 21
Rack4R6#telnet 132.1.69.100 80
Trying 132.1.69.100, 80 ...
% Connection refused by remote host
Rack4R6#telnet 132.1.69.100 21
Trying 132.1.69.100, 21 ...
% Connection refused by remote host
Rack4R2#
TCP: sending RST, seq 0, ack 2814639545
TCP: sent RST to 132.1.69.6:11034 from 132.1.29.100:80
Rack4R2#
TCP: connection attempt to port 0
TCP: sending RST, seq 0, ack 1296412693
TCP: sent RST to 132.1.69.6:11035 from 132.1.29.100:21
Rack4R2#
TCP: connection attempt to port 0
TCP: sending RST, seq 0, ack 753709533
TCP: sent RST to 132.1.69.6:11036 from 132.1.29.100:10021
Rack4R2#
TCP: connection attempt to port 0
TCP: sending RST, seq 0, ack 2841358415
TCP: sent RST to 132.1.69.6:11037 from 132.1.29.100:443
!
! Two regexps to match EXE/DLL files. Notice the use of []
! for lower/upper case matching.
!
regex EXE ".*\.[eE][xX][eE]"
regex DLL ".*\.[dD][lL][lL]"
!
! Class-map that matches any of DLL/EXE files
!
class-map type regex match-any BANNED_FILES
match regex EXE
match regex DLL
!
! FTP-specific inspection map
! Matches PUT command along with filenames *.EXE/*.DLL
!
class-map type inspect ftp match-all FTP_BANNED_FILES
match filename regex class BANNED_FILES
match request-command put
!
! FTP-specific inspection policy. Reset on upload attempts
! for files named *.exe/*.dll
!
policy-map type inspect ftp FTP_POLICY
parameters
class FTP_BANNED_FILES
reset
!
! Apply FTP policy to global FTP inspection rule
!
policy-map global_policy
class inspection_default
inspect ftp strict FTP_POLICY
!
! Regexp to match domain cyberspam.org
!
regex SPAM_DOMAIN "cyberspam.org"
!
! SMTP inspection policy
!
policy-map type inspect esmtp SMTP_POLICY
!
! Log local-domain violations
!
parameters
mail-relay INE.com action log
!
! Reset connection for offending transactions
!
match invalid-recipients count gt 10
reset
!
! Drop connection containing a message from “cyberspam.org”
!
match sender-address regex SPAM_DOMAIN
drop-connection
!
! Apply ESMTP inspection policy globally
!
policy-map global_policy
class inspection_default
no inspect esmtp
inspect esmtp SMTP_POLICY
Global policy:
Service-policy: global_policy
Class-map: inspection_default
Inspect: esmtp SMTP_POLICY, packet 0, drop 0, reset-drop 0
mask-banner, count 0
mail-relay domain INE.com, log 0
match invalid-recipients count gt 10
reset, packet 0
match sender-address regex SPAM_DOMAIN
drop-connection, packet 0
Global policy:
Service-policy: global_policy
Class-map: inspection_default
Inspect: ftp strict FTP_POLICY, packet 0, drop 0, reset-drop 0
Global policy:
Service-policy: global_policy
Class-map: inspection_default
Inspect: dns preset_dns_map, packet 0, drop 0, reset-drop 0
Inspect: ftp strict FTP_POLICY, packet 0, drop 0, reset-drop 0
Inspect: h323 h225 _default_h323_map, packet 0, drop 0, reset-
drop 0
Inspect: h323 ras _default_h323_map, packet 0, drop 0, reset-drop
Inspect: netbios, packet 0, drop 0, reset-drop 0
Inspect: rsh, packet 0, drop 0, reset-drop 0
Inspect: rtsp, packet 0, drop 0, reset-drop 0
Inspect: skinny, packet 0, drop 0, reset-drop 0
Inspect: sqlnet, packet 0, drop 0, reset-drop 0
Inspect: sunrpc, packet 0, drop 0, reset-drop 0
Inspect: tftp, packet 0, drop 0, reset-drop 0
Inspect: sip, packet 0, drop 0, reset-drop 0
Inspect: xdmcp, packet 0, drop 0, reset-drop 0
Inspect: esmtp SMTP_POLICY, packet 0, drop 0, reset-drop 0
R5:
!
! Inspection rule for TCP/UDP traffic
!
ip inspect name INSPECT tcp
ip inspect name INSPECT udp
ip inspect name INSPECT icmp router-traffic
!
ip access-list extended FROM_BB2
!
! OSPF, IGP Routing Traffic
!
permit ospf any any
!
! HTTP access
!
permit tcp any any eq www
!
! SSH access
!
deny tcp 192.10.4.0 0.0.0.255 any eq 22
permit tcp any any eq 22
!
deny ip any any log
!
! Apply ACL and inspection rule
!
interface FastEthernet0/0
ip access-group FROM_BB2 in
ip inspect INSPECT out
R5:
ip inspect tcp idle-time 1800
ip inspect udp idle-time 180
ip inspect dns-timeout 10
Note
Check global CBAC timeouts using the show command. Next, initiate some
traffic from behind R5 and off R5 itself and make sure it creates CBAC sessions.
Rack4R3#telnet 192.10.4.254
Trying 192.10.4.254 ... Open
+-----------------------------------------------------------------------+
| |
| Welcome to BB2. These commands are available for use at privilege 0 |
| |
| ping show ip bgp |
| telnet show ip bgp neighbors |
| traceroute show ip bgp summary |
| show ip route show ip interface brief |
| show ip protocols |
| |
| The reference configuration for this device is available at: |
| http://www.internetworkexpert.com/downloads/bb2.txt |
| |
+-----------------------------------------------------------------------+
SC.9.9.BB2>
Rack4R5#ping 192.10.4.254
Look at the ingress access-list and notice the matches for OSPF protocol traffic.
R4:
!
! Configure NAT inside/outside interfaces
!
interface Serial0/0.1234
ip nat enable
!
interface FastEthernet0/0
ip nat enable
!
interface Serial0/1
ip nat enable
!
! Redistribute static subnets describing NAT pools
!
router ospf 1
redistribute static subnets
!
! NAT pool with the “add-route” option
!
ip nat pool NAT_POOL 132.1.255.1 132.1.255.101 prefix-length 24 add-
route
!
! Source list for dynamic NAT
!
ip access-list extended VLAN4
permit ip 132.1.4.0 0.0.0.255 any
!
! Dynamic NAT rule
!
ip nat source list VLAN4 pool NAT_POOL
!
! Static PAT for the HTTP/FTP servers
!
ip nat source static tcp 132.1.4.101 20 132.1.255.100 20
ip nat source static tcp 132.1.4.101 21 132.1.255.100 21
ip nat source static tcp 132.1.4.100 80 132.1.255.100 80
ip nat source static tcp 132.1.4.100 443 132.1.255.100 443
Note
Turn SW1 into a host temporarily. Don’t forget to bring it back to the original
configuration after that.
SW1:
no ip routing
ip default-gateway 132.1.4.4
!
interface Vlan 4
ip address 132.1.4.7 255.255.255.0
Ping R3 from SW1 and check the NAT NVI translation table on R4 after that.
Notice the translated IP address for SW1’s IP.
Rack4SW1#clear arp-cache
Rack4SW1#ping 150.4.3.3
R6:
!
! Make sure CEF is enabled globally
!
ip cef
!
! Enable uRPF
!
interface Serial0/0/0
ip verify unicast reverse-path allow-self-ping
Rack4R6#ping 54.4.2.6
R3:
!
! ISAKMP policy, changing ISAKMP SA lifetime
!
crypto isakmp policy 100
authentication pre-share
lifetime 2400
!
! ISAKMP pre-shared key
!
crypto isakmp key CISCO address 150.4.4.4
!
! IPsec transform
!
crypto ipsec transform-set DES_MD5 esp-des esp-md5-hmac
R4:
!
! ISAKMP policy, changing ISAKMP SA lifetime
!
crypto isakmp policy 100
authentication pre-share
lifetime 2400
!
! ISAKMP pre-shared key
!
crypto isakmp key CISCO address 150.4.3.3
!
! IPsec transform
!
crypto ipsec transform-set DES_MD5 esp-des esp-md5-hmac
interface: Tunnel0
Crypto map tag: Tunnel0-head-0, local addr 150.4.3.3
<snip>
Check that the VPN routes are received over Tunnel0 interface. Ensure
connectivity exists between the two segments.
!
! Group policy for VPN users
!
group-policy CCIELAB internal
group-policy CCIELAB attributes
dns-server value 132.1.29.50
vpn-idle-timeout 1800
default-domain value INE.com
address-pools value CCIEPOOL
!
! Tunnel group for VPN users, group password is configured here
! By default local client authentication (xauth) is enabled
!
tunnel-group CCIELAB type remote-access
tunnel-group CCIELAB ipsec-attributes
pre-shared-key CISCO
!
! Assign the group policy to tunnel-group
!
tunnel-group CCIELAB general-attributes
default-group-policy CCIELAB
!
! Username for local authentication
!
username CCIEUSER password CISCO
!!!!!!!!!!!!!!!!!!!!!!!
!
! IPsec settings !
!
!!!!!!!!!!!!!!!!!!!!!!!
!
! Crypto transform
!
crypto ipsec transform-set 3DES_MD5 esp-3des esp-md5-hmac
!
! Dynamic crypto map for dynamic connections
!
crypto dynamic-map DYNAMIC 10 set transform-set 3DES_MD5
!
! Actual crypto map only uses dynamic crypto map
!
crypto map VPN 10 ipsec-isakmp dynamic DYNAMIC
crypto map VPN interface outside
!
! ISAKMP configuration follows
!
crypto isakmp enable outside
crypto isakmp policy 10
authentication pre-share
encryption 3des
hash sha
group 2
Note
To perform the testing, configure SW2 to relocate the Test PC into VLAN69. After
this, configure the Cisco VPN client in the Test PC with the information to
connect to ASA1:
SW2:
interface Fa0/20
switchport host
switchport access vlan 69|
Test PC:
After you have launched the VPN client, select Connections > New and
create a new entry.
When you’re done, connect to the firewall and authenticate using the
username/password pair CCIEUSER/CISCO. After this, check the VPN sessions
in the firewall. Pay attention to the cipher/hash used for the IPSec session.
Username : CCIEUSER
Index : 1
Assigned IP : 10.255.255.1 Public IP : 132.1.69.200
Protocol : IPSec Encryption : 3DES
Hashing : SHA1
Bytes Tx : 0 Bytes Rx : 5415
Client Type : WinNT Client Ver : 4.8.01.0300
Group Policy : CCIELAB
Tunnel Group : CCIELAB
Login Time : 15:07:25 UTC Thu Mar 18 1993
Duration : 0h:00m:51s
Filter Name :
NAC Result : N/A
Posture Token:
Now that you know the remote client IP address you can ping it from ASA1.
Check the IPSec SA statistics to make 100% your traffic is encrypted.
<snip>
R1:
!
! ISAKMP policy
!
crypto isakmp policy 100
encr 3des
authentication pre-share
!
! Pre-shared key for R6
!
crypto isakmp key CISCO address 150.4.6.6
!
! IPsec transform-set, uses transport mode for minimum overhead
!
crypto ipsec transform-set 3DES_SHA_TRANS esp-3des esp-sha-hmac
mode transport
!
! Traffic to encrypt
!
ip access-list extended PINGS
permit icmp host 150.4.1.1 host 150.4.6.6
!
crypto map ENCRYPT_PINGS local-address Loopback0
crypto map ENCRYPT_PINGS 10 ipsec-isakmp
set peer 150.4.6.6
set transform-set 3DES_SHA_TRANS
match address PINGS
!
! Apply the crypto map
!
interface Serial0/0.1234
crypto map ENCRYPT_PINGS
R6:
!
! ISAKMP settings
!
crypto isakmp policy 10
encr 3des
authentication pre-share
!
! Pre-shared key for R1
!
crypto isakmp key CISCO address 150.4.1.1
!
! IPsec transform-set, uses transport mode for minimum overhead
!
crypto ipsec transform-set 3DES_SHA_TRANS esp-3des esp-sha-hmac
mode transport
!
! Traffic to encrypt
!
ip access-list extended PINGS
permit icmp host 150.4.6.6 host 150.4.1.1
!
! Crypto map
!
crypto map ENCRYPT_PINGS local-address Loopback0
crypto map ENCRYPT_PINGS 10 ipsec-isakmp
set peer 150.4.1.1
set transform-set 3DES_SHA_TRANS
match address PINGS
!
interface FastEthernet0/0
crypto map ENCRYPT_PINGS
We are not allowed to modify the outside access-list in the ASA, so we use
IPSec pass-through inspection. It dynamically opens holes for the IPSec
sessions.
ASA1:
policy-map global_policy
class inspection_default
inspect ipsec-pass-thru
!
! Static mapping required since we enabled dynamic NAT earlier
! R1 should translate to itself
!
static (inside,outside) 150.4.1.1 150.4.1.1
interface: Serial0/0.1234
Crypto map tag: ENCRYPT_PINGS, local addr. 150.4.1.1
protected vrf:
local ident (addr/mask/prot/port): (150.4.1.1/255.255.255.255/1/0)
remote ident (addr/mask/prot/port): (150.4.6.6/255.255.255.255/1/0)
current_peer: 150.4.6.6:500
PERMIT, flags={origin_is_acl,}
#pkts encaps: 9, #pkts encrypt: 9, #pkts digest 9
#pkts decaps: 9, #pkts decrypt: 9, #pkts verify 9
#pkts compressed: 0, #pkts decompressed: 0
#pkts not compressed: 0, #pkts compr. failed: 0
#pkts not decompressed: 0, #pkts decompress failed: 0
#send errors 6, #recv errors 0
R2:
!
! ISAKMP settings
!
crypto isakmp policy 50
encr 3des
hash md5
group 2
authentication pre-share
!
! Group pre-shared keys to authenticate any group member
!
crypto isakmp key CISCO address 150.4.0.0 255.255.0.0
!
! GET VPN transform set to be pushed down to the members
!
crypto ipsec transform-set GETVPN_TS esp-3des esp-md5-hmac
!
! GET VPN profile that specifies the transform set
!
crypto ipsec profile GETVPN_PROFILE
set transform-set GETVPN_TS
!
! The RSA key needs to be generated in the server for key signing
!
crypto key generate rsa general-keys label GETVPN_KEYS modulus 512
exportable
!
! Access-list that specifies the protected traffic
!
access-list 100 permit ip 150.4.0.0 0.0.255.255 239.0.0.0 0.255.255.255
!
! GDOI group settings
!
crypto gdoi group GETVPN_GROUP
identity number 1234
server local
rekey authentication mypubkey rsa GETVPN_KEYS
rekey transport unicast
sa ipsec 1
profile GETVPN_PROFILE
match address ipv4 100
replay time window-size 5
R3:
crypto isakmp policy 50
encr 3des
hash md5
authentication pre-share
group 2
!
! PSK to authenticate with the server
!
crypto isakmp key CISCO address 150.4.2.2
!
crypto gdoi group GETVPN_GROUP_GM
identity number 1234
server address ipv4 150.4.2.2
!
! Crypto map uses Loopback0 for ISAKMP session
! Set the GET VPN group that uses R2 as the server
!
crypto map GETVPN_MAP local-address Loopback0
crypto map GETVPN_MAP 10 gdoi
set group GETVPN_GROUP_GM
!
interface Serial1/0.1234
crypto map GETVPN_MAP
R4:
crypto isakmp policy 50
encr 3des
hash md5
authentication pre-share
group 2
Rekeys received
Cumulative : 0
After registration : 0
TEK POLICY:
Serial1/0.1234:
IPsec SA:
sa direction:inbound
spi: 0xD4632445(3563267141)
transform: esp-3des esp-md5-hmac
sa timing:remaining key lifetime (sec): (2230)
Anti-Replay(Time Based) : 5 sec interval
IPsec SA:
sa direction:outbound
spi: 0xD4632445(3563267141)
transform: esp-3des esp-md5-hmac
sa timing:remaining key lifetime (sec): (2230)
Anti-Replay(Time Based) : 5 sec interval
Rekeys received
Cumulative : 0
After registration : 0
TEK POLICY:
Serial0/0.1234:
IPsec SA:
sa direction:inbound
spi: 0xD4632445(3563267141)
transform: esp-3des esp-md5-hmac
sa timing:remaining key lifetime (sec): (1902)
Anti-Replay(Time Based) : 5 sec interval
IPsec SA:
sa direction:outbound
spi: 0xD4632445(3563267141)
transform: esp-3des esp-md5-hmac
sa timing:remaining key lifetime (sec): (1902)
Anti-Replay(Time Based) : 5 sec interval
Now join R4 Loopback0 interface to the group address 239.1.1.1 and ping this
address off R3. Ensure you receive responses to the ping requests.
R4:
interface Loopback0
ip igmp join-group 239.1.1.1
Check IPSec SAs in R3 and R3. Confirm the R3 encrypts the multicast packets
and R4 decrypts them.
interface: Serial1/0.1234
Crypto map tag: GETVPN_MAP, local addr 150.4.3.3
<snip>
interface: Serial0/0.1234
Crypto map tag: GETVPN_MAP, local addr 150.4.4.4
<snip>
!
! Create two authentication lists for the HTTP server
! and the console line.
!
aaa authentication login HTTP group tacacs+
aaa authentication login CONSOLE none
!
! Authorize exec via TACACS+. To manage the router user
! needs exec privilege-level of 15 when accessing via HTTP
!
aaa authorization exec default group tacacs+
!
! TACACS+ server communication settings
!
ip tacacs source-interface Loopback0
tacacs-server host 10.0.0.100 key CISCO
!
! Enable HTTP server and configure authentication settings
!
ip http server
ip http port 8080
ip http authentication aaa login-authentication HTTP
line console 0
login authentication CONSOLE
ACS:
Step 1:
Start by adding R5 as a TACACS+ client to the ACS server. Run the ACS Admin
utility, select Network Configuration and click the Add Entry button. Fill in
the fields according to the screenshot below, then click the Submit + Restart
button.
Step 2:
Click the User Setup button, then enter the name “R5WEB” and click the
Add/Edit button. Set the Password field on the next page to “CISCO” and
confirm the password.
Step 3:
Enable the following TACACS+ settings in the user’s profile. (Make sure they are
enabled for user’s profile in the ACS interface configuration). On the TACACS+
Settings section of the page check the Shell (exec) checkbox and set the
Privilege Level field to 15.
Rack4R5#debug tacacs
TACACS access control debugging is on
Note
Note
The router sends the password entered by the user back to the server:
The local router prepares and sends an authorization request for the “shell” of the
new user.
The server responds with the priv-lvl=15 AV pair, instructing to put the user onto
the highest privilege level. This finishes the authentication/authorization process.
!
! Authenticate login and authorize exec via TACACS+
!
aaa authentication login default group tacacs+
aaa authorization exec default group tacacs+
!
! TACACS+ server
!
ip tacacs source-interface Loopback0
tacacs-server host 10.0.0.100 key CISCO
!
! Assign specified commands to level 2
!
privilege exec level 2 undebug all
privilege exec all level 2 debug
!
! Safeguard the console
!
aaa authentication login CONSOLE none
line console 0
login authentication CONSOLE
ACS:
Step 1:
Add a new AAA client to the ACS server. Start the ACS Admin utility, click the
Network Configuration button and then click the Add Entry button. Fill the
fields according to the screenshot below and click the Submit + Apply button.
Step 2:
Add new user named “USER1” and specify the exec auto-command. Click the
User Setup button enter the name “USER1” and click the Add/Edit button.
Specify the password value of “CISCO” on the next screen. Under the TACACS+
Settings section of the profile fill the fields according to the screenshot below.
When done, click the Submit button.
Step 2:
Add another user named “USER2” with the shell exec privilege level of 2. Click
User Setup, enter the name “USER2” and click the Add/Edit button. On the
next screen, set the Password field to “CISCO” and set the values under
TACACS+ Settings section of the profile per the screenshot below:
Note
The effect of “no hangup” options is that your telnet session is not disconnected
after the auto-command has been executed. Try this by connecting to R2 and
logging in as USER1.
Rack4R2#telnet 150.4.3.3
Trying 150.4.3.3 ... Open
Username: USER1
Password: CISCO
After this, the system prompts you to login once again. Login as USER2 and
check your privilege level. Make sure you have access to debug and undebug
commands.
Username: USER2
Password: CISCO
Rack4R3#show privilege
Current privilege level is 2
Rack4R3#debug ?
IUA ISDN adaptation Layer options
aaa AAA Authentication, Authorization and
Accounting
aal2_xgcpspi AAL2_XGCP Service Provider Interface.
<output omitted>
Rack4R3#undebug ?
all Enable all debugging
call Call Information
<output omitted>
!
! Authenticate users and authorize exec locally
!
aaa authentication login default local
aaa authorization exec default local
!
! Users
!
username NOC privilege 0 password 0 CISCO
username ADMIN privilege 15 password 0 CISCO
!
! Level 1 enable secret
!
enable secret level 1 LEVEL1
!
! Safeguard the console line
!
aaa authentication login CONSOLE none
!
line console 0
login authentication CONSOLE
Username: ADMIN
Password: CISCO
Rack4R6#show privilege
Current privilege level is 15
Username: NOC
Password: CISCO
Rack4R6>show privilege
^
% Invalid input detected at '^' marker.
Rack4R6>?
Exec commands:
<1-99> Session number to resume
call Voice call
disable Turn off privileged commands
enable Turn on privileged commands
exit Exit from the EXEC
help Description of the interactive help system
logout Exit from the EXEC
Rack4R6>enable 1
Password: LEVEL1
Rack4R6>show privilege
Current privilege level is 1
R1:
class-map type port-filter match-all CLOSED_PORTS
match closed-ports
match not port tcp 2001
match not port tcp 7001
!
class-map match-all ROUTING_TRAFFIC
match access-group name ROUTING_TRAFFIC
!
!
policy-map COPP
class ROUTING_TRAFFIC
class class-default
police rate 10000 pps
!
policy-map type port-filter PORT_FILTER
class CLOSED_PORTS
drop
!
control-plane host
service-policy type port-filter input PORT_FILTER
!
control-plane
service-policy input COPP
Note
Check the active control plan features and packet counters for each sub-
interface.
--------------------------------------------------------
Control-plane Policing activated Apr XX 200X 01:0
--------------------------------------------------------
--------------------------------------------------------
TCP/UDP Portfilter activated Apr XX 200X 01:0
--------------------------------------------------------
Check the open ports in R1 and confirm that 2001 and 7001 are not auto-
detected (even though the rotary feature is configured):
R6:
snmp-server engineID remote 10.0.0.100 ABCD12345678
snmp-server group TRAP v3 priv
snmp-server user TRAP TRAP remote 10.0.0.100 v3 auth sha CISCO priv
3des CISCO
snmp-server host 10.0.0.100 informs version 3 priv TRAP
!
snmp-server enable traps envmon temperature
ASA1:
access-list OUTSIDE_IN permit udp any any eq 162
R6:
logging history informational
snmp-server enable traps syslog
Rack4R6# conf t
Enter configuration commands, one per line. End with CNTL/Z.
Rack4R6(config)#exit
%SYS-5-CONFIG_I: Configured from console by console
Rack4R6#show snmp
Chassis: FTX1128F0GA
0 SNMP packets input
0 Bad SNMP version errors
0 Unknown community name
0 Illegal operation for community name supplied
0 Encoding errors
0 Number of requested variables
0 Number of altered variables
0 Get-request PDUs
0 Get-next PDUs
0 Set-request PDUs
0 Input queue packet drops (Maximum queue size 1000)
4 SNMP packets output
0 Too big errors (Maximum packet size 1500)
0 No such name errors
0 Bad values errors
0 General errors
0 Response PDUs
0 Trap PDUs
SNMP Dispatcher:
queue 0/75 (current/max), 0 dropped
SNMP Engine:
queue 0/1000 (current/max), 0 dropped
In this solution, we show you how to reset the sensor. First off you erase the
current configuration and reboot the sensor. Then you configure network
settings, including the hostname and the IP address.
ips# reset
Warning: Executing this command will stop all applications and reboot
the node.
Continue with reset? []: yes
sensor# conf t
sensor(config)# service host
sensor(config-hos)# network-settings
sensor(config-hos-net)# host-ip 132.1.170.10/24,132.1.170.1
sensor(config-hos-net)# login-banner-text "Welcome to IPS"
sensor(config-hos-net)# host-name Rack4IPS
sensor(config-hos-net)# exi
sensor(config-hos)# exi
Apply Changes:?[yes]: yes
IPS:
Rack4IPS# conf t
Rack4IPS(config)# service host
Rack4IPS(config-hos)# network-settings
Rack4IPS(config-hos-net)# access-list 10.0.0.0/24
Rack4IPS(config-hos-net)# telnet-option enabled
Rack4IPS(config-hos-net)# exit
Rack4IPS(config-hos)# exit
Apply Changes:?[yes]: yes
Rack4IPS(config)#
SW2:
monitor session 1 source interface FastEthernet 0/14 both
monitor session 1 destination interface FastEthernet 0/10
IPS:
Rack4IPS# conf t
Rack4IPS(config)# service interface
Rack4IPS(config-int)# physical-interfaces GigabitEthernet0/0
Rack4IPS(config-int-phy)# admin-state enabled
Rack4IPS(config-int-phy)# exit
Rack4IPS(config-int)# exit
Apply Changes:?[yes]: yes
Rack4IPS(config)# service analysis-engine
Rack4IPS(config-ana)# virtual-sensor vs0
Rack4IPS(config-ana-vir)# physical-interface GigabitEthernet0/0
Rack4IPS(config-ana-vir)# exit
Rack4IPS(config-ana)# exit
Apply Changes:?[yes]: yes
"Welcome to IPS"
login: cisco
Password: ciscoids4210
<snip>
Rack4IPS#
Now check that the interface is actually being monitored. Using CLI, enable the
ICMP echo signature in the IPS:
Rack4IPS# conf t
Rack4IPS(config)# service signature-definition sig0
Rack4IPS(config-sig)# signatures 2004 0
Rack4IPS(config-sig-sig)# status
Rack4IPS(config-sig-sig-sta)# enabled true
Rack4IPS(config-sig-sig-sta)# exit
Rack4IPS(config-sig-sig)# exit
Rack4IPS(config-sig)# exit
Apply Changes?[yes]: yes
Now ping ASA2’s outside interface from SW1 and make sure the alert is
produced and stored in the event store:
Rack4SW1#ping 132.1.137.113
IPS:
For this task, we’ll configure network access using CLI. First, we set up the
“never-block” host, under the general sub-section of network-access section.
Rack4IPS# conf t
Rack4IPS(config)# service network-access
Rack4IPS(config-net)# general
Rack4IPS(config-net-gen)# never-block-hosts 132.1.138.100
Rack4IPS(config-net-gen)# exit
Create a user-profile to access the ASA firewall. Include the username and the
password in the profile.
Now add two firewall devices to the IPS configuration. The devices correspond to
the firewall contexts in ASA2. Attach the user profile created to every device and
configure SSH as the communication protocol.
The last thing to do is import the public keys of every context’s SSH server in the
public key ring of the IPS. This will allow the IPS connecting to the virtual
firewalls using SSH.
Start the IPS Device Manager GUI interface and navigate to Configuration panel.
Select Policies > Event Action Rules > rules0 and then click on the
Target Value Rating tab.
Click the Add button and fill the fields according to the screenshot below.
Now click on the Event Action Override tab and click the Add button. Fill
the fields according to the screenshot below and click OK when done.
Click the Apply button when you done configuring Event Processing Rules.
RR = (Fidelity*Severity*TVR)/(100*100).
Target Value Ratings (TVR) values are as follows: low (75), medium (100), high
(150), mission-critical (200). You assign them to the company’s assets, identified
by the IP addresses. Default TVR value is medium (100).
Signature severity values are: info (25), low (50), medium (75), high (100). They
describe how dangerous the attack is. They are part of signature definition.
Finally, fidelity values tell how well a signature “recognizes” the corresponding
attack. They are also a part of signature definition and range from 0 to 100.
The “ICMP Echo” signature has severity value of 25 and fidelity rating value of
100 by default. We are not allowed to change those per the task requirements.
Therefore, to get into the 50-100 corridor for the “low severity” and the “high
fidelity” signature we should assign TVR of “mission-critical” for subnet
132.X.138.0/24.
Rack4SW1#ping 132.1.138.8
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 132.1.138.8, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
The second alert is a summary generated for 5 ICMP echo packets across the
default summarization interval.
riskRatingValue: attackRelevanceRating=relevant
targetValueRating=mission-critical 60
threatRatingValue: 60
interface: ge0_0
protocol: icmp
Now login to ASA2 firewall, into any context, and check the active shuns. There
should be one installed for SW1.
R1:
!
! CEF is required to match protocols
! (should be already enable though)
!
ip cef
!
! Class-map to match URL containing the patterns
!
class-map match-any VIRUS
match protocol http url "*root.exe"
match protocol http url "*cmd.exe"
!
! Drop virus HTTP traffic
!
policy-map MITIGATE
class VIRUS
drop
!
! Apply the service policy
!
interface Serial FastEthernet0/0
service-policy input MITIGATE
Notice the reverse logic of matching the SNMP packets. We deny the legitimate
SNMP packets in the access-list and permit all other SNMP packets. Next, we
configure a VLAN ACL that drops the packets matching the access-list and
forwards everything else (don’t forget the trailing forward entry, or all non-
matching IP traffic will be dropped).
!
! Take care to drop only SNMP traffic to VLAN137, not the transit SNMP
!
permit udp any 132.1.137.0 0.0.0.255 eq snmp
deny ip any any
!
! VLAN filter configuration
!
vlan access-map SNMP_SECURITY 10
action drop
match ip address SNMP_TO_VLAN137
!
vlan access-map SNMP_SECURITY 20
action forward
!
! Apply VLAN filter
!
vlan filter SNMP_SECURITY vlan-list 137
R1:
aaa new-model
!
! Authenticate login via TACACS+ and configure
! safeguard settings for the console
!
aaa authentication login default group tacacs+
aaa authentication login CONSOLE none
!
! TACACS+ server settings
!
ip tacacs source-interface Loopback0
tacacs-server host 10.0.0.100 key CISCO
!
! Generate RSA key-pair to activate SSH
!
ip domain name INE.com
!
crypto key generate rsa general modulus 512
!
! Enable SSH as input transport
!
line vty 0 4
transport input ssh
login authentication default
!
! Apply the AAA lists to the console
!
line console 0
login authentication CONSOLE
SW1:
aaa new-model
!
aaa authentication login default group tacacs+
aaa authentication login CONSOLE none
!
ip tacacs source-interface Loopback0
tacacs-server host 10.0.0.100 key CISCO
!
! Generate RSA keys
!
ip domain name INE.com
!
crypto key generate rsa general modulus 512
!
line vty 0 15
transport input ssh
login authentication default
!
line console 0
login authentication CONSOLE
ACS:
Step 1:
Add R1 and SW1 as the AAA Clients to the ACS. Run the ACS Admin utility,
click the Network Configuration button, and then click the Add Entry
button. Fill in the fields according to the screenshot below and click Submit +
Apply when done.
Repeat the same steps with SW1 using its Loopback0 IP address.
Step 2:
Add new user to the ACS database. Click the User Setup button, enter the
name “SSH” and click the Add/Edit button. Specify the Password value of
“CISCO” for this user and click Submit when you’re done.
Rack4SW1#telnet 150.4.1.1
Trying 150.4.1.1 ...
% Connection refused by remote host
Password: CISCO
Rack4R1>
Task 7.4
R6:
!
! Disable DHCP/BOOTP
!
no ip bootp server
no service dhcp
!
! Disable CDP/ProxyARP
!
interface FastEthernet0/0
no cdp enable
no ip proxy-arp
!
! Rate-Limit ICMP unreachables
!
ip icmp rate-limit unreachable 1000
!
banner login $
Access to this device or the attached networks is prohibited without
express written permission.
$
Rack4R6#
R6:
!
! Classify traffic
!
access-list 100 permit icmp any any echo
!
! Apply the input rate-limit
!
interface Serial0/0/0
rate-limit input access-group 100 128000 4000 4000 conf transmit
exceed drop
R2:
!
! Inject static routes into BGP
!
router bgp 100
redistribute static route-map STATIC_TO_BGP
!
! A /32 route used as next-hop to “drop” the packets
! It should be configured on every participating router.
!
ip route 192.0.2.1 255.255.255.255 null0
!
! Blackhole route, the one we want to screen
! In this case – source network, that will be
! filtered out by the virtue of CEF uRPF processing
!
ip route 115.0.0.0 255.0.0.0 null0 tag 100
!
! Route-map to signal RTHB information.
! The Origin and Local Pref are changed to ensure
! that injected route is always preferred
!
! No-Export community is used to contain the RTBH prefix within
! our AS. Match Tag is used for scalable route lookup.
!
! Set ip next-hop propagates the ‘Null next-hop to peers
!
route-map STATIC_TO_BGP permit 10
match tag 100
set local-preference 200
set origin igp
set community no-export
set ip next-hop 192.0.2.1
R6:
!
! A /32 route used as next-hop to “drop” the packets
! It should be configured on every participating router.
!
ip route 192.0.2.1 255.255.255.255 null0
!
! Ensure that CEF is on (it sure is, based on the previous tasks).
!
ip cef
!
! Enable uRPF on the edge, to drop packets based on source IP
! (Note that it has be already previously enabled).
!
interface Serial 0/0
ip verify unicast reverse-path
!
! Disable the ICMP unreachables
!
interface Null0
no ip unreachables
Rack4R6#show ip bgp
BGP table version is 17, local router ID is 150.4.6.6
Status codes: s suppressed, d damped, h history, * valid, > best, i -
internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Check the prefix 115.0.0.0/8 in R6’s RIB. Notice that is has the next-hop value of
192.0.2.1 and this prefix resolves to Null0. Thus the CEF entry for 115.0.0.0/8
points to Null0 as well.
The next part of the verification could not be performed on a rental rack, since
most likely you don’t have privileged exec access to BB1. However, we provide it
for the sake of clarity. When you ping off the interfaces with the IP 115.0.0.1 the
ping packets are dropped. When you ping off subnet 112.0.0.0/24 the packets
can reach the inside devices.
Note
The non-configured IPS sensor in this scenario breaks the network into two
segments. You need to configure the IPS appliance for inline monitoring to obtain
connectivity though the network. See the respective section for the IPS solutions.
!
! Create the Redundant interface and add members to it
!
interface redundant 8
member-interface Ethernet 0/1
member-interface Ethernet 0/0
!
! With redundant interfaces, nothing is configured on physical ones
!
interface Ethernet 0/0
no shutdown
!
interface Ethernet 0/1
no shutdown
!
! Configure the Redundant interface and sub-interface
!
interface redundant8
nameif IN
security-level 99
ip address 174.1.127.12 255.255.255.0
ospf authentication-key CISCO
ospf authentication
!
interface redundant8.124
vlan 124
nameif OUT
security-level 1
ip address 174.1.124.12 255.255.255.0
!
! Configure Unicast RPF for packets arriving on
! IN interface ip verify reverse-path interface IN
!
router ospf 1
network 174.1.127.12 255.255.255.255 area 51
default-information originate
!
! Since we didn’t use “default-information originate always”
! we need to ! have a default route for OSPF to advertise it.
!
route OUT 0 0 174.1.124.4
SW1:
!
! Configure dot1q trunking for the interface to ASA1. Make native VLAN
! 127 so that traffic passes untagged. Optionally we can set “portfast
! trunk” for direct transition of trunk to STP forwarding state.
!
interface FastEthernet 0/13
switchport trunk encap dot1q
switchport mode trunk
switchport trunk native vlan 127
spanning-tree portfast trunk
SW2:
interface FastEthernet 0/12
switchport trunk encap dot1q
switchport mode trunk
switchport trunk native vlan 127
spanning-tree portfast trunk
The IN interface of the ASA should pass untagged traffic, but still it should
represent VLAN 127. We need to make the native VLAN on trunk to be 127 for
both switches. Verify OSPF neighbor on the IN interface.
For Unicast RPF check testing purposes create a Loopback on switch 1 (make
sure not to advertise the Loopback subnet into OSPF), ping the ASA inside
interface and check the dropped packets. Make sure to remove the Loopback
after test.
!
! Access-list used to advertise only the default route
!
access-list DEFAULT_ROUTE permit host 0.0.0.0
!
! Access-list used to advertise everything but the default route
!
access-list NO_DEFAULT_ROUTE deny host 0.0.0.0
access-list NO_DEFAULT_ROUTE permit any
!
! Configure RIP filtering and originate default route
!
router rip
version 2
no auto-summary
network 174.1.0.0
network 192.10.4.0
default-information originate
distribute-list NO_DEFAULT_ROUTE out interface VLAN135
distribute-list DEFAULT_ROUTE out interface VLAN132
!
! Configure RIP MD5 authentication
!
interface Ethernet 0/0
rip authentication key CISCO key 1
rip authentication mode md5
!
interface Ethernet 0/1
rip authentication key CISCO key 1
rip authentication mode md5
Confirm that R5 receives RIP updates from the ASA, but not the default route
and make sure that BB2 receives the default route. Since access to BBS is
forbidden, one way to test that BB2 gets the default route from ASA2 is to create
a Loopback on R5 (DO NOT advertise it into RIP) and ping the BB2 subnet with
source Loopback. For ICMP to work we need to permit it through ASA2. Make
sure to remove the testing configuration afterwards.
ASA1:
!
! Use the hostnames instead of IPs in the access-lists
!
name 174.1.124.100 ACS_POST_NAT_IP
name 10.0.0.100 ACS_PRE_NAT_IP
name 174.1.124.6 R6_POST_NAT_IP
name 150.4.6.6 R6_PRE_NAT_IP
name 150.4.5.5 R5
!
! Configure static NAT for R6 Loopback and ACS
!
static (IN,OUT) ACS_POST_NAT_IP ACS_PRE_NAT_IP 250 200 udp 300
static (IN,OUT) R6_POST_NAT_IP R6_PRE_NAT_IP
!
access-list OUTSIDE_IN permit tcp any host ACS_POST_NAT_IP eq 49
access-list OUTSIDE_IN permit udp any host ACS_POST_NAT_IP eq 1645
access-list OUTSIDE_IN permit udp any host ACS_POST_NAT_IP eq 1646
access-list OUTSIDE_IN permit udp any host ACS_POST_NAT_IP eq 1812
access-list OUTSIDE_IN permit udp any host ACS_POST_NAT_IP eq 1813
access-list OUTSIDE_IN permit tcp host R5 host 174.1.124.6 eq bgp
access-list OUTSIDE_IN permit icmp any any echo
access-list OUTSIDE_IN permit icmp any any echo-reply
!
access-group OUTSIDE_IN in interface OUT
ASA1:
! First create both object-groups
object-group network HOSTS1
network-object host 10.0.0.100
network-object host 10.0.0.101
!
object-group network HOSTS2
network-object host 10.0.0.200
network-object host 10.0.0.201
!
! Configure the nested object-group
object-group network HOSTS
group-object HOSTS1
group-object HOSTS2
!
! Call the nested object-group in the ACL
access-list INSIDE_IN deny icmp object-group HOSTS any echo
access-list INSIDE_IN permit ip any any
!
access-group INSIDE_IN in interface IN
ASA2:
static (VLAN132,VLAN135) 174.1.135.200 192.10.4.200
!
! Permit traffic on ports 25 and 2525 for SMTP server
!
access-list OUTSIDE_IN permit tcp any host 174.1.135.200 eq 25
access-list OUTSIDE_IN permit tcp any host 174.1.135.200 eq 2525
access-group OUTSIDE_IN in interface VLAN135
!
! Create the class-map for port TCP 2525 matching
!
class-map SMTP_PORT_2525
match port tcp eq 2525
!
! Apply inspection policy for ESMTP on port 2525
!
policy-map global_policy
class SMTP_PORT_2525
inspect esmtp
Global policy:
Service-policy: global_policy
Class-map: inspection_default
Inspect: esmtp _default_esmtp_map, packet 0, drop 0, reset-drop 0
mask-banner, count 0
match cmd line length gt 512
drop-connection log, packet 0
match cmd RCPT count gt 100
drop-connection log, packet 0
match body line length gt 998
log, packet 0
match header line length gt 998
drop-connection log, packet 0
match sender-address length gt 320
drop-connection log, packet 0
match MIME filename length gt 255
drop-connection log, packet 0
match ehlo-reply-parameter others
mask, packet 0
Class-map: SMTP_PORT_2525
Inspect: esmtp _default_esmtp_map, packet 0, drop 0, reset-drop 0
mask-banner, count 0
match cmd line length gt 512
drop-connection log, packet 0
match cmd RCPT count gt 100
drop-connection log, packet 0
match body line length gt 998
log, packet 0
match header line length gt 998
drop-connection log, packet 0
match sender-address length gt 320
drop-connection log, packet 0
match MIME filename length gt 255
drop-connection log, packet 0
match ehlo-reply-parameter others
mask, packet 0
ASA2:
!
! Permit HTTP and FTP control session
!
access-list OUTSIDE_IN permit tcp any host 192.10.4.75 eq 21
access-list OUTSIDE_IN permit tcp any host 192.10.4.75 eq 80
!
! Identify HTTP traffic and FTP data session
!
access-list DATA permit tcp host 192.10.4.75 eq 80 any
access-list DATA permit tcp host 192.10.4.75 eq 20 any
!
! Create class-maps to match traffic
!
class-map DATA
match access-list DATA
class-map VOICE
match rtp 16384 16383
class-map L2L_VPN_TRAFFIC
match tunnel-group Rack4ASA1.INE.com
match flow ip destination-address
!
class-map RA_VPN_TRAFFIC
match tunnel-group IPSECGROUP
match flow ip destination-address
!
! Create policy-map with required traffic restrictions
!
policy-map OUTSIDE
class DATA
police output 2000000
class VOICE
priority
class L2L_VPN_TRAFFIC
police output 512000
class RA_VPN_TRAFFIC
police output 64000
!
! Enable priority queuing on VLAN135 interface
!
priority-queue VLAN135
!
! Apply policy-map
service-policy OUTSIDE interface VLAN135
Interface VLAN135:
Service-policy: OUTSIDE
Class-map: DATA
Output police Interface VLAN135:
cir 2000000 bps, bc 62500 bytes
conformed 0 packets, 0 bytes; actions: transmit
Default Queueing
ASA2:
!
! Enable logging on the ASA. Be aware that it’s not enabled by default
! as on routers
!
logging enable
logging trap informational
!
! Facility 22 corresponds to LOCAL6; (16 corresponds to LOCAL0)
!
logging facility 22
!
! Set up syslog server and TCP protocol/port for communications
! 1470 is the default syslog port for TCP
!
! Configure logging on the translated address of AAA
!
logging host VLAN135 174.1.124.100 6/1470
ASA1:
! Configure permissions for syslog traffic to pass
access-list OUTSIDE_IN permit tcp host 174.1.135.13 host
ACS_POST_NAT_IP eq 1470
R5:
!
! Configure CBAC for telnet and smtp with audit-trail
!
ip inspect name MYCBAC telnet audit-trail on
ip inspect name MYCBAC smtp audit-trail on
!
! Enable logging to the ACS. Use Loopback 0 as source since from behind
! ASA1 Loopback0 is reachable.
!
logging host 174.1.124.100
logging trap info
logging on
logging source-interface loopback 0
!
! Create access-list to drop traffic TCP traffic on port 23 & 25 that
! is initiated by 192.10.4.50
!
ip access-list extended VLAN135_IN
deny tcp host 192.10.4.50 eq 23 any
deny tcp host 192.10.4.50 eq 25 any
permit ip any any
!
! Apply inspection in Outbound direction and ACL in inbound
!
interface fastEthernet 0/0
ip access-group VLAN135_IN in
ip inspect MYCBAC out
ASA2:
!
! Allow telnet and smtp traffic to pass through the ASA2, coming on
! VLAN135 interface
!
access-list OUTSIDE_IN permit tcp any host 192.10.4.50 eq 23
access-list OUTSIDE_IN permit tcp any host 192.10.4.50 eq 25
ASA1:
!
! Allow syslog traffic from R5 Loopback 0 to AAA server to pass through
! ASA1, coming on OUT interface
!
access-list OUTSIDE_IN permit udp host R5 host 174.1.124.100 eq 514
Rack4R4#telnet 192.10.4.254
Trying 192.10.4.254 ... Open
+---------------------------------------------------------------------+
|
|
| Welcome to BB2. These commands are available for use at privilege 0
|
| |
| ping show ip bgp
|
| telnet show ip bgp neighbors
|
| traceroute show ip bgp summary
|
| show ip route show ip interface brief
|
| show ip protocols
|
|
|
| The reference configuration for this device is available at:
|
| http://www.internetworkexpert.com/downloads/bb2.txt
|
|
|
+---------------------------------------------------------------------+
!
! Add the required port mapping only for the host in ACL 99
!
ip port-map ftp port 80 list 99
ip port-map http port 21 list 99
!
! Add additional inspections to the inspect from task 2.1
!
ip inspect name MYCBAC http
ip inspect name MYCBAC ftp
!
! Edit the ACL and enter in new deny statements.
!
ip access-list extended VLAN135_IN
no permit ip any any
deny tcp host 192.10.4.60 eq 21 any
deny tcp host 192.10.4.60 eq 80 any
permit ip any any
ASA2:
!
! Allow ftp control connection traffic from any host to 192.10.4.60 to
! pass through ASA2, coming on VLAN135 interface
!
access-list OUTSIDE_IN permit tcp any host 192.10.4.60 eq 21
access-list OUTSIDE_IN permit tcp any host 192.10.4.60 eq 80
!
! Configuration required only for passive FTP
! First identify FTP traffic in ACL
!
access-list FTP permit tcp any host 192.10.4.60 eq 80
!
! Create the class-map for matching non-default FTP traffic
!
class-map FTP_PORT_80
match access-list FTP
!
! Configure & apply inspection policy for FTP on port 80 only on
! VLAN135 interface
!
policy-map VLAN135
class FTP_PORT_80
inspect ftp
!
service-policy VLAN135 interface VLAN135
!
! Class-maps to identigy TCP/UDP/ICMP traffic
!
class-map type inspect TCP
match protocol tcp
class-map type inspect UDP
match protocol udp
class-map type inspect ICMP
match protocol icmp
!
! Policy for A to C zone traffic
!
policy-map type inspect A_TO_C
class TCP
inspect
class UDP
inspect
class ICMP
pass
!
! Policy for B to C zone traffic
!
policy-map type inspect B_TO_C
class TCP
inspect
class UDP
inspect
class ICMP
pass
!
! Policy for C to B zone traffic
!
policy-map type inspect C_TO_B
class ICMP
pass
!
! Policy for C to A zone traffic
!
policy-map type inspect C_TO_A
class ICMP
pass
!
! Policy for A to B zone traffic
!
policy-map type inspect A_TO_B
class ICMP
pass
!
! Policy for B to A zone traffic
!
policy-map type inspect B_TO_A
class ICMP
pass
!
! Define zone pairs and apply policy
!
zone-pair sec AB source A dest B
service-policy type inspect A_TO_B
!
zone-pair sec AC source A dest C
service-policy type inspect A_TO_C
!
zone-pair sec BA source B dest A
service-policy type inspect B_TO_A
!
zone-pair sec BC source B dest C
service-policy type inspect B_TO_C
!
zone-pair sec CA source C dest A
service-policy type inspect C_TO_A
!
zone-pair sec CB source C dest B
service-policy type inspect C_TO_B
!
! Assign zones to interfaces
interface fastEthernet 0/0
zone security A
!
interface FastEthernet 0/1
zone security B
!
! Different approaches to traffic classification
! Combined ACL classification
!
ip access-list extended ACS_SERVER
permit ip any host 10.0.0.100
!
ip access-list extended TACACS
permit tcp any any eq 49
!
! ACL + Match protocol
!
class-map type inspect match-all TACACS
match access-group name ACS_SERVER
match access-group name TACACS
!
class-map type inspect match-all RADIUS
match protocol radius
match access-group name ACS_SERVER
!
policy-map type inspect C_TO_A
class TACACS
inspect
class RADIUS
inspect
Rack4SW2#ping 174.1.38.3
Rack4SW2#ping 174.1.23.2
Rack4SW2#ping 174.1.23.2
Rack4SW2#telnet 174.1.23.2
Trying 174.1.23.2 ... Open
Password:
Rack4R2>
Rack4SW2#traceroute 174.1.23.2
Notice above that we have matching TCP traffic (telnet), ICMP traffic (PING) and
UDP traffic (UDP echo generated by traceroute) for zone BC and ICMP traffic for
zone CB (this ICMP is actually in response to the traceroute). Remember that
traceroute on Cisco is implemented using UDP Echo as initiator and ICMP as
response.
Rack4R2#ping 174.1.23.3
!
! Add port 3020 for telnet application, but first remove the mapping
! used on port 3020 for CIFS
!
access-list 99 permit any
!
no ip port-map cifs port tcp 3020
ip port-map telnet port 3020 list 99
!
class-map type inspect TELNET
match protocol telnet
!
! Class-map to match telnet traffic on both ports, 23 and 3020
class-map type inspect TELNET_PORT_3020
match protocol telnet
match access-group name TELNET_PORT_3020
!
! Enable audit-trail
parameter-map type inspect AUDIT
audit-trail on
!
! Policy-map for telnet inspection and audit trail for port 3020
!
! Remove and Add TCP to move it to the bottom of the policy.
!
no class type inspect TCP
class type inspect TCP
inspect
!
! Re-configure policy-maps to log ICMP passing through the firewall
! traffic
!
policy-map type inspect A_TO_C
class ICMP
pass log
!
policy-map type inspect A_TO_B
class ICMP
pass log
policy-map type inspect B_TO_C
class ICMP
pass log
policy-map type inspect B_TO_A
class ICMP
pass log
policy-map type inspect C_TO_A
class ICMP
pass log
policy-map type inspect C_TO_B
class ICMP
pass log
R2:
!
! Configure R2 to listen on port 3020 for telnet
!
line vty 15
rotary 20
password cisco
Since logging buffered is not configured on R3, the logging messages appeared
only on console. In the real lab it may be good idea to ask the proctor if allowed
to do logging buffered for logging tracking.
%FW-6-SESS_AUDIT_TRAIL_START: (target:class)-
(AC:TELNET_PORT_3020):Start telnet session: initiator (10.0.0.100:3050)
-- responder (174.1.23.2:3020)
%FW-6-SESS_AUDIT_TRAIL: (target:class)-(AC:TELNET_PORT_3020):Stop
telnet session: initiator (10.0.0.100:3050) sent 47 bytes -- responder
(174.1.23.2:3020) sent 76 bytes
%FW-6-LOG_SUMMARY: 4 packets were passed from 174.1.23.2:0 =>
10.0.0.100:8 (target:class)-(CA:ICMP)
%FW-6-LOG_SUMMARY: 4 packets were passed from 10.0.0.100:8 =>
174.1.23.2:0 (target:class)-(AC:ICMP
!
! Since for CA zone all inspections are specific(not general as all TCP
! traffic) we can append this one as well.
!
policy-map type inspect C_TO_A
class WEBSENSE
inspect
R6:
ip inspect name HTTP_FILTER http
!
! Configure “fail open”, so if server is down, HTTP traffic is still
! allowed
!
ip urlfilter allow-mode on
!
! Exclude the two domains
!
ip urlfilter exclusive-domain permit internetworkexpert.com
ip urlfilter exclusive-domain permit ine.com
ip urlfilter audit-trail
ip urlfilter server vendor websense 10.0.0.100
!
! Apply inspection
!
interface Serial 0/0/0
ip inspect HTTP_FILTER out
!
! Split-tunneling ACL
!
access-list SPLIT_TUNNEL permit ip 174.1.127.0 255.255.255.0 any
!
! Local address pool
!
ip local pool IPSECPOOL 10.105.105.1-10.105.105.50
!
! Group policy to specify split-tunneling & address pool
!
group-policy IPSECPOLICY internal
group-policy IPSECPOLICY attributes
split-tunnel-policy tunnelspecified
split-tunnel-network-list value SPLIT_TUNNEL
address-pools value IPSECPOOL
!
! Tunnel group for RA users, configure authentication & apply policy
!
tunnel-group IPSECGROUP type ipsec-ra
tunnel-group IPSECGROUP general-attributes
authentication-server-group RADIUS
default-group-policy IPSECPOLICY
!
! Group pre-shared key
!
tunnel-group IPSECGROUP ipsec-attributes
pre-shared-key CISCO
!
! ISAKMP policy
!
crypto isakmp policy 10
authentication pre-share
hash sha
encryption 3des
group 2
!
crypto isakmp enable OUT
!
! Transform-set
!
crypto ipsec transform-set 3DES_SHA esp-3des esp-sha-hmac
!
! Create dynamic crypto map and link it to static crypto map
!
crypto dynamic-map DYNAMIC 10 set transform-set 3DES_SHA
!
crypto map VPN 100 ipsec-isakmp dynamic DYNAMIC
!
! Apply crypto map on OUT interface
crypto map VPN interface OUT
!
! Permit VPN traffic to bypass input ACL
!
sysopt connection permit-vpn
ACS:
Step 1:
Step 2:
Add new user “IPSECUSER” to the ACS server. Click the User Setup button,
then enter the name “IPSECUSER” and click the Add/Edit button. On the next
page, specify the password value of “CISCO” and click the Submit button.
R5:
crypto isakmp policy 10
encr 3des
authentication pre-share
group 2
!
crypto ipsec client ezvpn ASA1
connect auto
group IPSECGROUP key CISCO
local-address FastEthernet0/1
mode client
peer 174.1.124.12
username IPSECUSER password CISCO
xauth userid mode local
!
! Identity hostname is needed to match the hostname in certificate
! for tunnel group lookup process. Otherwise, the CN is used.
!
crypto isakmp identity hostname
!
! Create IPsec transform-set
!
crypto ipsec transform-set AES256_MD5 esp-aes-256 esp-md5-hmac
!
! Configure domain-name and generate RSA key
!
domain-name INE.com
crypto key generate rsa general modulus 512
yes
!
! Sync time with the AAA/CA server
!
ntp server 10.0.0.100
!
! Configure CA trustpoint
!
crypto ca trustpoint IE1
enrollment url http://10.0.0.100/certsrv/mscep/mscep.dll
revocation-check none
!
! Tunnel-group for remote endpoint
!
tunnel-group Rack4ASA2.INE.com type ipsec-l2l
tunnel-group Rack4ASA2.INE.com ipsec-attributes
trust-point IE1
!
! Traffic to encrypt
!
access-list VLAN127_TO_VLAN132 permit ip 174.1.127.0 255.255.255.0
192.10.4.0 255.255.255.0
!
! Actual crypto-map (not the set trustpoint entry)
!
crypto map VPN 10 match address VLAN127_TO_VLAN132
crypto map VPN 10 set peer 174.1.135.13
crypto map VPN 10 set transform-set AES256_MD5
!
! Needed to initiate the VPN connection
!
crypto map VPN 10 set trustpoint IE1
!
crypto map VPN interface OUT
!
sysopt connection permit-vpn
!
! Authenticate and enroll with CA
!
crypto ca authenticate IE1
crypto ca enroll IE1
!
! Permit SCEP traffic from ASA2 VLAN135 interface to AAA server through
! ASA1
!
name 174.1.135.13 ASA2_VLAN135
access-list OUTSIDE_IN extended permit tcp host ASA2_VLAN135 host
ACS_POST_NAT_IP eq www
ASA2:
!
! Configure and enable ISAKMP
!
crypto isakmp policy 10
auth rsa-sig
hash sha
encryption 3des
group 2
!
crypto isakmp identity hostname
!
crypto isakmp enable VLAN135
!
! Create IPsec transform-set
!
crypto ipsec transform-set AES256_MD5 esp-aes-256 esp-md5-hmac
!
! Configure domain-name and generate RSA key
!
domain-name INE.com
crypto key generate rsa general modulus 512
!
! Sync time with the AAA/CA server
!
ntp server 174.1.124.100
!
! Configure CA trustpoint
!
crypto ca trustpoint IE1
enrollment url http://174.1.124.100/certsrv/mscep/mscep.dll
revocation-check none
!
! Tunnel-group for remote endpoint
!
tunnel-group Rack4ASA1.INE.com type ipsec-l2l
tunnel-group Rack4ASA1.INE.com ipsec-attributes
trust-point IE1
!
! Traffic to encrypt
!
access-list VLAN132_TO_VLAN127 permit ip 192.10.4.0 255.255.255.0
174.1.127.0 255.255.255.0
!
! The crypto-map
!
crypto map VPN 10 match address VLAN132_TO_VLAN127
crypto map VPN 10 set peer 174.1.124.12
crypto map VPN 10 set trustpoint IE1
crypto map VPN 10 set transform-set AES256_MD5
!
crypto map VPN interface VLAN135
!
sysopt connection permit-vpn
!
! Authenticate and enroll with CA
!
crypto ca authenticate IE1
crypto ca enroll IE1
!
! Add route for VLAN 127 to trigger the IPSec process
route VLAN135 174.1.127.0 255.255.255.0 174.1.135.5 1
R3:
!
! Configure HTTP inspection for SCEP traffic
class-map type inspect match-all WEB
match protocol HTTP
match access-group name ACS_SERVER
!
policy-map type inspect C_TO_A
class WEB
inspect
Rack4SW1#ping 192.10.4.254
Active SA: 1
Rekey SA: 0 (A tunnel will report 1 Active and 1 Rekey SA during
rekey)
Total IKE SA: 1
!
! Enable OSPF On loopback and Tunnel interface
!
router ospf 2
router-id 10.255.1.1
log-adjacency-changes
network 10.255.1.1 0.0.0.0 area 0
network 10.255.255.1 0.0.0.0 area 0
!
! Create Loopback and configure it so it’s advertised as /24 in OSPF.
! By default the OSPF network type on Loopback is LOOPBACK and it’s
! advertised as /32 no matter the mask.
!
interface Loopback1
ip address 10.255.1.1 255.255.255.0
ip ospf network point-to-point
!
! Configure OSPF broadcast type and increase OSPF priority such that R1
! will “always” be the DR. I say “always” because DR election is not a
! preemptive process.
!
interface Tunnel0
ip ospf network broadcast
ip ospf priority 2
R5:
interface Tunnel0
ip address 10.255.255.5 255.255.255.0
no ip redirects
ip mtu 1400
ip nhrp map 10.255.255.1 150.4.1.1
ip nhrp map multicast 150.4.1.1
ip nhrp nhs 10.255.255.1
ip nhrp network-id 145
tunnel source Loopback0
tunnel mode gre multipoint
tunnel key 145
interface Loopback1
ip address 10.255.5.5 255.255.255.0
ip ospf network point-to-point
!
router ospf 2
router-id 10.255.5.5
log-adjacency-changes
network 10.255.5.5 0.0.0.0 area 0
network 10.255.255.5 0.0.0.0 area 0
!
interface Tunnel0
ip ospf network broadcast
R4:
interface Tunnel0
ip address 10.255.255.4 255.255.255.0
no ip redirects
ip mtu 1400
ip nhrp map 10.255.255.1 150.4.1.1
ip nhrp map multicast 150.4.1.1
ip nhrp nhs 10.255.255.1
ip nhrp network-id 145
tunnel source Loopback0
tunnel mode gre multipoint
tunnel key 145
!
router ospf 2
router-id 10.255.4.4
log-adjacency-changes
network 10.255.4.4 0.0.0.0 area 0
network 10.255.255.4 0.0.0.0 area 0
!
interface Loopback1
ip address 10.255.4.4 255.255.255.0
ip ospf network point-to-point
!
interface Tunnel0
ip ospf network broadcast
!
! Wildcard pre-shared key
!
crypto isakmp key CISCO address 150.4.0.0 255.255.0.0
!
! Transport-mode can be used since packets are already encapsulated
! into GRE
!
crypto ipsec transform-set AES256_SHA_TRANS esp-aes 256 esp-sha-hmac
mode transport
!
! Ipsec Profile to be applied to tunnel interface
!
crypto ipsec profile DMVPN_PROFILE
set transform-set AES256_SHA_TRANS
!
! Apply the tunnel protection
!
interface Tunnel0
tunnel protection ipsec profile DMVPN_PROFILE
ip nhrp shortcut
ip nhrp redirect
interface: Tunnel0
Crypto map tag: Tunnel0-head-0, local addr 150.4.1.1
inbound ah sas:
!
! Authenticate users and authorize exec via TACACS+
!
aaa authentication login default group tacacs+
aaa authorization exec default group tacacs+
!
! TACACS server config
!
ip tacacs source-interface Loopback0
tacacs-server host 10.0.0.100 key CISCO
!
line console 0
login authentication CONSOLE
ASA1:
!
! Allow telnet traffic to R6
!
access-list OUTSIDE_IN permit tcp any host 174.1.124.6 eq 23
ACS:
Step 1:
Add R6 as AAA client to the ACS. Run the ACS Admin utility and click the
Network Configuration button, then enter the AAA Client Hostname,
AAA Client IP address of 150.X.6.6 and the key of “CISCO”. Select TACACS+
(Cisco IOS) for the Authentication protocol.
Step 2:
Add new named “TROUBLEMAKER”. Click the User Setup button, then enter
the name “TROUBLEMAKER” click the Add/Edit button. Specify the
Password of “CISCO” on the next page. Scroll down the page to “TACACS+
Settings” and check the Shell(exec) field. Check the Privilege Level field
and set the value to 15.
Note
Rack4R4#telnet 174.1.124.6
Trying 174.1.124.6 ... Open
Username: TROUBLEMAKER
Password:
Rack4R6#
!
! Authentication config
!
access-list AUTH_TELNET permit tcp host 174.1.124.50 host 174.1.124.6
eq telnet
aaa authentication match AUTH_TELNET OUT LOCAL
ASA1:
!
! Configure AAA server
!
aaa-server TACACS+ protocol tacacs
aaa-server TACACS+ (IN) host 10.0.0.100 CISCO
!
! Account with TACACS+ server for telnet connections
!
aaa accounting match AUTH_TELNET OUT TACACS+
ACS:
Step 1:
Add ASA1 as an AAA Client in the ACS. Click the Network Configuration
button then specify the AAA Client Name “Rack4ASA1-T” along with the IP
address of 174.X.127.12. Set the Key value to “CISCO” and set the
authentication protocol to “TACACS+”. Click the Add Entry button when you’re
done.
R4:
aaa new-model
aaa authentication login default none
aaa authentication login VTY local
aaa authorization exec VTY local
!
enable secret cisco
!
! CLI View for the OPERATOR user
!
parser view HTTP
secret 0 CISCO
commands configure include all ip http
commands configure include ip
commands exec include configure terminal
commands exec include configure
!
username OPERATOR privilege 15 view HTTP password 0 CISCO
username ADMIN privilege 15 password 0 CISCO
!
!
line vty 0 4
transport input ssh
login authentication VTY
authorization exec VTY
!
ip domain-name INE.com
crypto key generate rsa general modulus 768
Rack4R4#telnet 10.255.255.4
Password:
Rack4R4(config)#?
Configure commands:
do To run exec commands in config mode
exit Exit from configure mode
ip Global IP configuration subcommands
Rack4R4(config)#ip ?
Global IP configuration subcommands:
accounting-threshold Sets the maximum number of accounting entries
accounting-transits Sets the maximum number of transit entries
http HTTP server configuration
Rack4R4(config)#interface Fa0/1
^
% Invalid input detected at '^' marker.
Password:
Rack4R4#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Rack4R4(config)#?
Configure commands:
aaa Authentication, Authorization and
Accounting.
access-list Add an access list entry
alarm-interface Configure a specific Alarm Interface Card
alias Create command alias
appfw Configure the Application Firewall policy
archive Archive the configuration
arp Set a static ARP entry
async-bootp Modify system bootp parameters
backhaul-session-manager Configure Backhaul Session Manager
banner Define a login banner
bba-group Configure BBA Group
beep Configure BEEP (Blocks Extensible
Exchange
Protocol)
boot Modify system boot parameters
bridge Bridge Group.
buffers Adjust system buffer pool parameters
busy-message Display message when connection to host
fails
call Configure Call parameters
call-history-mib Define call history mib parameters
carrier-id Name of the carrier associated with this
trunk
group
Rack4R4(config)#interface Fa0/1
Rack4R4(config-if)#
Note
This task requires you decrypting the 7-type password configured in SW1’s
VLAN67 interface. This could be done using the following trick:
2) Use the command show key chain to see the clear-text password:
Key-chain TEST:
key 1 -- text "unknown3"
accept lifetime (always valid) - (always valid) [valid now]
send lifetime (always valid) - (always valid) [valid now]
R6:
interface FastEthernet 0/0
ip ospf authentication
ip ospf authentication-key unknown3
!
!
SW1
interface Vlan67
ip ospf authentication
IPS:
ips(config)# service host
ips(config-hos)# network-settings
ips(config-hos-net)# host-name Rack4IPS
ips(config-hos-net)# exit
ips(config-hos)# exit
Apply Changes?[yes]: yes
Rack4IPS# conf t
Rack4IPS(config)# service host
Rack4IPS(config-hos)# network-settings
ips(config-hos-net)# host-ip 174.1.38.10/24,174.1.38.3
Rack4IPS(config-hos-net)# access-list 10.0.0.100/32
Rack4IPS(config-hos-net)# telnet-option enabled
Rack4IPS(config-hos-net)# exit
Rack4IPS(config-hos)# exit
Apply Changes:?[yes]: yes
R3:
class-map type inspect match-any IPS_MANAGEMENT
match protocol https
match protocol telnet
!
policy-map type inspect A_TO_B
class type inspect IPS_MANAGEMENT
inspect
-----------------------------------------------
ntp-servers (min: 1, max: 1, current: 1)
-----------------------------------------------
ip-address: 54.4.8.254
key-id: 1
To verify that telnet/https access is permitted from the ACS server, we will
shutdown the Fa0/0 on R3 and create a Loopback interface with the IP address
10.0.0.100. Make sure to remove the Loopback and bring up Fa0/0 after testing.
login: cisco
Password:
Last login: Tue Mar 16 16:32:57 on pts/0
<snip>
SW2:
interface FastEthernet0/10
switchport trunk encapsulation dot1q
switchport trunk allowed vlan 102,106
switchport mode trunk
Rack4R2#ping 174.1.255.6
IPS:
Rack4IPS# conf t
Rack4IPS(config)# service signature-definition sig0
Rack4IPS(config-sig)# signatures 60001 0
Rack4IPS(config-sig-sig)# engine atomic-ip
Rack4IPS(config-sig-sig-ato)# specify-l4-protocol yes
Rack4IPS(config-sig-sig-ato-yes)# l4-protocol other-protocol
Rack4IPS(config-sig-sig-ato-yes-oth)# other-ip-protocol-id 77
Rack4IPS(config-sig-sig-ato-yes-oth)# exit
Rack4IPS(config-sig-sig-ato)# event-action log-attacker-packets
Rack4IPS(config-sig-sig-ato)# exit
Rack4IPS(config-sig-sig)# alert-severity high
Rack4IPS(config-sig-sig)# status
Rack4IPS(config-sig-sig-sta)# enabled true
Rack4IPS(config-sig-sig-sta)# exit
Rack4IPS(config-sig-sig)# exit
Rack4IPS(config-sig)# exit
Apply Changes?[yes]: yes
-----------------------------------------------
-----------------------------------------------
-----------------------------------------------
status
-----------------------------------------------
enabled: true default: true
IPS:
Rack4IPS(config)# service signature-definition sig0
Rack4IPS(config-sig)# signatures 60002 0
Rack4IPS(config-sig-sig)# engine service-http
Rack4IPS(config-sig-sig-ser)# de-obfuscate true
Rack4IPS(config-sig-sig-ser)# event-action deny-attacker-inline
Rack4IPS(config-sig-sig-ser)# service-ports 80,8080
Rack4IPS(config-sig-sig-ser)# regex
Rack4IPS(config-sig-sig-ser-reg)# specify-uri-regex yes
Rack4IPS(config-sig-sig-ser-reg-yes)# uri-regex
[cC][mM][dD]\.[eE][xX][eE]
Rack4IPS(config-sig-sig-ser-reg-yes)# exi
Rack4IPS(config-sig-sig-ser-reg)# exi
Rack4IPS(config-sig-sig-ser)# exi
Rack4IPS(config-sig-sig)# sig-description
Rack4IPS(config-sig-sig-sig)# sig-name "HTTP cmd.exe"
Rack4IPS(config-sig-sig-sig)# exit
Rack4IPS(config-sig-sig)# alert-severity high
Rack4IPS(config-sig-sig)# sig-fidelity-rating 50
Rack4IPS(config-sig-sig)# alert-frequency
Rack4IPS(config-sig-sig-ale)# summary-mode fire-all
Rack4IPS(config-sig-sig-ale-fir)# exit
Rack4IPS(config-sig-sig-ale)# exit
Rack4IPS(config-sig-sig)# exit
Rack4IPS(config-sig)# exit
Apply Changes:?[yes]: yes
This will block SW2 and may break the topology. Make sure to remove the block
after testing. You may accomplish it through the GUI or CLI.
R3, R4:.
!
! Encrypt line passwords and enable
service password-encryption
!
! Encrypt OSPF keys and ISAKMP pre-shared keys
password encryption aes
key config-key password-encrypt CISCO123
R2
interface Loopback2
ip address 2.2.2.2 255.255.255.255
!
R6
!
Rack4R6# debug ip icmp
Rack4R6#
ICMP: dst (54.4.8.254) administratively prohibited unreachable sent to
2.2.2.2
Rack4R6#
ICMP: dst (54.4.8.254) administratively prohibited unreachable sent to
2.2.2.2
SW2:
!
ip access-list extended UNREACHABLES_TO_RFC1918
permit icmp any 10.0.0.0 0.255.255.255 unreachable
permit icmp any 172.16.0.0 0.15.255.255 unreachable
permit icmp any 192.168.0.0 0.0.255.255 unreachable
!
route-map FILTER_UNREACHABLES permit 10
match ip address UNREACHABLES_TO_RFC1918
set interface Null0
!
ip local policy route-map FILTER_UNREACHABLES
!
! Identify Loopback range
!
ip access-list standard LOOPBACKS
permit 150.4.0.0 0.0.255.255
!
! Create NAT pool and configure PAT
!
ip nat pool NAT_POOL 192.168.1.50 192.168.1.51 prefix-length 24
ip nat inside source list LOOPBACKS pool NAT_POOL overload
!
ip route 192.168.1.50 255.255.255.254 Null0
!
! Announce NAT pool into BGP
!
router bgp 100
network 192.168.1.50 mask 255.255.255.254
!
! Comply with RFC2827 as Task 7.2 requires
!
ip access-list extended RFC2827_OUT
permit ip 192.168.1.50 0.0.0.1 any
R6:
!
! CEF is required to match protocol
!
ip cef
!
! Match the string in HTTP packets
!
class-map match-all WORM
match protocol http url "*root.exe*"
!
policy-map MITIGATE_WORM
class WORM
drop
!
interface Virtual-Template1
service-policy input MITIGATE_WORM
!
! Match telnet traffic in both directions
!
class-map type access-control match-any TELNET
match field TCP dest-port eq 23
match field TCP source-port eq 23
!
! Match TCP over IP
!
class-map type stack match-all TCP_TRAFFIC
match field IP protocol eq 0x6 next TCP
!
! Drop matched traffic
!
policy-map type access-control BLOCK_TELNET
class TELNET
drop
!
policy-map type access-control INTERFACE_POLICY
class TCP_TRAFFIC
service-policy BLOCK_TELNET
!
! Apply policy-map
!
interface Serial 0/0
service-policy type access-control output INTERFACE_POLICY
!
interface Serial 0/1
service-policy type access-control output INTERFACE_POLICY
Rack4SW1#telnet 174.1.145.1
Trying 174.1.145.1 ...
% Connection timed out; remote host not responding
Serial0/0
drop
Rack4R6#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Rack4R6(config)#router bgp 100
Rack4R6(config-router)#network 174.1.255.0 mask 255.255.255.0
Rack4R6#
10:59:07.615: %SYS-5-CONFIG_I: Configured from console by console
BB1#telnet 174.1.255.200
Trying 174.1.255.200 ...
% Connection timed out; remote host not responding
Rack4R6#
*10:59:15.851: INTERCEPT: new connection (54.4.8.254:20209 SYN ->
174.1.255.200:23)
*10:59:17.851: INTERCEPT: client packet passed in SYNSENT (54.4.8.254:20209 ->
174.1.255.200:23)
* 10:59:21.851: INTERCEPT: client packet passed in SYNSENT (54.4.8.254:20209 ->
174.1.255.200:23)
* 10:59:29.931: INTERCEPT: client packet passed in SYNSENT (54.4.8.254:20209 ->
174.1.255.200:23)
* 10:59:30.851: INTERCEPT: SYNSENT timing out (54.4.8.254:20209 <->
174.1.255.200:23)
* 10:59:30.851: INTERCEPT(*): (54.4.8.254:20209 RST -> 174.1.255.200:23)
Another way is to create a route to Null0 for SW1’s Vlan67 IP address on R2 and
then telnet from SW1 to R2. This will trigger the TCP intercept feature on R6.
Rack4SW1#telnet 174.1.255.2
Trying 174.1.255.2 ...
% Connection timed out; remote host not responding
Rack4SW1#telnet 174.1.255.2
Trying 174.1.255.2 ...
% Connection timed out; remote host not responding
!
! Match TCP traffic to server
!
access-list TRAFFIC_TO_SERVER permit tcp any host 192.10.4.50
!
class-map TRAFFIC_TO_SERVER
match access-list TRAFFIC_TO_SERVER
!
! Create TCP map for TCP normalization
tcp-map NORMALIZE
checksum-verification
reserved-bits clear
syn-data drop
!
! Options of kind 6 and 7 are TCP Echo and Echo Reply
!
tcp-options range 6 7 allow
!
! Apply the policy
!
policy-map global_policy
class TRAFFIC_TO_SERVER
set connection conn-max 2000 embryonic-conn-max 500
set connection advanced-options NORMALIZE
Global policy:
Service-policy: global_policy
Class-map: inspection_default
Inspect: dns migrated_dns_map_1, packet 0, drop 0, reset-drop 0
Inspect: ftp, packet 0, drop 0, reset-drop 0
Inspect: h323 h225 _default_h323_map, packet 0, drop 0, reset-
drop 0
Inspect: h323 ras _default_h323_map, packet 0, drop 0, reset-drop
0
Inspect: netbios, packet 0, drop 0, reset-drop 0
Inspect: rsh, packet 0, drop 0, reset-drop 0
Inspect: rtsp, packet 0, drop 0, reset-drop 0
Inspect: skinny, packet 0, drop 0, reset-drop 0
Inspect: esmtp _default_esmtp_map, packet 0, drop 0, reset-drop 0
Inspect: sqlnet, packet 0, drop 0, reset-drop 0
Inspect: sunrpc, packet 0, drop 0, reset-drop 0
Step 1:
Step 2:
Tune the signature’s Event Action to “Request Rate Limit” and set External
Rate-limit Percentage to 25%:
Step 3:
Step 4:
Step 5:
SW1:
interface Loopback100
ip address 174.1.123.12 255.255.255.0
Serial0/0.23
!
! Configure the OUT redundant interface
!
interface redundant1
member-interface eth0/1
nameif OUT
ip address 163.1.124.12 255.255.255.0
!
! Configure the IN redundant interface
!
interface redundant2
member-interface eth0/2
member-interface eth0/0
nameif IN
ip address 163.1.127.12 255.255.255.0
security-level 100
!
! With redundant interfaces, nothing is configured on physical ones
!
interface eth0/0
no shut
!
interface eth0/1
no shut
!
interface eth0/2
no shut
!
! Create access-list for EIGRP Route Filtering, matching SW1 Loopback
! And VLAN 72
!
access-list EIGRP standard permit host 150.4.7.0
access-list EIGRP standard permit host 192.10.4.0
!
! Configure EIGRP 100 process and filter updates towards R4. Match both
! Interfaces for EIGRP process using 1 summarized network command
!
router eigrp 100
no auto-summary
network 163.1.124.0 255.255.252.0
distribute-list EIGRP out interface OUT
!
! Create access-list for NAT Exemption. We are required that SW1
! Loopback and VLAN72 are NOT translated when passing through ASA. This
! is NAT Exemption and NOT Identity NAT
!
access-list NONAT permit ip host 150.4.7.7 any
access-list NONAT permit ip 192.10.4.0 255.255.255.0 any
!
! Configure NAT Exemption and PAT
!
!
! Allow only R3, R4, and R5 Loopback0 to ping the ASA1 interface. By
! default ICMP echo is allowed from all sources on ASA interfaces. When
! configuring explicit entries, it behaves like an ACL with an
! implicit DENY in the end. So all other ICMP traffic destined to ASA
! OUT interface is dropped
!
icmp permit host 150.4.3.3 echo OUT
icmp permit host 150.4.4.4 echo OUT
icmp permit host 150.4.5.5 echo OUT
Rack4R4#ping 163.1.124.12
You can test the translations by establishing telnet connections from SW1. First
try using the IP address of VLAN 127 interface, and verify that the address is
translated to the correct global address. Next, try sourcing from the loopback and
verify that R4 sees the traffic with the address without translation.
Rack4SW1#telnet 150.4.4.4
Trying 150.4.4.4 ... Open
Password:
Rack4R4>show users
Line User Host(s) Idle Location
0 con 0 idle 00:07:21
* 66 vty 0 idle 00:00:00 163.1.124.200
Rack4R4>
Password:
Rack4R4>show users
Line User Host(s) Idle Location
0 con 0 idle 00:07:48
* 66 vty 0 idle 00:00:00 150.4.7.7
Rack4R4>
ASA2:
!
! Configure the ASA to function in multiple context mode
!
mode multiple
!
! After changing modes, reboot and configure contexts.
!
interface eth0/0
no shutdown
interface eth0/1
no shutdown
interface eth0/2
no shutdown
hostname ASA2
!
! Allocate-interfaces to contexts using appropriate mappings
!
context A
allocate-interface Ethernet0/0 Redundant9
allocate-interface Ethernet0/1 Redundant10
config-url disk0:/a.cfg
!
context B
allocate-interface Ethernet0/0 Redundant11
allocate-interface Ethernet0/2 Redundant12
config-url disk0:/b.cfg
!
! Notice that the show output lists Context and then Hostname.
! Make sure to adjust the prompt to match.
!
prompt context hostname
ASA2/Context A:
!
! Enter Context configuration mode
!
Changeto context A
!
! Configure interfaces with appropriate names, security-levels, MAC
!
interface Redundant9
mac-address 00aa.00aa.0000
nameif AOUT
security-level 0
ip address 163.1.132.113 255.255.255.0
!
interface Redundant10
mac-address 00aa.00aa.0001
nameif AIN
security-level 100
ip address 163.1.136.13 255.255.255.0
!
! Configure default route pointing towards R2
!
route AOUT 0 0 163.1.132.2
!
! Permit ICMP echo from BB3 translated address to R6 Fa0/0 interface.
! be as specific as possible
!
access-list OUTS permit icmp host 163.1.132.213 host 163.1.136.6 echo
access-group OUTS in interface AOUT
ASA2/Context B:
!
! Enter Context configuration mode
!
changeto context B
!
! Configure interfaces with appropriate names, security-levels, MAC
!
interface Redundant11
mac-address 00bb.00bb.0000
nameif BOUT
security-level 0
ip address 163.1.132.213 255.255.255.0
!
interface Redundant12
mac-address 00bb.00bb.0002
nameif BIN
security-level 100
ip address 204.12.4.13 255.255.255.0
!
! Configure PAT for VLAN 133 traffic
!
nat (BIN) 1 204.12.4.0 255.255.255.0
global (BOUT) 1 interface
!
! Configure default route pointing towards R2
!
route BOUT 0 0 163.1.132.2
!
! Since ICMP is not a stateful protocol, ICMP echo will reach R6 but
! echo reply will get dropped by the ASA. In order to fix it we have 2
! options: either permit echo reply from R6 in an ACL and apply it to
! BOUT interface; either configure “ICMP inspect” in global policy.
! Since we’ve already used an ACL for Context A we need use inspection
!
policy-map global_policy
class inspection_default
inspect icmp
R2:
!
! Create route so that R2 knows how to reach VLAN136
!
ip route 163.1.136.0 255.255.255.0 163.1.132.113
R6:
!
! Although permissions for ICMP traffic have been configured, R6 does
! not have an route back to VLAN132 network so ICMP echo replies from
! R6 to BB3 will be dropped. Packets will be black-holed since
! R6 has a summary route for 163.1.0.0/16 to Null0. Thus, we need
! to create a specific static route on R6.
!
ip route 163.1.132.213 255.255.255.255 163.1.126.13
SW1:
interface vlan 133
ip address 204.12.4.250 255.255.255.0
ip route 163.1.136.0 255.255.255.0 204.12.4.13
!
! Log all packets dropped by CBAC
!
ip inspect log drop-pkt
!
! Change the hash table size to 4096, default it’s 1024
!
ip inspect hashtable-size 4096
!
! Create custom tcp inspection for port 999 with idle timeout of 999
! seconds and maximum 20000 concurrent sessions
!
ip port-map user-1 port tcp 999 description CUSTOMAPP
ip inspect name MYFW user-1 timeout 999
ip inspect name MYFW parameter max-sessions 20000
!
! Configure inbound ACL and allow only HSRP traffic. Although there is
! An EBGP session between R1 and R3, since we’re inspecting locally
! generated traffic on R3 there is no need to allow BGP traffic in ACL
!
ip access-list extended VLAN13_IN
1000 deny ip any any
10 permit udp host 163.1.13.1 eq 1985 host 224.0.0.2 eq 1985
!
! Apply the access-list inbound and inspection outbound
!
interface FastEthernet 0/0
ip access-group VLAN13_IN in
ip inspect MYFW out
R1:
interface loopback0
ip nat inside
!
interface fastEthernet 0/0
ip nat outside
!
ip nat inside source static tcp 150.4.1.1 23 interface fastEthernet0/0
999
Then, telnet from R4 and you can see the session on the firewall.
Password:
Rack4R1>
R1:
ip host TEST 163.1.13.1
ip dns server
R4:
ip name-server 163.1.13.1
Rack4R4#ping TEST
Translating "TEST"...domain server (163.1.13.1) [OK]
!
! Configure class maps to match TCP, UDP and ICMP traffic.
!
class-map type inspect CMAP_TCP
match protocol TCP
!
! Configure policy map for traffic sourced from INSIDE and destined to
! OUTSIDE. Inspect TCP and UDP. Inspect ICMP and limit it to 32kbps
!
policy-map type inspect PMAP_INSIDE_TO_OUTSIDE
class CMAP_TCP
inspect
class CMAP_UDP
inspect
class CMAP_ICMP
inspect
police rate 32000 burst 6000
!
! Create the zone-pair for traffic sourced from INSIDE zone destined to
! OUTSIDE zone. Attach the firewall policy to the zone-pair
!
zone-pair security ZP_INISIDE_TO_OUTSIDE source INSIDE dest OUTSIDE
service-policy type inspect PMAP_INSIDE_TO_OUTSIDE
!
! Create ACL to match ICMP Echo and Echo-Reply
!
ip access-list extended ACL_ICMP
permit icmp any any echo
permit icmp any any echo-reply
!
! Create ACL to match other traffic needed in future sections
!
ip access-list extended ACL_OTHERSECT
!
! Configure class-map to match ICMP Echo and Echo-Reply
!
class-map type inspect CMAP_ICMP_ECHO_AND_ECHO_REPLY
match access-group name ACL_ICMP
match protocol icmp
!
! Configure class-map to match traffic that needs to be permitted for
! other sections to work
!
class-map type inspect match-any CMAP_OTHER
match access-group name ACL_OTHERSECT
!
! Configure policy firewall for traffic sourced from OUTSIDE, INSIDE
and destined to the router itself
!
policy-map type inspect PMAP_OUTSIDE_TO_SELF
class CMAP_ICMP_ECHO_AND_ECHO_REPLY
pass
class CMAP_OTHER
pass
!
policy-map type inspect PMAP_INSIDE_TO_SELF
class CMAP_ICMP_ECHO_AND_ECHO_REPLY
pass
!
! Create the zone-pairs for traffic sourced from INSIDE, OUTSIDE zones
! to SELF ZONE. Attach the firewall policy to the zone-pair
!
zone-pair security ZP_OUTSIDE_TO_SELF source OUTSIDE dest self
service-policy type inspect PMAP_OUTSIDE_TO_SELF
!
! Assign interfaces to security zones
!
interface FastEthernet0/0
zone security INSIDE
interface Serial0/0.54
zone security OUTSIDE
interface Serial0/0.35
zone security OUTSIDE
interface Serial0/1
zone security OUTSIDE
SW1:
Interface Vlan5
ip address 10.5.5.100 255.255.255.0
no shutdown
!
ip route 163.1.35.0 255.255.255.0 10.5.5.5
ip route 163.1.45.0 255.255.255.0 10.5.5.5
ip route 163.1.54.0 255.255.255.0 10.5.5.5
Rack4SW1#ping 163.1.35.3
Rack4SW1#ping 163.1.54.4
Rack4SW1#ping 163.1.45.4
Rack4SW1#telnet 163.1.35.3
Trying 163.1.35.3 ... Open
Password:
Rack4R3>exit
Rack4SW1#telnet 163.1.54.4
Trying 163.1.54.4 ... Open
Password:
Rack4R4>exit
Rack4SW1#telnet 163.1.45.4
Trying 163.1.45.4 ... Open
Password:
Rack4R4>exit
R3:
ip host TEST 163.1.35.3
ip dns server
R4:
ip host TEST 163.1.54.4
ip dns server
SW1:
ip domain-lookup
ip name-server 163.1.35.3
ip name-server 163.1.54.4
Rack4SW1#ping TEST
Rack4SW1#ping TEST
Let’s check if ICMP echo and echo-reply are permitted to the self-zone meaning
the router itself; other traffic should be dropped.
Rack4SW1#ping 10.5.5.5
Rack4SW1#telnet 10.5.5.5
Trying 10.5.5.5 ...
% Connection timed out; remote host not responding
Rack4R4#ping 163.1.54.5
Rack4R4#telnet 163.1.54.5
Trying 163.1.54.5 ...
% Connection timed out; remote host not responding
Rack4R3#ping 163.1.35.5
Rack4R3#telnet 163.1.35.5
Trying 163.1.35.5 ...
% Connection timed out; remote host not responding
!
! Configure an ISAKMP policy and a key
!
crypto isakmp policy 10
authentication pre-share
crypto isakmp key cisco address 163.1.132.113
crypto isakmp keepalive 10 periodic
!
! Configure the transform-set and proxy ACL
!
crypto ipsec transform-set MYSET esp-3des esp-sha-hmac
access-list 101 permit ip 163.1.13.0 0.0.0.255 163.1.136.0 0.0.0.255
!
! Bound the proxy ACL and transform-set in a Crypto Map
!
crypto map MYMAP 10 ipsec-isakmp
set peer 163.1.132.113
set transform-set MYSET
reverse-route static
match address 101
!
! Apply the crypto-map and enable IPSec HA
!
interface FastEthernet0/0
crypto map MYMAP redundancy HA
!
! Permit VPN traffic in the firewall
!
ip access-list extended VLAN13_IN
20 permit udp host 163.1.132.113 eq 500 host 99.99.99.99 eq 500
30 permit esp host 163.1.132.113 host 99.99.99.99
40 permit ip 163.1.13.0 0.0.0.255 163.1.136.0 0.0.0.255
50 permit gre host 163.1.13.100 host 163.1.12.2
R1:
!
! Configure the new HSRP group which will serve as crypto endpoint.
! Secondary subnet is used as we need to encrypto the primary prefix
!
interface FastEthernet0/0
ip address 99.99.99.1 255.255.255.0 secondary
standby 99 ip 99.99.99.99
standby 99 name HA
standby 99 timers msec 500 msec 1500
standby 13 timers msec 500 msec 1500
ip ospf hello-interval 2
!
! Configure an ISAKMP policy and a key
!
crypto isakmp policy 10
authentication pre-share
crypto isakmp key cisco address 163.1.132.113
crypto isakmp keepalive 10 periodic
!
! Configure the transform-set and proxy ACL
!
crypto ipsec transform-set MYSET esp-3des esp-sha-hmac
access-list 101 permit ip 163.1.13.0 0.0.0.255 163.1.136.0 0.0.0.255
!
! Bound the proxy ACL and transform-set in a Crypto Map
!
crypto map MYMAP 10 ipsec-isakmp
set peer 163.1.132.113
set transform-set MYSET
match address 101
reverse-route static
!
! Apply the crypto-map and enable IPSec HA
!
interface FastEthernet0/0
crypto map MYMAP redundancy HA
R2:
NAT will be configured on both Tunnel and Serial interface because: if IPSec is
initiated from R3 traffic will enter in the Serial0/0 interface; if IPSec is initiated
from R1 traffic will enter the Tunnel interface.
!
! Configure the GRE Tunnel to SW2, needed so that R3 can route
! “around” R1.
!
interface Tunnel1
ip address 163.1.33.2 255.255.255.0
ip nat outside
tunnel source 163.1.12.2
tunnel destination 163.1.13.100
!
interface Serial0/0
ip nat outside
!
! Configure static routes for R6 Loopback and HSRP HA subnet
!
ip route 6.0.0.1 255.255.255.255 163.1.132.113
ip route 99.99.99.99 255.255.255.255 163.1.33.1
!
! Create static NAT for R6 Loopback
!
ip nat inside source static 6.0.0.1 163.1.132.113 no-alias
!
interface FastEthernet0/0
ip nat inside
R6:
!
! Configure an ISAKMP policy and key
!
crypto isakmp policy 10
authentication pre-share
crypto isakmp key cisco address 99.99.99.99
crypto isakmp keepalive 10 periodic
!
! Create the Loopback, actually the NAT’ed crypto endpoint
!
interface Loopback6
ip address 6.0.0.1 255.255.255.255
!
! Disable NAT-T. It’s sufficient to disable it at one end
!
no crypto ipsec nat-transparency udp
!
! Configure the transform-set and proxy ACL
!
crypto ipsec transform-set MYSET esp-3des esp-sha-hmac
access-list 101 permit ip 163.1.136.0 0.0.0.255 163.1.13.0 0.0.0.255
!
! Bound the proxy ACL and transform-set in a Crypto Map
!
crypto map MYMAP 10 ipsec-isakmp
set peer 99.99.99.99
match address 101
set transform MYSET
!
! Configure the IPSec initiator/responder to be Loopback6
!
crypto map MYMAP local-address loopback6
!
! Apply the crypto map
!
interface FastEthernet0/0
crypto map MYMAP
!
! R6 needs a route for crypto endpoint and for VLAN 13, destination of
! encrypted traffic
!
ip route 99.99.99.0 255.255.255.0 163.1.136.13
ip route 163.1.13.0 255.255.255.0 163.1.136.13
ASA2/Context A:
!
! Configure routes for R6 loopback and for VLAN13. Task requires that
! ASA2 has reachability to SW2 through the IPSec tunnel
!
route AIN 6.0.0.1 255.255.255.255 163.1.136.6
route AIN 163.1.13.0 255.255.255.0 163.1.136.6
!
! Permit ESP and UDP 500 traffic from R1/R3 HSRP address to R6 Loopback
!
access-list OUTS permit udp host 99.99.99.99 eq 500 host 6.0.0.1 eq 500
access-list OUTS permit esp host 99.99.99.99 host 6.0.0.1
SW2:
!
! Configure the GRE Tunnel terminating on R2
!
interface tunnel1
ip address 163.1.33.33 255.255.255.0
tunnel source 163.1.13.100
tunnel destination 163.1.12.2
!
! SW2 needs a route for crypto endpoint through the GRE Tunnel
!
ip route 163.1.132.113 255.255.255.255 163.1.33.2
R1:
!
! Create a track object for R3’s Loopback. Create a track 2 object that
! has a TRUE value only when the object 1 is false
!
track 1 ip route 150.4.3.3 255.255.255.255 reachability
track 2 list boolean and
object 1 not
!
! In the case that R1 is the active HSRP router and needs to trigger
! the IPSec process it needs a static route for the crypto endpoint
! towards SW2. The route is tracked so it’s live only when R1 does not
! receive the Loopback subnet from R3; meaning that R3 is down
!
ip route 163.1.132.113 255.255.255.255 163.1.13.100 track 2
Rack4SW2#ping 163.1.136.6
Rack4SW2#ping 163.1.136.13
interface: FastEthernet0/0
Crypto map tag: MYMAP, local addr 99.99.99.99
Now we’ll make R1 HSRP active for both groups by shutting down R3’s
connection to VLAN13:
R3:
interface FastEthernet0/0
shutdown
Rack4SW2#ping 163.1.136.6
Rack4SW2#ping 163.1.136.13
interface: FastEthernet0/0
Crypto map tag: MYMAP, local addr 99.99.99.99
inbound ah sas:
outbound ah sas:
!
! Configure R2 as CA server
!
crypto pki server TEST
grant auto
no shut
!
! Enable HTTP server
!
ip http server
R1, R3:
!
! Configure R2 Loopback as NTP server
!
ntp server 150.4.2.2
ip domain-name INE.com
!
! Generate the RSA pair of keys
!
crypto key generate rsa mod 1024
!
! Configure the Trustpoint
!
crypto pki trustpoint IE1
enrollment url http://150.4.2.2
serial-number
revocation-check none
!
! Retrieve CA certificate and enroll
!
crypto ca authenticate IE1
crypto ca enroll IE1
R6:
R6 does not have a route to R2’s Loopback and static routes are not allowed.
Therefore, we need to create static translations on ASA2.
!
! Configure R2 Loopback as NTP server
!
ntp server 150.4.2.2
ip domain-name INE.com
!
! Generate the RSA pair of keys
!
crypto key generate rsa mod 1024
!
! Configure the Trustpoint
!
crypto pki trustpoint IE1
enrollment url http://163.1.136.20
serial-number
revocation-check none
!
! Retrieve CA certificate and enroll
!
crypto ca authenticate IE1
crypto ca enroll IE1
A/ASA2:
!
! Create the static for R2 Loopback, being as specific as possible
!
static (AOUT,AIN) tcp 163.1.136.20 www 150.4.2.2 www netmask
255.255.255.255
static (AOUT,AIN) udp 163.1.136.20 ntp 150.4.2.2 ntp netmask
255.255.255.255
The existing isakmp policy configured in Task 3.1 used a sequence number of
10. By removing the pre-shared keys for the peer, certificates will be used with
the default ISAKMP policy, since the default ISAKMP policy uses RSA
signatures.
R1, R3:
!
! Remove the ISAKMP pre-shared key and modify ISAKMP policy 10 to use
! RSA-SIG as authentication method
!
no crypto isakmp key cisco address 163.1.132.113
crypto isakmp policy 10
auth rsa-sig
R6:
!
! Remove the ISAKMP pre-shared key and modify ISAKMP policy 10 to use
! RSA-SIG as authentication method
!
no crypto isakmp key cisco address 99.99.99.99
crypto isakmp policy 10
auth rsa-sig
CA Certificate
Status: Available
Certificate Serial Number: 0x1
Certificate Usage: Signature
Issuer:
cn=TEST
Subject:
cn=TEST
Validity Date:
start date: 10:20:14 UTC Jun 19 2009
end date: 10:20:14 UTC Jun 18 2012
Associated Trustpoints: IE1
Rack4SW2#ping 163.1.136.6
Make sure to clear out existing crypto sessions, and verify that the output of
show crypto isakmp sa detail shows Rasig as the Auth method.
interface: FastEthernet0/0
Crypto map tag: MYMAP, local addr 6.0.0.1
inbound ah sas:
outbound ah sas:
No ACL entries on ASA2 are necessary, since R6 initiates the certificate request,
as well as the NTP query. No ACL entries are needed on R3, since the "router-
traffic" keyword is used for UDP and TCP.
Shut down R3's Fa0/0 interface, and verify that the tunnel initiates from R1, and
shows rsig as well.
Rack4SW2#ping 163.1.136.6
ASA1:
!
! Configure RADIUS server and set an authorization password,
! used when retrieving authorization settings
!
aaa-server RAD protocol radius
aaa-server RAD (OUT) host 10.0.0.100 CISCO
radius-common-pw CISCO
!
! Configure the ASA to request client certificate on outside interface
!
ssl certificate-authentication interface OUT port 443
!
! Configure default WebVPN group to authorize via RADIUS
!
tunnel-group DefaultWEBVPNGroup general-attributes
authorization-server-group RAD
authorization-required
!
! Use OU field from client’s certificate to authorize
! with RADIUS server
!
username-from-certificate OU
!
! Configure the default WebVPN group to authenticate with
! digital certificates
!
tunnel-group DefaultWEBVPNGroup webvpn-attributes
authentication certificate
!
! A trustpoint to verify a client’s certificate
!
crypto ca trustpoint IE1
enrollment url http://10.0.0.100:80/certsrv/mscep/mscep.dll
crypto ca authenticate IE1
!
! Enable WebVPN on the outside interface
!
webvpn
enable OUT
ACS:
Step 1:
Add ASA1 as AAA client. Click Network Configuration then Add Entry
and configure per the screenshot below.
If you configure using the address at this point, you may need to add a route on
the ACS server for return traffic. If you configure after adding the translations in
Task 7.1, use the translated client address of 10.0.0.12.
Step 2:
Step 3:
Add a new user with the name WEBVPN (matching the OU field of digital
certificates, as we will create them later) and password CISCO (the common
RADIUS authorization password configured on the ASA). Click User Setup
then enter the user name “WEBVPN” and click Add/Edit and sent the
Password field value to “CISCO”
Step 4:
Set content filter parameters attribute in the user profile per the screenshot
below.
Step1:
Test PC:
Step 2:
Step 3:
Step 4:
Step 4:
ASA1(config)#
R5:
!
ip access-list extended ACL_OTHERSECT
permit udp host 150.4.3.3 eq 848 host 150.4.5.5 eq 848
permit ip host 192.168.4.4 host 192.168.5.5
!
interface Serial 0/0.54
crypto map MYMAP
!
interface Serial 0/1
crypto map MYMAP
R5 has the crypto map configured on one interface, which is sufficient for GDOI
initialization, but is not sufficient to encrypt the traffic out to R4, since it is not
configured on the egress interface. ISAKMP is also enabled by default, but could
have been disabled in the initial configuration with the command no crypto
isakmp enable.
R3:
crypto gdoi group group1
identity number 1
server local
rekey authentication mypubkey rsa Rack4R3.INE.com
In order to trigger a rekey, you can change the ACL on R3 by adding or removing
an entry.
interface: Serial0/1
Crypto map tag: MYMAP, local addr 150.4.5.5
inbound ah sas:
outbound ah sas:
interface: Serial0/0.54
Crypto map tag: MYMAP, local addr 150.4.5.5
inbound ah sas:
outbound ah sas:
SW2:
!
! Authenticate EoU session via RADIUS
!
aaa new-model
aaa authentication eou default group radius
!
! Authorize network settings (e.g. ACLs) with RADIUS
!
aaa authorization network default group radius
!
! The default access-list
!
ip access-list extended DEFAULT
permit udp any any eq 21862
permit tcp any host 163.1.13.150 eq 80
permit udp any any eq bootps
permit udp any any eq domain
permit icmp any any echo
permit icmp any any echo-reply
!
! Admission Control Rule
!
ip admission name NAC_L2_IP eapoudp
!
! Apply the admission rule and ACL
!
interface Fa 0/20
switchport mode access
switchport access vlan 4
ip admission NAC_L2_IP
ip access-group DEFAULT in
!
! EoU timers: Revalidate every 30 minutes
!
eou timeout revalidation 1800
!
! Hold failed hosts for 60 seconds
!
eou timeout hold-period 60
!
! Track IP addresses of connected devices
!
ip device tracking
!
! Enable DHCP snooping to inspect DHCP messages on VLAN8
!
ip dhcp snooping
ip dhcp snooping vlan 101
!
radius-server host 163.1.13.150 key CISCO
!
! Send VSAs with authentication requests
! Send Framed-IP-Address in authentication requests
! – the basic overhead data needed to be supplied to NAC server
!
radius-server vsa send authentication
radius-server attribute 8 include-in-access-req
ACS:
Step 1:
Step 2:
Step 3:
Step 4:
Create new Network Access Profile for NAC L2 IP from template. Click
Network Access Profiles then click Add Template Profile and
select [NAC L2 IP]; click Submit when you’re done with the settings per
the screenshot below. Make sure to restart ACS services afterwards.
Import ACS certificate into client’s certificate store. You need it so that Cisco
Trust Agent may successfully authenticate the ACS during PEAP session. Obtain
the file containing ACS certificate in PEM format (by default), e.g. c:\ACS.cer.
You should have created this file when you configured ACS server.
Upload this file into a directory on the Test PC, e.g. into “c:\mycerts”. Go to Cisco
Trust Agent home directory (by default it’s “C:\Program Files\Cisco
Systems\CiscoTrustAgent”) and execute the following command from there:
’ctacert.exe /add c:\mycerts\ACS.cer /store “Root”’
ACS:
Step 1:
Modify the condition for Healthy Posture for NAC Policy associated with the NAC
Profile. Run the ACS Administration and click Posture Validation then
select Internal Posture Validation Setup and choose the “NAC-
SAMPLE-CTA-POLICY” then click Add/Edit Condition. Add new conditions
according to the screenshot below.
Step 2:
Modify the downloadable ACL associated with Healthy Posture. Click the
Shared Profile Components then click Downloadable IP ACLs and
select the “NAC_SAMPLE_HEALTHY_ACL”
Next add the required ACL rules to the sample ACL per the screenshot below.
Step 2:
Step 3:
Now check the admission status in SW2. Verify the DHCP address bindings and
check device tracking. Finally check the access-list downloaded to the client.
Rack4SW2#show ip access-lists
Extended IP access list DEFAULT
10 permit udp any any eq 21862
20 permit tcp any host 10.0.0.100 eq www
30 permit udp any any eq domain
40 permit icmp any any echo
50 permit icmp any any echo-reply
60 permit udp any any eq bootps
Extended IP access list xACSACLx-IP-NAC_SAMPLE_HEALTHY_ACL-45da9baa
10 permit tcp any any
20 permit udp any any
30 permit icmp any any
ASA1:
!
! Tacacs server configuration
!
aaa-server TAC prot TACACS
aaa-server TAC (OUT) host 10.0.0.100
key CISCO
!
! Configure ASA for SSH. The task does not say from where to allow
! administration traffic
!
domain-name INE.com
crypto key generate rsa modulus 1024
ssh 0 0 IN
aaa authentication ssh console TAC
!
! Create ACL on OUT interface and permit telnet and ssh to SW1 Loopback
! and VLAN 72 interface from anywhere.
!
access-list OUT_IN extended permit tcp any host 150.4.7.7 eq telnet
access-list OUT_IN extended permit tcp any host 150.4.7.7 eq ssh
access-list OUT_IN extended permit tcp any host 192.10.4.7 eq telnet
access-list OUT_IN extended permit tcp any host 192.10.4.7 eq ssh
access-group OUT_IN interface OUT
R1:
!
! Configure R1 for tacacs. Source tacacs packets from Loopback0 since
it is translated on R4 as 10.0.0.1
!
aaa new-model
tacacs-server host 163.1.13.150 key CISCO
ip tacacs source-interface Lo0
SW2:
!
! Configure SW2 for tacacs. Source tacacs packets from Vlan13 since it
is translated on R4 as 10.0.0.8
!
aaa new-model
tacacs-server host 163.1.13.150 key CISCO
ip tacacs source-interface vlan13
!
! Enable ssh
!
ip domain-name INE.com
crypto key generate rsa general-keys modulus 1024
SW1, R5:
!
! Enable ssh
!
ip domain-name INE.com
crypto key generate rsa general-keys modulus 1024
R5:
!
! Permit traffic from tacacs server to self zone. R5 has zone-basedf
! firewall configured. Also allow telnet and ssh into the router.
!
ip access-list extended ACL_OTHERSECT
permit tcp host 10.0.0.100 eq tacacs host 150.4.5.5
permit tcp any any eq telnet
permit tcp any any eq 22
R3:
!
! R3 has CBAC configured. Allow tacacs from R1, ASA2 and SW2.
!
ip access-list extended VLAN13_IN
80 permit tcp host 150.4.1.1 host 163.1.13.150 eq 49
90 permit tcp host 163.1.13.100 host 163.1.13.150 eq 49
100 permit tcp host 163.1.136.13 host 163.1.13.150 eq 49
110 permit tcp any host 163.1.13.3 eq telnet
120 permit tcp any host 163.1.13.3 eq 22
130 permit tcp any host 163.1.35.3 eq telnet
140 permit tcp any host 163.1.35.3 eq 22
150 permit tcp any host 150.4.3.3 eq telnet
160 permit tcp any host 150.4.3.3 eq 22
170 permit tcp any host 192.168.3.3 eq telnet
180 permit tcp any host 192.168.3.3 eq 22
The task requires that ONLY telnet and ssh sessions to be authorized with the
AAA server.
R3:
line vty 101 102
login authentication VTY
authorization exec AUTH
authorization commands 0 AUTH
authorization commands 1 AUTH
authorization commands 15 AUTH
R5:
line vty 37
login authentication VTY
authorization exec AUTH
authorization commands 0 AUTH
authorization commands 1 AUTH
authorization commands 15 AUTH
ACS:
Step 1:
Create network device groups in the ACS. Run the ACS Admin utility and click
Interface Configuration then Advanced Options and finally check
Network Device Groups.
If you have already configured any of the devices as clients, move the devices
from Unassigned Group to their respective groups after this.
Step 2:
Configure the command authorization sets after this. Click Shared Profile
Components and click Shell Command Authorization Sets. Click the
Add button to add a new set. The command authorization set below permits all
commands.
Step 3:
Create a new shell command authorization set named “SHOW”. This set should
deny show run and show start commands. Look at the screenshot below for
the configuration – there is just one command with two deny statements for the
arguments. All other arguments are permitted.
Step 4:
Add all the users mentioned in the task with the service “shell” enabled and
privilege-level set to 15.
Step 4:
Assign shell command authorization sets to the users per the task requirements.
Select the Assign a Shell Command Authorization Set on a per
Network Device Group Basis option for every user.
For the user RTRADMIN, add full access for routers, and show access for
switches: Group ROUTERS has command set ALL assigned and the group
SWITCHES has command set SHOW assigned.
For the user SWADMIN, add show access for routers, and full access for
switches: Group SWITCHES has command set ALL assigned and the group
ROUTERS has command set SHOW assigned.
Step 5:
Add R1, R3, R5, SW1, SW2, ASA1 and ASA2 to the respective groups in AAA.
Here is an example of adding R3. Go to Network Configuration; click on
the appropriate Network Device Group and under ROUTERS AAA Clients
click Add Entry. Note that there is no need to specify a Key, since it was
specified at the Network Device Group level when it was created. Remember
that SW2 was already added to AAA for task 4.2 but with RADIUS. So now we
add SW2 as a tacacs client, under a different name.
Username: RTADMIN
Password:
Rack4R5#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Rack4R5(config)#interface fastEthernet0/0
Rack4R5(config-if)#end
Rack4R5#exit
Rack4R4#telnet 163.1.45.5
Trying 163.1.45.5 ... Open
Username: SWADMIN
Password:
Rack4R5#show running-config
Command authorization failed.
Rack4R5#show startup-config
Command authorization failed.
Rack4R5#conf t
Command authorization failed.
Rack4R4#telnet 163.1.45.5
Trying 163.1.45.5 ... Open
Username: FWADMIN
Password:
Rack4R5#conf t
Command authorization failed.
Rack4R5#show running-config
Command authorization failed.
Rack4R4#telnet 150.4.7.7
Trying 150.4.7.7 ... Open
Username: SWADMIN
Password:
Rack4SW1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Rack4SW1(config)#interface VLan127
Rack4SW1(config-if)#end
Rack4SW1#exit
Rack4R4#telnet 150.4.7.7
Trying 150.4.7.7 ... Open
Username: RTRADMIN
Password:
Rack4SW1#show running-config
Command authorization failed.
Rack4SW1#show startup-config
Command authorization failed.
Rack4R4#telnet 150.4.7.7
Trying 150.4.7.7 ... Open
Username: FWADMIN
Password:
Rack4SW1#conf t
Command authorization failed.
Rack4SW1#show running-config
Command authorization failed.
!
! Attach contexts to appropriate resource classes
!
context A
class A
!
context B
class B
ASA2/Context A:
username CISCO password CISCO
ssh 163.1.13.0 255.255.255.0 AIN
aaa authentication ssh console LOCAL
domain-name INE.com
crypto key generate rsa
ASA1:
snmp-server community CISCO
snmp-server listen-port 181
snmp-server host OUT 10.0.0.100 poll
Password:
Type help or '?' for a list of available commands.
ASA2/A> enable
Password:
ASA2/A#
Resource Origin:
A Value was derived from the resource 'all'
C Value set in the definition of this class
D Value set in default class
Resource Class Mmbrs Origin Limit Total
Total %
Conns [rate] default all CA unlimited
A 0 C 100
B 0 DA unlimited
All Contexts: 3
!
! R5 has zone-based firewall configured. We need allow telnet on self
! zone from OUTSIDE zone
!
ip access-list extended ACL_OTHERSECT
permit tcp any any eq 3010
permit tcp any any eq 7010
R3:
!
! Configure R3 to listen on port 55 and 5501 for ssh connections
!
ip ssh port 5500 rotary 1 2
!
line vty 101
rotary 1
transport input telnet ssh
!
line vty 102
rotary 2
transport input telnet ssh
!
! Create ACL to restrict telnet on default port and allow on all other
! ports
!
access-list 199 deny tcp any any eq 23
access-list 199 permit tcp any any
!
line vty 101 102
access-class 199 out
!
! Allow ssh traffic on both ports from anywhere to R3 interfaces.
!
ip access-list extended VLAN13_IN
190 permit tcp any host 163.1.13.3 eq 5500
200 permit tcp any host 163.1.13.3 eq 5501
210 permit tcp any host 163.1.35.3 eq 5500
220 permit tcp any host 163.1.35.3 eq 5501
230 permit tcp any host 150.4.3.3 eq 5500
240 permit tcp any host 150.4.3.3 eq 5501
250 permit tcp any host 192.168.3.3 eq 5500
260 permit tcp any host 192.168.3.3 eq 5501
Username: RTRADMIN
Password:
Rack4R5#show users
Line User Host(s) Idle Location
0 con 0 idle 00:01:12
*103 vty 37 RTRADMIN idle 00:00:00 163.1.45.4
Username: RTRADMIN
Password:
Rack4R5#show users
Line User Host(s) Idle Location
0 con 0 idle 00:02:40
*103 vty 37 RTRADMIN idle 00:00:00 163.1.45.4
Password:
Rack4R3#show users
Line User Host(s) Idle Location
0 con 0 idle 00:00:19
*167 vty 101 RTRADMIN idle 00:00:00 163.1.13.1
Rack4R3#telnet 163.1.35.5
Trying 163.1.35.5 ...
% Connections to that host not permitted from this terminal
Username: RTRADMIN
Password:
Rack4R5#exit
Password:
Rack4R3#show users
Line User Host(s) Idle Location
0 con 0 idle 00:03:26
*168 vty 102 RTRADMIN idle 00:00:00 163.1.13.1
!
! Configure policy-map for limiting queue threshold
!
policy-map type queue-threshold QT
class BGP
queue-limit 200
class TELNET
queue-limit 100
class SNMP
queue-limit 50
class OTHER
queue-limit 100
!
! Apply the policy-map
!
control-plane host
service-policy type queue-threshold input QT
A system reboot has been requested. The reboot may not start for 90
seconds.
Request Succeeded.
IPS:
Continue with configuration dialog?[yes]: yes
Enter host name[ips]: Rack4IPS
Enter IP interface[1.1.1.1/24,1.1.1.254]: 10.0.0.15/24,10.0.0.4
Enter telnet-server status[disabled]:
Enter web-server port[443]:
Modify current access list?[no]: yes
Current access list entries:
No entries
Permit: 10.0.0.100/32
Permit:
Modify system clock settings?[no]:
Modify interface/virtual sensor configuration?[no]:
Modify default threat prevention settings?[no]:
service host
network-settings
host-ip 10.0.0.15/24,10.0.0.4
host-name Rack4IPS
telnet-option disabled
access-list 10.0.0.100/32
ftp-timeout 300
no login-banner-text
exit
time-zone-settings
offset -480
standard-time-zone-name GMT-08:00
exit
summertime-option disabled
ntp-option disabled
exit
service web-server
port 443
exit
service event-action-rules rules0
overrides
override-item-status Enabled
risk-rating-range 90-100
exit
exit
[0] Go to the command prompt without saving this config.
[1] Return back to the setup without saving this config.
[2] Save this configuration and exit setup.
SW1:
!
! Create VLAN 99 as remote-span VLAN
!
vlan 99
remote-span
!
! Span R3 Fa0/0 interface. Make sure to configure the “reflector-port”
! as an unused port if the switch is a 3550; hardware limitation
!
monitor session 1 source interface FastEthernet 0/3
monitor session 1 destination remote vlan 99 reflector-port Gi0/1
SW2:
!
! Create VLAN 99 as remote-span VLAN
!
vlan 99
remote-span
!
! Span from VLAN 99. Configure “ingress vlan” so that TCP resets can be
! sent. Task 6.2 requires it.
!
monitor session 1 source remote vlan 99
monitor session 1 destination interface fastEthernet0/10 ingress vlan
13
IPS:
Rack4IPS# conf t
Rack4IPS(config)# service interface
Rack4IPS(config-int)# physical-interfaces GigabitEthernet0/0
Rack4IPS(config-int-phy)# admin-state enabled
Rack4IPS(config-int-phy)# exi
Rack4IPS(config-int)# exi
Apply Changes:?[yes]: yes
IDM:
Using the IPS GUI, enable and tune signatures 2000 and 2004 corresponding to
ICMP echo-reply and echo packets. Connect to the IPS server and run the IPS
Device Manager. Navigate to Configuration > Signature Definitions
> sig0. Locate the above mentioned signatures and change Event Count
field for those two.
Rack4R1#ping 163.1.13.3
Rack4R3#ping 163.1.13.1
Rack4IPS(config-sig-sig-str)# service-ports 23
Rack4IPS(config-sig-sig-str)# regex
[sS][eE][cC][rR][eE][tT]|[pP][aA][sS][sS][wW][oO][rR][dD]
Rack4IPS(config-sig-sig-str)# exit
Rack4IPS(config-sig-sig)# sig-description
Rack4IPS(config-sig-sig-sig)# sig-name "Secret Password"
Rack4IPS(config-sig-sig-sig)# exit
Rack4IPS(config-sig-sig)# alert-severity high
Rack4IPS(config-sig-sig)# sig-fidelity-rating 50
Rack4IPS(config-sig-sig)# alert-frequency
Rack4IPS(config-sig-sig-ale)# summary-mode fire-all
Rack4IPS(config-sig-sig-ale-fir)# exit
Rack4IPS(config-sig-sig-ale)# exit
Rack4IPS(config-sig-sig)# exit
Rack4IPS(config-sig)# exit
Apply Changes?[yes]: yes
Username: RTRADMIN
Password:
Rack4R1#sec
[Connection to 163.1.13.3 closed by foreign host]
target:
addr: locality=OUT 163.1.13.3
port: 23
os: idSource=unknown relevance=relevant type=unknown
actions:
resetTcpFlowSent: true
context:
fromTarget:
000000 FF FB 01 FF FB 03 FF FD 18 FF FD 1F 0D 0A 55 73
..............Us
000010 65 72 6E 61 6D 65 3A 20 FF FE 20 FF FD 21 FF FA ername: ..
..!..
000020 21 00 FF F0 FF FE 18 52 54 52 41 44 4D 49 4E 0D
!......RTRADMIN.
000030 0A 50 61 73 73 77 6F 72 64 3A 20 0D 0A 0D 0A 25 .Password:
....%
000040 20 41 75 74 68 65 6E 74 69 63 61 74 69 6F 6E 20
Authentication
000050 66 61 69 6C 65 64 0D 0A 0D 0A 0D 0A 55 73 65 72 failed......User
000060 20 41 63 63 65 73 73 20 56 65 72 69 66 69 63 61 Access Verifica
000070 74 69 6F 6E 0D 0A 0D 0A 55 73 65 72 6E 61 6D 65 tion....Username
000080 3A 20 52 54 52 41 44 4D 49 4E 0D 0A 50 61 73 73 : RTRADMIN..Pass
000090 77 6F 72 64 3A 20 0D 0A 0D 0A 52 61 63 6B 31 52 word: ....Rack4R
0000A0 31 23 73 65 63 1#sec
fromAttacker:
000000 FF FD 03 FF FB 20 FF FB 1F FF FB 21 FF FD 01 FF ..... .....!....
000010 FC 18 FF FA 1F 00 50 00 18 FF F0 FF FC 20 52 54 ......P...... RT
000020 52 41 44 4D 49 4E 0D 0A 43 53 49 43 4F 0D 0A 52 RADMIN..CSICO..R
000030 54 52 41 44 4D 49 4E 0D 0A 43 49 53 43 4F 0D 0A TRADMIN..CISCO..
000040 73 65 63 72 65 74 secret
riskRatingValue: attackRelevanceRating=relevant
targetValueRating=medium 60
threatRatingValue: 40
interface: ge0_0
protocol: tcp
Note
IPS:
Rack4IPS(config)# service signature-definition sig0
Rack4IPS(config-sig)# signatures 60002 0
Rack4IPS(config-sig-sig)# engine string-tcp
Rack4IPS(config-sig-sig-str)# event-action reset-tcp-connection
Rack4IPS(config-sig-sig-str)# service-ports 23
Rack4IPS(config-sig-sig-str)# regex [\x08]|[\x7f]
Rack4IPS(config-sig-sig-str)# exit
Rack4IPS(config-sig-sig)# sig-description
Rack4IPS(config-sig-sig-sig)# sig-name "Backspace Delete"
Rack4IPS(config-sig-sig-sig)# exit
Rack4IPS(config-sig-sig)# alert-severity high
Rack4IPS(config-sig-sig)# sig-fidelity-rating 80
Rack4IPS(config-sig-sig)# alert-frequency
Rack4IPS(config-sig-sig-ale)# summary-mode fire-all
Rack4IPS(config-sig-sig-ale-fir)# exit
Rack4IPS(config-sig-sig-ale)# exit
Rack4IPS(config-sig-sig)# exit
Rack4IPS(config-sig)# exit
Apply Changes?[yes]:
Rack4R1#telnet 163.1.13.3 23
Trying 163.1.13.3 ... Open
Username: RTRADMIN
Password:
[Connection to 163.1.13.3 closed by foreign host]
ASA1:
!
! Enable IPS signatures
!
ip audit name MYINFO info action alarm
ip audit name MYATTACK attack action alarm reset
ip audit interface OUT MYINFO
ip audit interface OUT MYATTACK
!
! Enable logging to host 10.0.0.100
!
logging enable
logging host OUT 10.0.0.100
logging list SYSLOG message 400000-400050
logging trap SYSLOG
!
! Create class-map to match the ACL
!
class-map SKB
match access-list SKEEBUB
!
! Create tcp-map to allow TCP options 16 and 17
!
tcp-map BUB
tcp-options range 16 17 allow
!
! Configure advanced TCP features in global_policy
!
policy-map global_policy
class SKB
set connection conn-max 100
set connection random-sequence-number disable
set connection per-client-max 10
set connection advanced-options BUB
If you wonder about the purpose of these two options – they were designed to
implement DH key exchange for a TCP session and allow for quick and simple
session encryption. The implementation was simple but lacked any
authentication and thus protection from the man-in-the-middle attack.
interface fastEthernet0/0
ip nat outside
interface Serial0/1
ip nat inside
interface Serial0/0.54
ip nat inside
!
! Configure static NAT as asked
!
ip nat inside source static 163.1.124.12 10.0.0.12
ip nat inside source static 163.1.136.13 10.0.0.13
ip nat inside source static 150.4.1.1 10.0.0.1
ip nat inside source static 150.4.3.3 10.0.0.3
ip nat inside source static 150.4.5.5 10.0.0.5
ip nat inside source static 150.4.7.7 10.0.0.7
ip nat inside source static 163.1.13.100 10.0.0.8
R3:
!
! Configure interfaces with appropriate NAT statements
!
interface serial 1/0.35
ip nat inside
int fa0/0
ip nat outside
!
! Configure static NAT as required
!
ip nat inside source static 10.0.0.100 163.1.13.150
!
! Apply CAR as required with Cisco recommended burst values.
!
interface fastEthernet0/0
rate-limit input access-group 173 32000 6000 12000 conform-action
transmit exceed-action drop
!
R2:
!
! Create ACL to match ICMP echo-reply
!
access-list 173 permit icmp any any echo-reply
!
! We are required to use MQC so create class-map to match ACL
!
class-map ECHO_REPLY
match access-group 173
!
! Police echo-reply traffic to 32 kbps
!
policy-map LIMIT_ECHO_REPLY
class ECHO_REPLY
police 32000
!
! Apply policy to interface
!
interface Serial 0/0
service-policy input LIMIT_ECHO_REPLY
Note
A group defines what access rights a set of users have. This access policy
controls which SNMP objects (MIBs) can be accessed for reading and writing, or
which SNMP objects can generate notifications to the members of a group. The
policy is defined by associating a read, write, or notify view with the group. By
using a notify view, a group determines the list of notifications its users can
receive. The group also defines the security model (SNMP version) and the
security level (authentication and/or encryption) for its users.
If a group is defined without a read view, all objects are available to be read
(implicit permit). Contrary to that, if a write or notify view is not defined, no write
access is granted, and no objects can send notifications to members of the group
(implicit deny). The notify view is usually not configured manually, and is auto-
generated by the snmp-server host command when users in a group are bound
to a notification target host.
The security models are defined as SNMPv1, SNMPv2, SNMPv3, while the
security levels are defined as noAuthNoPriv, AuthNoPriv, and AuthPriv.
noAuthNoPriv, the noauth keyword in the IOS, means no authentication and no
encryption. AuthNoPriv, the auth keyword in the IOS, means authentication but
no encryption. AuthPriv, the priv keyword in IOS, means authentication and
encryption.
SNMPv3 can implement any of the three above security levels. SNMPv1 and
SNMPv2 only support noAuthNoPriv. In the case that SNMPv3 uses
noAuthNoPriv, the username serves as a replacement for the community string.
All users sharing a group utilize the same security model; however the specific
model settings (password and encryption key) are set per-user. Note that
SNMPv3 does not send passwords in clear-text, but instead uses MD5 or SHA1
hash-based authentication. For encryption, statically configured keys are used
along with a single-DES (56-bit) symmetric cipher. This means that the same
key should be configured on NMS for the particular user.
After setting up SNMP, you can confirm the interface index with the command
show snmp mib ifmib ifindex.
R4:
!
! Identify VLAN 124 in ACL
!
access-list 99 permit 163.1.124.0 0.0.0.255
!
! Globally enable ifindex persistence required for second view
!
snmp-server ifindex persist
!
! Create the 2 SNMP views
!
snmp-server view NORMVW iso included
snmp-server view RESTVW ifEntry.*.4 included
!
! Create SNMP groups
!
snmp-server group NORMGRP v3 priv read NORMVW write NORMVW
snmp-server group RESTGRP v3 auth read RESTVW access 99
snmp-server group TRAPGRP v3 priv
!
! Create SNMP users
!
snmp-server user NORMUSER NORMGRP v3 auth sha CISCO priv des56 CISCO
snmp-server user RUSER RESTGRP v3 auth sha CISCO
snmp-server user TRAP TRAPGRP v3 auth sha CISCO priv des56 CISCO
!
! Enable SNMP traps
!
snmp-server enable traps snmp linkup linkdown
snmp-server host 10.0.0.100 traps version 3 priv TRAP
!
! Apply the macro
!
interface range fa 0/1 – 22 , fa0/24
macro apply SECURE_ACCESS
!
! Create key-chain
!
key chain 1
key 1
key-string CISCO
!
! Configure EIGRP authentication
!
interface vlan 127
ip authentication key-chain eigrp 100 1
ip authentication mode eigrp 100 md5
ASA1:
!
! Configure EIGRP to speak Unicast and remove command for Multicast
!
router eigrp 100
neighbor 163.1.127.7 interface IN
!
! Configure EIGRP authentication
!
interface Redundant2
authentication key eigrp 100 CISCO key-id 1
authentication mode eigrp 100 MD5
With a default advertised out, traffic for unknown destinations will be sent
towards R5. Since R5 is running ZBF, we are going to add a policy to explicitly
pass all traffic through to the Fa0/1 interface.
R5:
!
! Create an ACL with explicit DENY and apply it inbound on Fa0/1
!
access-list 183 deny ip any any
interface FastEthernet 0/1
ip access-group 183 in
!
! Add the default route to 192.0.2.1
!
ip route 0.0.0.0 0.0.0.0 192.0.2.1
!
! For router to be able to encapsulate packets towards gateway of last
! resort we need a L3 to L2 resolution
!
arp 192.0.2.1 0086.0086.0086 arpa
!
! Originate default route into OSPF
!
router ospf 1
default-information originate
!
! Create a new security zone for interface fastEthernet0/1
!
zone security SINK
!
! Configure the firewall policy to pass any traffic
!
policy-map type inspect PMAP_SINK
class class-default
pass
!
! Configure the zone-pair to match both OUTSIDE to SINK and INSIDE to
! SINK traffic
!
zone-pair security ZP_OUTSE_TO_SINK source OUTSIDE dest SINK
service-policy type inspect PMAP_SINK
!
! Configure flow monitoring for interface fastEthernet0/1
!
flow monitor MONITOR
statistics packet protocol
statistics packet size
record netflow ipv4 protocol-port-tos
!
! Apply configuration to interfafce Fa0/1
!
interface fastEthernet0/1
ip flow monitor MONITOR output
ip accounting output-packets
zone-member security SINK
no shutdown
SW2:
!
! Configure switch to drop traffic destined for this mac
!
mac address-table static 0086.0086.0086 vlan 86 drop
R5:
ip access-list extended 105
10 permit ip any host 20.20.20.20
!
interface fastEthernet0/1
no ip route-cache
interface Serial0/0
no ip route-cache
interface serial0/0.54
no ip route-cache
debug ip packet detail 105
Rack4R4#ping 20.20.20.20 re 6
Flows added: 3
Flows aged: 3
- Active timeout ( 1800 secs) 0
- Inactive timeout ( 15 secs) 3
- Event aged 0
- Watermark aged 0
- Emergency aged 0
448 480 512 544 576 1024 1536 2048 2560 3072 3584 4096 4608
.000 .000 .000 .000 .000 .000 .000 .000 .000 .000 .000 .000 .000
!
! First convert the firewall from routed mode to transparent mode
!
firewall transparent
!
hostname Rack4ASA1
!
! Configure the interfaces with appropriate security levels and nameif
!
interface Ethernet0/0
nameif outside
no shut
interface Ethernet0/1
nameif inside
no shut
!
! Configure the management ip address needed so the firewall
! can actually forward traffic; configure default-route
!
ip address 162.1.38.12 255.255.255.0
route outside 0 0 162.1.38.3
!
! Enable ssh access to the firewall
!
domain-name INE.com
crypto key generate rsa general-keys modulus 1024
!
! Allow ssh access from anywhere since there are no specific
! restrictions
!
ssh 0 0 inside
ssh 0 0 outside
Password:
Type help or '?' for a list of available commands.
Rack4ASA1> en
Password:
Rack4ASA1#
Password:
Type help or '?' for a list of available commands.
Rack4ASA1> en
Password:
Rack4ASA1#
hostname Rack4ASA2
!
! Configure sub-interfaces as per the diagram
!
interface Ethernet0/0
no shutdown
!
interface Ethernet0/0.113
vlan 113
nameif outside
ip address 162.1.113.2 255.255.255.0
interface Ethernet0/1
no shut
interface Ethernet0/1.100
vlan 100
nameif inside
ip address 192.10.4.2 255.255.255.0
!
! Configure OSPF on the inside interface and EIGRP on the outside.
! Although it’s not mentioned in the task it is best practices
! to be as specific as possible using the “network” statements.
!
router eigrp 100
no auto-summary
network 162.1.113.13 255.255.255.255
!
router ospf 1
network 192.10.4.13 255.255.255.255 area 51
!
router eigrp 100
redistribute ospf 1 metric 10000 100 255 1 1500
router ospf 1
redistribute eigrp 100 metric-type 1 subnets
0 Caution
Make sure that the NAT id used for PAT is smaller than the NAT id used for
dynamic NAT. This is because the “network” statement used in dynamic NAT
matches any subnet including 192.10.X.0/24 used for PAT. Thus, in order to
change the matching preference you have to adjust the NAT identifiers.
ASA2:
!
! Configure PAT for inside 192.10.x.0/24 subnet
!
nat (inside) 1 192.10.4.0 255.255.255.0
global (outside) 1 interface
!
! Configure dynamic NAT for all other networks reachable via inside
!
nat (inside) 2 0.0.0.0 0.0.0.0
global (outside) 2 162.1.113.128-162.1.113.191 netmask 255.255.255.192
Password:
Rack4R1>en
Password:
Rack4R1#show users
Line User Host(s) Idle Location
0 con 0 idle 14:49:02
* 66 vty 0 idle 00:00:00 162.1.113.13
Password:
Rack4R1>en
Password:
Rack4R1#show users
Line User Host(s) Idle Location
0 con 0 idle 00:01:14
* 66 vty 0 idle 00:00:00 162.1.113.174
!
! Create the object-groups
!
object-group service SRV_VLAN100
service-object tcp-udp
service-object icmp echo
!
! Create and apply the access-list inbound on the inside interface
!
access-list INSIDE_IN extended deny object-group SRV_VLAN100 object-
group NET_VLAN100 any
access-list INSIDE_IN extended permit ip any any
access-group INSIDE_IN in interface inside
Note
For verification we need to make sure that only the specified traffic is prohibited
from going across the firewall. We can either configure the Test PC in VLAN 100
or temporarily modify the IP address of R6 to one of the restricted hosts in VLAN
100.
Rack4R6#telnet 162.1.113.1
Trying 162.1.113.1 ... Open
Password:
Rack4R1>
Rack4R6#traceroute 162.1.113.1
1 * * *
2 * * *
3 * *
Rack4R6#ping 163.1.113.1 re 2
!
! Configure the dhcp server parameters and enable the server
!
dhcpd address 192.10.4.64-192.10.4.127 inside
dhcpd dns 192.10.4.200 192.10.4.201 interface inside
dhcpd ping_timeout 100 interface inside
dhcpd domain INE.com interface inside
dhcpd enable inside
Rack4ASA2#logging enable
Rack4ASA2#logging buffered debug
Rack4ASA2#debug dhcpd packet
ASA1:
!
! Disable mac-learning on both interfaces and add static mappings for
! R3 and SW2 MACs. These can be easily found by issuing “show interface
! Fa0/1 | i bia” on R3 and “show interface Vlan128 | i bia” on SW2
!
mac-learn outside disable
mac-learn inside disable
mac-address-table static outside 000f.8f14.ad21
mac-address-table static inside 000f.f703.3c00
!
! Create an object-group covering subnets behind ASA1’s inside and
! create access-list to allow telnet and icmp echo. Apply the access-
! list inbound on the outside interface.
!
object-group network NET_INSIDE
network-object 10.0.0.0 255.255.255.0
network-object 162.1.38.0 255.255.255.0
network-object host 150.4.8.8
!
! Create EtherType access-lists to allow MPLS packets. Apply it
! inbound on both inside and outside interfaces
!
access-list ETH_OUTSIDE_IN ethertype permit mpls-unicast
access-list ETH_INSIDE_IN ethertype permit mpls-unicast
!
access-group ETH_OUTSIDE_IN in interface outside
access-group ETH_INSIDE_IN in interface inside
!
policy-map global_policy
class inspection_default
inspect icmp
Rack4R3#ping 162.1.38.8
Rack4R3#telnet 162.1.38.8
Trying 162.1.38.8 ... Open
Password:
Rack4SW1>
Rack4SW1#ping 162.1.38.3
Password:
Rack4R3>
!
! Configure ARP inspection on both interfaces with “no-flood”
! option
!
arp-inspection outside enable no-flood
arp-inspection inside enable no-flood
!
! Create static ARP mappings for SW1 and R3 since “no-flood” option
! has been configured previously
!
arp inside 162.1.38.8 0012.0183.5900
arp outside 162.1.38.3 000f.8f14.ad21
Rack4SW1(config)#
Rack4SW1(config)# interface Vlan128
Rack4SW1(config)# ip address 162.1.38.10 255.255.255.0
Rack4SW1#ping 162.1.38.3 re 2
!
! Configure logging levels as required by the task and enable
! timestamps
!
logging timestamp
logging console emergencies
logging monitor errors
logging trap debugging
!
! Configure logging to the syslog server and make sure debug messages
! don’t show on monitor session.
!
logging host outside 162.1.38.175
logging debug-trace
logging enable
!
! Configure the ASA to authenticate NTP and the NTP key
!
ntp authentication-key 1 md5 *
ntp authenticate
ntp trusted-key 1
!
! Configure the NTP server
!
ntp server 162.1.38.254 key 1 source outside
!
! Configure static ARP entries for the NAT on R3, so we can reach
! syslog and ntp servers. Otherwise ARP replies from R3 will be dropped
! by ASA1, since we have ARP inspection configured
!
arp outside 162.1.38.254 000f.8f14.ad21
arp outside 162.1.38.175 000f.8f14.ad21
ASA2:
!
! Configure static PAT for ntp and syslog. Create an access-list to
! allow ntp and syslog traffic and apply it inbound on the outside
! interface
!
static (inside,outside) udp 162.1.113.254 ntp 192.10.4.254 ntp netmask
255.255.255.255
static (inside,outside) udp 162.1.113.175 syslog 192.10.4.175 syslog
netmask 255.255.255.255
!
access-list OUTSIDE_IN extended permit udp host 162.1.38.12 host
162.1.113.254 eq ntp
access-list OUTSIDE_IN extended permit udp host 162.1.38.12 host
162.1.113.175 eq syslog
access-group OUTSIDE_IN in interface outside
R3:
!
! Configure static PAT for the already NAT’ed addresses of the
! syslog and ntp servers
!
interface FastEthernet0/1
ip nat outside
!
interface Serial1/1.13
ip nat inside
!
ip nat inside source static udp 162.1.113.175 514 162.1.38.175 514
ip nat inside source static udp 162.1.113.254 123 162.1.38.254 123
!
! Drop packets with ip options and disable cdp on the interface
! to BB3.
!
ip options drop
!
interface FastEthernet0/0
no cdp enable
!
! Configure CBAC for udp and tcp traffic. Apply it outbound on the
! “outside” interface since we are told to use minimum configuration.
! Configure t “router-traffic” inspection option so that tcp traffic
! initiated by R4.
!
ip inspect name CBAC tcp router-traffic
ip inspect name CBAC udp
!
! Configure static NAT for server 10.4.4.100
!
interface FastEthernet0/0
ip nat outside
!
interface FastEthernet0/1
ip nat inside
!
ip nat inside source static 10.4.4.100 204.12.4.100
!
ip access-list extended CBAC_IN
permit tcp any host 204.12.4.100 neq 25
deny ip any any
!
! Apply the inspection and ACL. Do not send “administratively
! prohibited” messages for acl dropped packets means not to send icmp
! unreachables
!
interface FastEthernet0/0
no ip unreachables
ip access-group CBAC_IN in
ip inspect CBAC out
Rack4R4#
Rack4R5#ping 162.1.45.4
To test IP options filtering, we will generate extended ICMP packets with “record
route” option:
Rack4R5#ping
Protocol [ip]:
Target IP address: 162.1.45.4
Repeat count [5]: 2
Datagram size [100]:
Timeout in seconds [2]:
Extended commands [n]: y
Source address or interface:
Type of service [0]:
Set DF bit in IP header? [no]:
Validate reply data? [no]:
Data pattern [0xABCD]:
Loose, Strict, Record, Timestamp, Verbose[none]: record
Number of hops [ 9 ]:
Loose, Strict, Record, Timestamp, Verbose[RV]:
Sweep range of sizes [n]:
Type escape sequence to abort.
Sending 2, 100-byte ICMP Echos to 162.1.45.4, timeout is 2 seconds:
Packet has IP options: Total option bytes= 39, padded length=40
Record route: <*>
(0.0.0.0)
(0.0.0.0)
(0.0.0.0)
(0.0.0.0)
(0.0.0.0)
(0.0.0.0)
(0.0.0.0)
(0.0.0.0)
(0.0.0.0)
Rack4R4#show ip traffic
IP statistics:
Rcvd: 89 total, 87 local destination
0 format errors, 0 checksum errors, 0 bad hop count
0 unknown protocol, 0 not a gateway
0 security failures, 0 bad options, 0 with options
Opts: 0 end, 0 nop, 0 basic security, 0 loose source route
0 timestamp, 0 extended security, 0 record route
0 stream ID, 0 strict source route, 0 alert, 0 cipso, 0 ump
0 other
Frags: 0 reassembled, 0 timeouts, 0 couldn't reassemble
0 fragmented, 0 fragments, 0 couldn't fragment
Bcast: 0 received, 0 sent
Mcast: 60 received, 101 sent
Sent: 127 generated, 0 forwarded
Drop: 0 encapsulation failed, 0 unresolved, 0 no adjacency
0 no route, 0 unicast RPF, 0 forced drop
2 options denied
Since BB3 has no route back to the pod, traffic initiated from behind R4 will not
generate any returning packets, but we can still see CBAC session openings:
Rack4R5#telnet 204.12.4.254
Trying 204.12.4.254 ...
% Connection timed out; remote host not responding
Rack4R5#
Rack4R4#show ip inspect sessions detail
Half-open Sessions
Session 844CAF00 (162.1.0.5:34592)=>(204.12.4.254:23) tcp SIS_OPENING
Created 00:00:15, Last heard 00:00:13
Bytes sent (initiator:responder) [0:0]
In SID 204.12.4.254[23:23]=>162.1.0.5[34592:34592] on ACL CBAC_IN
Rack4R5#traceroute 204.12.4.254
For testing we put the TestPC in VLAN4 and configure it with the ip address of
10.4.4.100. We then telnet into BB3 then telnet back to 204.12.4.100 server on
the remote desktop port 3389. Then we telnet to the prohibited port 25 and
confirm that unreachables are not being sent.
Rack4R4#telnet 204.12.4.254
Trying 204.12.4.254 ... Open
+-----------------------------------------------------------------------+
| |
| Welcome to BB3. These commands are available for use at privilege 0 |
| |
| ping show ip bgp |
| telnet show ip bgp neighbors |
| traceroute show ip bgp summary |
| show ip route show ip interface brief |
| show ip protocols |
| |
| The reference configuration for this device is available at: |
| http://www.internetworkexpert.com/downloads/bb3.txt |
| |
+-----------------------------------------------------------------------+
SC.9.9.BB3>telnet 204.12.4.100 25
Trying 204.12.4.100, 25 ...
% Connection timed out; remote host not responding
SC.9.9.BB3>
!
! Configure URL filtering, the Websense server and exclusive domains
!
ip inspect name CBAC http urlfilter
ip urlfilter server vendor websense 162.1.38.100
ip urlfilter source-interface Loopback0
ip urlfilter exclusive-domain permit INE.com
ip urlfilter exclusive-domain permit cisco.com
!
! Create the time-range and configure the ACL to deny web traffic
! during work hours. Then apply it outbound on R4, towards BB3
!
time-range HTTP_RESTRICT
periodic weekdays 7:59 to 16:59
ip access-list extended CBAC_OUT
deny tcp any any eq www time-range HTTP_RESTRICT
permit ip any any
interface FastEthernet0/0
ip access-group CBAC_OUT out
R6:
!
! Configure URL filtering, the Websense server and exclusive domains
!
ip inspect name CBAC http urlfilter
ip urlfilter server vendor websense 162.1.38.100
ip urlfilter source-interface Loopback0
ip urlfilter exclusive-domain permit INE.com
ip urlfilter exclusive-domain permit cisco.com
!
! Create the time-range and configure the ACL to deny web traffic
! during work hours. Then apply it outbound on R4, towards BB3
!
time-range HTTP_RESTRICT
periodic weekdays 7:59 to 16:59
!
ASA1:
!
! Configure a static route for host 10.0.0.100
!
route inside 10.0.0.100 255.255.255.255 162.1.38.8 1
!
! Create statics for host 10.0.0.100 and for R4 Loopback0
!
static (inside,outside) 162.1.38.100 10.0.0.100 netmask 255.255.255.255
static (outside,inside) 162.1.38.4 150.4.4.4 netmask 255.255.255.255
!
! Configure outside NAT for R6-Loopback0 dynamic NAT range
!
nat (outside) 1 162.1.113.128 255.255.255.192 outside
global (inside) 1 162.1.38.128 netmask 255.255.255.255
!
! Allow Websense traffic inbound on the outside interface. If you
! cant remember the Websense port number you can find it out by
! issuing the “debug ip urlfilter events” on either R4 or R6:
!
! URLF:got cache idle timer event...
! URLF:Closing the socket for server (162.1.38.100:15868)
! URLF:server connecting (socket fd 0)
! URLF:received a wrong event
!
access-list OUTSIDE_IN extended permit tcp host 150.4.4.4 host
162.1.38.100 eq 15868
access-list OUTSIDE_IN extended permit tcp 162.1.113.128
255.255.255.192 host 162.1.38.100 eq 15868
Rack4R5#telnet 204.12.4.254 80
Trying 204.12.4.254, 80 ...
% Destination unreachable; gateway or host down
R6:
!
! Configure R6 as NTP master
!
ntp master 5
!
! Configure HTTP server for CA and configure the CA sever as well.
!
ip http server
crypto pki server CA
issuer-name cn=CA, ou=CCIE, o=INE
grant auto
database url flash:
no shutdown
R3:
!
! Create ISAKMP policy. Modify the DH group to match the default one in
!
crypto isakmp policy 10
auth rsa-sig
encr 3des
hash md5
group 2
!
! Enable NTP synchronization with R6
!
ntp server 162.1.113.6 source Serial1/1.13
!
! Create the proxy ACL and transform-set
!
ip access-list extended VLAN3_TO_VLAN113
permit ip 10.35.35.0 0.0.0.255 162.1.113.0 0.0.0.255
!
crypto ipsec transform-set 3DES_MD5 esp-3des esp-md5-hmac
!
! Since only ASA should be capable of initiating the tunnel, we need to
! configure a dynamic crypto-map in R3
!
crypto dynamic-map MYDYNAMIC 10
set transform-set 3DES_MD5
match address VLAN3_TO_VLAN113
!
crypto map MYMAP 10 ipsec-isakmp dynamic MYDYNAMIC
!
interface Serial1/1.13
crypto map MYMAP
!
! Authenticate and enroll with the CA
!
ip domain-name INE.com
crypto pki trustpoint CA
enrollment url http://162.1.113.6:80
crypto ca authenticate CA
crypto key generate rsa general-keys modulus 512
crypto ca enroll CA
Password:
Re-enter password:
ASA2:
!
! Enable ISAKMP on the outside interface and configure the ISAKMP
! policy
!
crypto isakmp enable outside
crypto isakmp policy 10
authentication rsa-sig
encryption 3des
hash md5
group 2
!
! Configure NTP synchronization with R6
!
ntp server 192.10.4.6 source inside
!
! Configure the proxy ACL and the transform-set
!
access-list VLAN113_TO_VLAN3 extended permit ip 162.1.113.0
255.255.255.0 10.35.35.0 255.255.255.0
crypto ipsec transform-set 3DES_MD5 esp-3des esp-md5-hmac
!
! Tie the pieces into the crypto map
!
crypto map MYMAP 10 match address VLAN113_TO_VLAN3
crypto map MYMAP 10 set peer 162.1.13.3
crypto map MYMAP 10 set transform-set 3DES_MD5
crypto map MYMAP interface outside
!
! Allow ASA to initiate the tunnel using certificate based-
! authentication
!
crypto map MYMAP 10 set trustpoint CA
!
! Authenticate the CA and enroll with it
!
crypto ca trustpoint CA
enrollment url http://192.10.4.6:80
crypto key generate rsa general-keys modulus 512
crypto ca authenticate CA
crypto ca enroll CA
!
! Configure the tunnel-group and specify the trust-point for
! certificate validation
!
tunnel-group 162.1.13.3 type ipsec-l2l
tunnel-group 162.1.13.3 ipsec-attributes
peer-id-validate cert
trust-point CA
!
! Create a route for VLAN3 to trigger the IPSec process
!
route outside 10.35.35.0 255.255.255.0 162.1.113.1 1
!
! Permit U-turn for VPN traffic on the outside interface
!
same-security-traffic permit intra-interface
!
! Configure static PAT for NTP and Certificate Enrollment from R3 to
! R6. Then permit traffic through the firewall in the outside access-
! list
!
static (inside,outside) udp 162.1.113.6 ntp 192.10.4.6 ntp netmask
255.255.255.255
static (inside,outside) tcp 162.1.113.6 www 192.10.4.6 www netmask
255.255.255.255
access-list OUTSIDE_IN extended permit udp host 162.1.13.3 host
162.1.113.6 eq ntp
access-list OUTSIDE_IN extended permit tcp host 162.1.13.3 host
162.1.113.6 eq www
R1:
!
! Configure the route to VLAN3 towards ASA2 so traffic from VLAN113 to
! VLAN 3 flows through the tunnel
!
ip route 10.35.35.0 255.255.255.0 162.1.113.13
Rack4R1#ping 10.35.35.3
Active SA: 1
Rekey SA: 0 (A tunnel will report 1 Active and 1 Rekey SA during
rekey)
Total IKE SA: 1
!
! Create a group-policy called SSLVPN and enable SVC as the tunneling
! protocol
!
group-policy SSLVPN internal
group-policy SSLVPN attributes
vpn-tunnel-protocol svc
split-tunnel-policy tunnelspecified
split-tunnel-network-list value SPLIT_TUNNEL
!
! Create an address pool for remote clients
!
ip local pool SSLVPN 192.168.0.1-192.168.0.254 mask 255.255.255.0
!
! Configure RRI redistribution into OSPF
!
router ospf 1
redistribute static subnets
!
! Configure the tunnel-group
!
tunnel-group SSLVPN type remote-access
tunnel-group SSLVPN general-attributes
default-group-policy SSLVPN
address-pool SSLVPN
tunnel-group SSLVPN webvpn-attributes
group-alias SSLVPN enable
authentication aaa
!
! Create username/password for SSL access
!
username SSLUSER password CISCO
username SSLUSER attributes
group-lock value SSLVPN
!
! Configure the allowed ssl encryption algorithm
!
!
! Configure access-list Bypass for VPN connectionssv ?
!
sysopt connection permit-vpn
R3:
!
! Configure the IPSEC profile
!
crypto ipsec profile DMVPN
set transform-set 3DES_MD5
set pfs group2
!
! Configure new Loopback interface
!
interface Loopback2
ip address 192.168.3.3 255.255.255.0
!
! Configure the Tunnel on the HUB
!
interface Tunnel0
ip address 100.100.100.3 255.255.255.0
no ip redirects
ip nhrp authentication cisco
ip nhrp map multicast dynamic
ip nhrp network-id 1
no ip split-horizon eigrp 1
tunnel source Serial1/0.2345
tunnel mode gre multipoint
tunnel key 1
tunnel protection ipsec profile DMVPN
!
! Enable EIGRP AS 1 on the DMVPVN cloud and advertise Loopback2
!
router eigrp 1
network 100.100.100.3 0.0.0.0
network 192.168.3.3 0.0.0.0
no auto-summary
R4:
!
! Configure NTP synchronization with R6
!
ntp server 162.1.113.6 source serial 0/0.2345
!
! Configure CA trustpoint, authenticate and enroll with it
!
crypto pki trustpoint CA
enrollment url http://162.1.113.6:80
ip domain-name INE.com
crypto ca authenticate CA
crypto ca enroll CA
!
! Configure ISAKMP policy to match the one on R3 but modify the
! lifetime as the task implies. There is no need to configure another
! ISAKMP policy on R3 since lifetime gets negotiated and the lower
! value will win
!
crypto isakmp policy 10
encr 3des
hash md5
group 2
lifetime 43200
!
! Configure IPSec transform-set and the IPSec profile
!
crypto ipsec transform-set 3DES_MD5 esp-3des esp-md5-hmac
crypto ipsec profile DMVPN
set transform-set 3DES_MD5
set pfs group2
!
! Create the new Loopback2 interface
!
interface Loopback2
ip address 192.168.4.4 255.255.255.0
!
! Configure the Tunnel interface
!
interface Tunnel0
ip address 100.100.100.4 255.255.255.0
no ip redirects
ip nhrp authentication cisco
ip nhrp map multicast 162.1.0.3
ip nhrp map 100.100.100.3 162.1.0.3
ip nhrp network-id 1
ip nhrp nhs 100.100.100.3
tunnel source Serial0/0.2345
tunnel mode gre multipoint
tunnel key 1
tunnel protection ipsec profile DMVPN
!
! Enable EIGRP AS 1 on the DMVPVN cloud and advertise Loopback2
!
router eigrp 1
network 100.100.100.4 0.0.0.0
network 192.168.4.4 0.0.0.0
no auto-summary
R5:
!
! Configure NTP synchronization with R6
!
ntp server 162.1.113.6 source serial 0/0.2345
!
! Configure CA trustpoint, authenticate and enroll with it
!
crypto pki trustpoint CA
enrollment url http://162.1.113.6:80
ip domain-name INE.com
crypto ca authenticate CA
crypto ca enroll CA
!
! Configure ISAKMP policy to match the one in R3 but modify the
! lifetime as the task implies. There is no need to configure another
! ISAKMP policy on R3 since lifetime gets negotiated and the lower
! value will win
!
crypto isakmp policy 10
encr 3des
hash md5
group 2
lifetime 43200
!
! Configure IPSec transform-set and the IPSec profile
!
crypto ipsec transform-set 3DES_MD5 esp-3des esp-md5-hmac
crypto ipsec profile DMVPN
set transform-set 3DES_MD5
set pfs group2
!
! Create the new Loopback2 interface
!
interface Loopback2
ip address 192.168.5.5 255.255.255.0
!
! Configure the Tunnel interface
!
interface Tunnel0
ip address 100.100.100.5 255.255.255.0
no ip redirects
ip nhrp authentication cisco
ip nhrp map multicast 162.1.0.3
ip nhrp map 100.100.100.3 162.1.0.3
ip nhrp network-id 1
ip nhrp nhs 100.100.100.3
tunnel source Serial0/0.2345
tunnel mode gre multipoint
tunnel key 1
tunnel protection ipsec profile DMVPN
!
! Enable EIGRP AS 1 on the DMVPVN cloud and advertise Loopback2
!
router eigrp 1
network 100.100.100.5 0.0.0.0
network 192.168.5.5 0.0.0.0
no auto-summary
C-id Local Remote I-VRF Status Encr Hash Auth DH Lifetime Cap.
interface: Tunnel0
Crypto map tag: Tunnel0-head-0, local addr 162.1.0.3
inbound ah sas:
outbound ah sas:
R1:
!
! Enable aaa. Configure a list with no authentication for console to
! avoid lockouts and the default with radius+ local fallback
!
aaa new-model
aaa authentication login CONSOLE none
aaa authentication login default group radius local
!
! Configure tacacs+ accounting. Configure local username/password
!
aaa accounting commands 15 default start-stop group tacacs+
username ADMIN password CISCO
!
! Configure console for no authentication
!
line console 0
login authentication CONSOLE
!
! Configure tacacs and radius servers with different source interfaces
! so the AAA server can differentiate it
!
tacacs-server host 162.1.38.100 key cisco
ip tacacs source-interface Loopback0
radius-server host 162.1.38.100 key cisco
ip radius source-interface Serial 0/0.13
ASA1:
!
! Since ASA1 splits the routing domain, we need static xlates for both
! R1’1 loopback and the Serial interface so that SW1 can reach them
!
static (outside,inside) 162.1.38.1 150.4.1.1 netmask 255.255.255.255
static (outside,inside) 162.1.38.113 162.1.13.1 netmask 255.255.255.255
!
! Allow tacacs and radius to flow across ASA1’s outside interface
!
access-list OUTSIDE_IN extended permit udp host 162.1.13.1 host
162.1.38.100 eq radius
access-list OUTSIDE_IN extended permit tcp host 150.4.1.1 host
162.1.38.100 eq tacacs
ACS:
Step 1:
Step 2:
Step 3:
Rack4R1#telnet 150.4.1.1
Trying 150.4.1.1 ... Open
Username: ADMIN
Password:
Rack4R1>en
Password:
Rack4R1#conf t
Rack4R1(config)#interface fastEthernet 0/0
Rack4R1(config-if)#end
Rack4R1#exit
ACS:
Rack4R1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Rack4R1(config)#interface serial 0/0.13
Rack4R1(config-subif)#shutdown
Rack4R1(config-subif)#end
Rack4R1#telnet 150.4.1.1
Trying 150.4.1.1 ... Open
Username: ADMIN
Password:
Rack4R1>en
Password:
Rack4R1#
R5:
!
! Enable aaa. Configure a list with no authentication for console to
! avoid lockouts and the default with tacacs+
!
aaa new-model
aaa authentication login CONSOLE none
aaa authentication login default group tacacs+
!
! Configure TACACS+ to authorize exec shell (e.g. autocommands)
!
aaa authorization exec default group tacacs+
!
! Dynamic ACL to control access to server
!
ip access-list extended PROTECT_SERVER
dynamic SERVER permit tcp any host 162.1.55.100 eq 4550
deny tcp any host 162.1.55.100 eq 4550
permit ip any any
!
! Set up TACACS+ server
!
tacacs-server host 162.1.38.100 key cisco
ip tacacs source-interface Loopback 0
!
interface Serial 0/1
ip access-group PROTECT_SERVER in
!
interface Serial 0/0.2345
ip access-group PROTECT_SERVER in
!
line console 0
login authentication CONSOLE
!
! Enable the router to listen on port 7005 for telnet connections
!
line vty 4
rotary 5
ASA1:
static (outside,inside) 162.1.38.5 150.4.5.5 netmask 255.255.255.255
access-list OUTSIDE_IN extended permit tcp host 150.4.5.5 host
162.1.38.100 eq tacacs
ACS:
Step 1:
Step 2:
Add APP user, enable service shell and specify the autocommand: User Setup
| Add/Edit [APP] | [Password=CISCO]
Rack4R5#show ip access-lists
Extended IP access list PROTECT_SERVER
10 Dynamic SERVER permit tcp any host 162.1.55.100 eq 4550
20 deny tcp any host 162.1.55.100 eq 4550 (3 matches)
30 permit ip any any (356 matches)
Username: APP
Password:
Rack4R5#show ip access-lists
Extended IP access list PROTECT_SERVER
10 Dynamic SERVER permit tcp any host 162.1.55.100 eq 4550
permit tcp host 162.1.0.3 host 162.1.55.100 eq 4550 (6 matches)
20 deny tcp any host 162.1.55.100 eq 4550 (3 matches)
30 permit ip any any (505 matches)
ACS:
Step 1
R3:
!
! Prevent console lockouts
!
aaa new-model
aaa authentication login CONSOLE none
aaa authentication login default group tacacs+
!
! Authorize exec privilege levels with TACACS+
!
aaa authorization exec default tacacs+
!
! Permit some privilege 15 commands at level 7
!
privilege exec level 7 configure terminal
privilege configure all level 7 snmp-server
!
! Configure the tacacs server
!
tacacs-server host 162.1.38.100 key cisco
ip tacacs source-interface Loopback 0
!
! Apply the list with no authentication on the console
!
line console 0
login authentication CONSOLE
ASA1:
!
static (outside,inside) 162.1.38.103 150.4.3.3 netmask 255.255.255.255
access-list OUTSIDE_IN extended permit tcp host 150.4.3.3 host
162.1.38.100 eq tacacs
ACS:
Step 1:
Step 2:
Add New User and assign exec privilege levl. User Setup | Add/Edit
[USER1] | [Password=CISCO]
Repeat the procedure for USER2, setting Privilege Level to 0 this time.
Rack4R3#telnet 150.4.3.3
Trying 150.4.3.3 ... Open
Username: USER1
Password:
Rack4R3#show privilege
Current privilege level is 7
Rack4R3#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Rack4R3(config)#?
Configure commands:
beep Configure BEEP (Blocks Extensible Exchange Protocol)
call Configure Call parameters
default Set a command to its defaults
end Exit from configure mode
exit Exit from configure mode
help Description of the interactive help system
netconf Configure NETCONF
no Negate a command or set its defaults
sasl Configure SASL
snmp-server Modify SNMP engine parameters
Rack4R3(config)#snmp-server ?
chassis-id String to uniquely identify this chassis
community Enable SNMP; set community string and access privs
contact Text for mib object sysContact
context Create/Delete a context apart from default
drop Silently drop SNMP packets
enable Enable SNMP Traps
engineID Configure a local or remote SNMPv3 engineID
file-transfer File transfer related commands
group Define a User Security Model group
host Specify hosts to receive SNMP notifications
ifindex Enable ifindex persistence
location Text for mib object sysLocation
packetsize Largest SNMP packet size
queue-length Message queue length for each TRAP host
Rack4R3#telnet 150.4.3.3
Trying 150.4.3.3 ... Open
Username: USER2
Password:
Rack4R3>?
Exec commands:
<1-99> Session number to resume
disable Turn off privileged commands
enable Turn on privileged commands
exit Exit from the EXEC
help Description of the interactive help system
logout Exit from the EXEC
1 Pitfall
Under the command authorization set we need to specify not only commands
specified in this task (debug ip rip & undebug all), but also the
commands required by the previous task (configure terminal & all
snmp-server commands).
R3:
!
! Authorize & Account level 7 commands with TACACS+
!
aaa authorization commands 7 default group tacacs+
aaa accounting commands 7 default start-stop group tacacs+
!
! This is required to authorize config-mode commands
!
aaa authorization config-commands
!
! Make the commands “visible” at level 7
! They will be sent to TACACS+ for detailed authorization
!
privilege exec all level 7 undebug
privilege exec all level 7 debug
ACS:
Step 1:
Add Commands:
Step 2:
Rack4R3#telnet 150.4.3.3
Trying 150.4.3.3 ... Open
Username: USER1
Password:
Rack4R3#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Rack4R3(config)#exit
Rack4R3#debug ip rip
RIP protocol debugging is on
Rack4R3#undebug all
All possible debugging has been turned off
Rack4R3#conf t
Rack4R3(config)#?
Configure commands:
beep Configure BEEP (Blocks Extensible Exchange Protocol)
call Configure Call parameters
default Set a command to its defaults
end Exit from configure mode
exit Exit from configure mode
help Description of the interactive help system
netconf Configure NETCONF
no Negate a command or set its defaults
sasl Configure SASL
snmp-server Modify SNMP engine parameters
Rack4R3(config)#
Rack4R3(config)#snmp-server enable traps cpu
ACS:
R4:
aaa new-model
aaa authentication login CONSOLE none
aaa authentication login default group tacacs+
!
! Enable TACACS+ command authorization for privilege level 12
!
aaa authorization commands 12 default group tacacs+
!
! Make sure configuration mode commands and exec are authorized as well
!
aaa authorization config-commands
aaa authorization exec default group tacacs+
!
! Make some privileged commands visible at level 12
!
privilege exec level 12 configure terminal
privilege exec level 12 show running-config
privilege exec level 12 show running-config interface
privilege configure all level 12 interface
!
! We move the “hostname” command down to level 12, thus permitting
! it to be in the running-config for the user. However, TACACS+
! will deny any attempts to change the hostname
!
privilege configure level 12 hostname
privilege interface level 12 shutdown
privilege interface level 12 no shutdown
!
tacacs-server host 162.1.38.100 key cisco
ip tacacs source-interface Loopback0
!
line console 0
login authentication CONSOLE
ASA1:
access-list OUTSIDE_IN extended permit tcp host 150.4.4.4 host
162.1.38.100 eq tacacs
ACS:
Step 1:
Step 2:
Step 3:
Create a user NOC and assign shell command authorization set to it:
User Setup | Add/Edit [NOC] | User Setup; [Password =
CISCO]
Step 4:
Modify the Privilege Level for the new user. TACACS+ Settings:
[+Shell(exec)] , [+Privilege Level = 12]
Rack4R3#telnet 150.4.4.4
Trying 150.4.4.4 ... Open
Username: NOC
Password:
Rack4R4#show privilege
Command authorization failed.
Rack4R4#show running-config
Building configuration...
interface FastEthernet0/0
ip address 204.12.4.4 255.255.255.0
ip access-group CBAC_IN in
ip access-group CBAC_OUT out
no ip unreachables
ip inspect CBAC out
ip nat outside
ip virtual-reassembly
duplex auto
speed auto
no cdp enable
Rack4R4#conf t
Rack4R4(config)#hostname test
Command authorization failed.
Rack4R4(config)#interface loopback2
Rack4R4(config-if)#shutdown
Rack4R4(config-if)#no shutdown
R3:
!
! Enable authentication globally under the OSPF process and set the
! authentication key under the interface
!
router ospf 1
area 2345 authentication
interface Serial1/0.2345
ip ospf authentication-key cisco
R4:
!
! Enable authentication globally under the OSPF process and the
! authentication key under the interface. Altough simple authentication
! is enabled globally the interface MD5 authentication will take
! precedence as is more specific
!
router ospf 1
area 2345 authentication
interface Serial0/0.2345
ip ospf authentication-key cisco
!
interface Serial0/1
ip ospf authentication message-digest
ip ospf message-digest-key 1 md5 cisco
R5:
!
! Enable authentication globally under the OSPF process and the
! authentication key under the interface. Altough simple authentication
! is enabled globally the interface MD5 authentication will take
! precedence as is more specific
!
router ospf 1
area 2345 authentication
!
interface Serial0/0.2345
ip ospf authentication-key cisco
!
interface Serial0/1
ip ospf authentication message-digest
ip ospf message-digest-key 1 md5 cisco
R4:
router bgp 200
no neighbor 162.1.13.1 remote-as 100
no neighbor 162.1.13.1 ebgp-multihop 1
no neighbor 162.1.13.1 next-hop-self
neighbor 150.4.1.1 remote-as 100
neighbor 150.4.1.1 update-source Loopback0
neighbor 150.4.1.1 ttl-security hops 2
neighbor 150.4.1.1 next-hop self
!
! Configure thresholds as specified and enable the
! respective SNMP traps
!
process cpu threshold type total rising 75 interval 60 falling 30
interval 60
memory free low-watermark processor 5000
snmp-server enable traps cpu
snmp-server enable traps memory
!
! Configure logging to the AAA server but use TCP for transport
!
logging host 162.1.38.100 transport tcp
ASA1:
!
! Allow TCP syslog traffic from R6 to reach the AAA server
!
access-list OUTSIDE_IN extended permit tcp 162.1.113.128
255.255.255.192 host 162.1.38.100 eq 601
R6:
!
! Configure the access-list for exemption from blocking
!
access-list 1 permit 192.10.4.0 0.0.0.255
!
! Configure the feature as required
!
login block-for 600 attempts 3 within 60
login quiet-mode access-class 1
login on-failure log every 5
login delay 3
!
! Create a local username/password and enable local authentication on
! VTY lines
!
username cisco password cisco
line vty 0 988
login local
Username: c
Password:
% Login invalid
Username: c
Password:
% Login invalid
Username: c
Password:
Rack4R6#telnet 150.4.6.6
Trying 150.4.6.6 ...
% Connection refused by remote host
While the route is in quite mode for 600 seconds, verify that sessions sourced
from subnet 192.10.4.0/24 are permitted:
Rack4R6#show login
A login delay of 3 seconds is applied.
Quiet-Mode access list 1 is applied.
Every 5 failed login is logged.
Rack4R6#telnet 192.10.4.6
Trying 192.10.4.6 ... Open
Username: cisco
Password:
Rack4R6>en
Password:
Rack4R6#
Simulate two more failed logins to verify that the fifth one is logged to the
console.
Rack4R6#telnet 192.10.4.6
Trying 192.10.4.6 ... Open
Username: c
Password:
% Login invalid
Rack4R6#telnet 192.10.4.6
Trying 192.10.4.6 ... Open
Username: c
Password:
% Login invalid
R3:
!
! Configure and limit the number of tracked addresses to 100
!
ip source-track 162.1.55.100
ip source-track address-limit 100
R4:
!
! Configure and limit the number of tracked addresses to 100
!
ip source-track 162.1.55.100
ip source-track address-limit 100
R5:
!
! Configure and limit the number of tracked addresses to 100
!
ip source-track 162.1.55.100
ip source-track address-limit 100
Note
Rack4R5#ping 162.1.55.100
Rack4R4#ping 162.1.55.100
Rack4R3#ping 162.1.55.100
!
! Perform basic sensor initialization
!
ips# setup
At any point you may enter a question mark '?' for help.
User ctrl-c to abort configuration dialog at any prompt.
Default settings are in square brackets '[]'.
Current Configuration:
service host
network-settings
host-ip 1.1.1.1/24,1.1.1.254
host-name ips
telnet-option disabled
ftp-timeout 300
no login-banner-text
exit
time-zone-settings
offset 0
standard-time-zone-name UTC
exit
summertime-option disabled
ntp-option disabled
exit
service web-server
port 443
exit
service host
network-settings
host-ip 192.10.4.10/24,192.10.4.13
host-name Rack4IPS
telnet-option disabled
access-list 162.1.38.100/32
access-list 192.10.4.0/24
ftp-timeout 300
no login-banner-text
exit
time-zone-settings
offset 0
standard-time-zone-name UTC
exit
summertime-option disabled
ntp-option disabled
exit
service web-server
port 80
exit
service event-action-rules rules0
overrides
override-item-status Enabled
risk-rating-range 90-100
exit
exit
!
! Disable the HTTPS service
!
ips# conf t
ips(config)# service web-server
ips(config-web)# enable-tls false
i ps(config-web)# exit
Apply Changes?[yes]: yes
ips(config)#
!
! Configure VLAN groups
!
ips# conf t
ips(config)# service interface
ips(config-int)# physical-interface gigabitethernet0/0
ips(config-int-phy)# admin-state enabled
ips(config-int-phy)# subinterface-type vlan-group
ips(config-int-phy-vla)# subinterface 1
ips(config-int-phy-vla-sub)# vlans range 666
ips(config-int-phy-vla-sub)# exit
ips(config-int-phy-vla)# subinterface 2
ips(config-int-phy-vla-sub)# vlans range 113
ips(config-int-phy-vla-sub)# exit
ips(config-int-phy-vla)# exit
ips(config-int-phy)# exit
ips(config-int)# exit
Apply Changes?[yes]: yes
!
! Configure virtual-sensors and map VLAN groups
!
ips(config)# service analysis-engine
ips(config-ana)# virtual-sensor vs0
ips(config-ana-vir)# physical-interface gigabitEthernet0/0
subinterface-number 1
ips(config-ana-vir)# exit
ips(config-ana)# virtual-sensor vs1
ips(config-ana-vir)# physical-interface gigabitEthernet0/0
subinterface-number 2
ips(config-ana-vir)# exit
ips(config-ana)# exit
Apply Changes?[yes]: yes
SW1:
!
! Since the sensing interface is on SW2 we need RSPAN session
!
vlan 666
remote-span
monitor session 1 source vlan 100 rx
monitor session 1 destination remote vlan 666 reflector-port Gi0/1
SW2:
!
! Use the local VLAN SPAN session in SW2 to direct traffic for
! both VLANs to the sensor
!
monitor session 1 source vlan 113 , 666 rx
monitor session 1 destination interface fastEthernet 0/10 encapsulation
dot1q
ASA1:
static (outside,inside) tcp 162.1.38.10 80 162.1.113.10 80
ASA2:
!
!
static (inside,outside) tcp 162.1.113.10 80 192.10.4.10 80
access-list OUTSIDE_IN extended permit tcp host 162.1.38.100 host
162.1.113.10 eq 80
-----------------------------------------------
logical-interface (min: 0, max: 999999999, current: 0)
-----------------------------------------------
-----------------------------------------------
inline-TCP-session-tracking-mode: virtual-sensor <defaulted>
-----------------------------------------------
name: vs1
-----------------------------------------------
description: <defaulted>
signature-definition: sig0 <defaulted>
event-action-rules: rules0 <defaulted>
anomaly-detection
-----------------------------------------------
anomaly-detection-name: ad0 <defaulted>
operational-mode: detect <defaulted>
-----------------------------------------------
physical-interface (min: 0, max: 999999999, current: 1)
-----------------------------------------------
name: GigabitEthernet0/0
subinterface-number: 2 default: 0
-----------------------------------------------
-----------------------------------------------
logical-interface (min: 0, max: 999999999, current: 0)
-----------------------------------------------
-----------------------------------------------
inline-TCP-session-tracking-mode: virtual-sensor <defaulted>
-----------------------------------------------
-----------------------------------------------
description: <defaulted>
vlans
-----------------------------------------------
range: 666
-----------------------------------------------
-----------------------------------------------
subinterface-number: 2
-----------------------------------------------
description: <defaulted>
vlans
-----------------------------------------------
range: 113
-----------------------------------------------
-----------------------------------------------
-----------------------------------------------
-----------------------------------------------
-----------------------------------------------
-----------------------------------------------
<protected entry>
name: GigabitEthernet0/1 <defaulted>
-----------------------------------------------
media-type: tx <protected>
description: <defaulted>
admin-state: disabled <protected>
duplex: auto <defaulted>
speed: auto <defaulted>
default-vlan: 0 <protected>
alt-tcp-reset-interface
-----------------------------------------------
none
-----------------------------------------------
-----------------------------------------------
-----------------------------------------------
subinterface-type
-----------------------------------------------
none
-----------------------------------------------
-----------------------------------------------
-----------------------------------------------
-----------------------------------------------
-----------------------------------------------
command-control: GigabitEthernet0/1 <protected>
inline-interfaces (min: 0, max: 999999999, current: 0)
-----------------------------------------------
-----------------------------------------------
bypass-mode: auto <defaulted>
interface-notifications
-----------------------------------------------
missed-percentage-threshold: 0 percent <defaulted>
notification-interval: 30 seconds <defaulted>
idle-interface-delay: 30 seconds <defaulted>
-----------------------------------------------
Make sure you can access the IPS sensor via HTTP and start the IDM:
You may want to enable the IPS Signature 2004 in order to test if the IPS
actually receives the mirrored traffic.
!
! Assign the new set to vs1
!
Rack4IPS# conf t
Rack4IPS(config)# service analysis-engine
Rack4IPS(config-ana)# virtual-sensor vs1
Rack4IPS(config-ana-vir)# signature-definition sig1
Rack4IPS(config-ana-vir)# exit
Rack4IPS(config-ana)# exit
Apply Changes?[yes]: yes
!
! Configure the access-profile for the ASA and add it as a blocking
! device
!
Rack4IPS# conf t
Rack4IPS(config)# service network-access
Rack4IPS(config-net)# user-profiles ASA2
Rack4IPS(config-net-use)# password
Enter password[]: cisco
Re-enter password: cisco
Rack4IPS(config-net-use)# exit
Rack4IPS(config-net)# firewall-devices 192.10.4.13
Rack4IPS(config-net-fir)# communication ssh-3des
Rack4IPS(config-net-fir)# nat-address 162.1.113.10
Rack4IPS(config-net-fir)# profile-name ASA2
Rack4IPS(config-net-fir)# exit
Rack4IPS(config-net)#exit
Apply Changes:?[yes] : yes
Configure ASA2 to allow ssh connections coming from the IPS management
interface. Add ASA2’s SSH public key to the IPS known hosts database.
ASA2:
!
! Allow ssh connections coming from IPS
!
ssh 192.10.4.10 255.255.255.255 inside
!
! Configure the signature to match packets coming “from the service”.
! Specify the event-count to be 4 in interval 60 for the signature to
! fire
!
Rack4IPS(config)# service signature-definition sig0
Rack4IPS(config-sig)# signatures 60001 0
Rack4IPS(config-sig-sig)# engine string-tcp
Rack4IPS(config-sig-sig-str)# event-action request-block-host
Rack4IPS(config-sig-sig-str)# service-ports 23
Rack4IPS(config-sig-sig-str)# direction from-service
Rack4IPS(config-sig-sig-str)# regex-string ..Login.invalid
Rack4IPS(config-sig-sig-str)# exit
Rack4IPS(config-sig-sig)# event-counter
Rack4IPS(config-sig-sig-eve)# event-count 4
Rack4IPS(config-sig-sig-eve)# specify-alert-interval yes
Rack4IPS(config-sig-sig-eve-yes)# alert-interval 60
Rack4IPS(config-sig-sig-eve-yes)# exit
Rack4IPS(config-sig-sig-eve)# exit
Rack4IPS(config-sig-sig)# exit
Rack4IPS(config-sig)# exit
Apply Changes?[yes]: yes
Rack4R6#telnet 192.10.4.254
Trying 192.10.4.254 ... Open
+-----------------------------------------------------------------------+
| |
| Welcome to BB2. These commands are available for use at privilege 0 |
| |
| ping show ip bgp |
| telnet show ip bgp neighbors |
| traceroute show ip bgp summary |
| show ip route show ip interface brief |
| show ip protocols |
| |
| The reference configuration for this device is available at: |
| http://www.internetworkexpert.com/downloads/bb2.txt |
| |
+-----------------------------------------------------------------------+
SC.9.9.BB2>telnet 192.10.4.6
Trying 192.10.4.6 ... Open
Username: c
Password:
% Login invalid
SC.9.9.BB2>telnet 192.10.4.6
Trying 192.10.4.6 ... Open
Username: c
Password:
% Login invalid
SC.9.9.BB2>telnet 192.10.4.6
Trying 192.10.4.6 ... Open
Username: c
Password:
% Login invalid
SC.9.9.BB2>telnet 192.10.4.6
Trying 192.10.4.6 ... Open
Username: c
Password:
% Login invalid
IDM:
IDM:
Step 1:
Navigate to Anomaly Detection then click the Add button and assign the
name ad1 to the new policy.
Step 2:
Navigate to Virtual Sensors select Edit and then select vs1. Assign the
ad1 policy to vs1.
Configure the AD zones next. Select ad0, configure the Internal Zone with
the 192.10.4.0/24 subnet; then go to TCP protocol and modify the threshold for
port 3389; After that, modify histogram thresholds for UDP port 135
We are told to configure the Ethernet segments on the outside of the firewall as
external subnets. By default all subnets, unless assigned to Internal/Illegal zone
are included in the External zone. Thus, in order to remove the AAA server’s
VLAN from External zone we should add it to the Internal zone.
as
!
! Enable IOS basic set of signatures
!
ip ips signature-category
category ios_ips basic
retired false
category all
retired true
!
! Disable signature 3106
!
ip ips signature-definition
signature 3106 0
status
retired true
!
! Tune ICMP echo and ICMP echo-reply signatures to produce high
! security alerts
!
ip ips signature-definition
signature 2000 0
alert-severity high
signature 2004 0
alert-severity high
!
! Enable SDEE events reporting
!
ip ips notify SDEE
!
! Set TVR to maximum for subnet 192.10.4.0/24
!
ip ips event-action-rules
target-value high target-address 192.10.4.0/24
!
! Inspect packets only for subnet 162.1.0.0/16. Apply inspection
! inbound on connection to BB1
!
ip access-list standard IPS
permit 162.1.0.0 0.0.255.255
ip ips name IPS list IPS
interface Serial0/0/0
ip ips IPS in
ASA1:
!
! Allow syslog traffic originated from R4 Loopback through ASA1
!
access-list OUTSIDE_IN extended permit udp host 150.4.4.4 host
162.1.38.100 eq syslog
R4:
!
! Enable configuration change logging.
!
archive
log config
logging enable
logging size 1000
notify syslog contenttype plaintext
hidekeys
!
! Configuration changes are forwarded to syslog as well. Configure the
! source to be Loopback0, as it already has a static NAT on ASA1
!
logging source-interface Loopback0
logging 162.1.38.100
Rack4R4#configure terminal
Rack4R4(config)#interface loopback 10
Rack4R4(config-if)#ip ospf authentication
Rack4R4(config-if)#ip ospf authentication-key cisco
Rack4R4(config)#no interface loopback 10
R2:
!
! Configure static ARP for SW1 VLAN27 IP address
!
arp 10.7.7.1 0012.0183.5900 ARPA
SW1:
!
! Configure static ARP for R2 FastEthernet0/0 IP address
!
arp 10.7.7.2 0013.c440.3980 ARPA
!
! Match ARP traffic in a MAC ACL
!
mac access-list extended ARP
permit any any 0x806 0x0
!
! Configure VLAN access-map to filter ARP packets and forward all other
! traffic
!
vlan access-map VLAN27_FILTER 10
action drop
match mac address ARP
vlan access-map VLAN27_FILTER 20
action forward
!
! Apply the filter on VLAN 27
!
vlan filter VLAN27_FILTER vlan-list 27
Rack4SW1#clear arp-cache
Rack4SW1#show arp | i 10.7.7.1
Internet 10.7.7.1 - 0012.0183.5900 ARPA Vlan27
Rack4SW1#ping 10.7.7.1
Rack4SW1#ping 162.1.38.12
Rack4SW1#conf t
Rack4SW1(config)#interface vlan 27
Rack4SW1(config-if)#ip address 10.7.7.3 255.255.255.0
Rack4SW1#ping 10.7.7.2
SW2:
!
! Match ICMP echo destined to ASA2 in an ACL
!
ip access-list extended ICMP_ECHO
permit icmp any host 162.1.113.13 echo
!
! Configure the access-map and drop required traffic while allowing the
! rest
!
vlan access-map ICMP_ECHO_VLAN113 10
action drop
match ip address ICMP_ECHO
vlan access-map ICMP_ECHO_VLAN113 20
action forward
!
! Apply the VACL on VLAN 113
!
vlan filter ICMP_ECHO_VLAN113 vlan-list 113
Rack4R1#ping 162.1.113.13 re 3
Rack4SW2#conf t
Rack4SW2(config)#no vlan filter ICMP_ECHO_VLAN113 vlan-list 113
Rack4R1#ping 162.1.113.13 re 3
R1:
!
! Create the ACL to filter telnet and allow other management protocols
!
ip access-list extended DENY_TELNET
deny tcp any any eq telnet
permit ip any any
!
! Apply the filter on console and all VTY lines
!
line con 0
access-class DENY_TELNET out
!
line vty 0 181
access-class DENY_TELNET out
Rack4R4#telnet 150.4.1.1
Trying 150.4.1.1 ... Open
Username: ADMIN
Password:
Rack4R1>en
Password:
Rack4R1#telnet 150.4.4.4
Rack4R1#show ip access-lists
Extended IP access list DENY_TELNET
10 deny tcp any any eq telnet (2 matches)
20 permit ip any any (1 match)
!
! Configure the protocol stack for IP-in-IP
!
class-map type stack match-all IP_IN_IP
stack-start l2-start
match field ETHER type eq 0x800 next IP
match field layer 2 IP protocol eq 4 next IP
match field layer 3 IP protocol eq 6 next TCP
!
! Define the traffic filter. Match on FIN and SYN bits, port 80 and the
! specified string
!
class-map type access-control match-all FILTER
match field TCP dest-port eq 80
match start TCP payload-start offset 0 size 64 regex ".*[pP] [rR] [oO]
[bB] [eE].*"
match field tcp control-bits eq 2 mask 0x3D
match field tcp control-bits eq 1 mask 0x3D
!
policy-map type access-control FILTER_TCP
class FILTER
drop
!
! Apply the policy on both R6 interfaces
!
interface FastEthernet0/0
service-policy type access-control input FILTER_TCP_IPIP
ASA1:
!
interface Ethernet0/2
no shut
!
! Configure ASA1 as the primary failover device
!
failover lan unit primary
failover lan interface failover Ethernet0/2
failover key CISCO
failover replication http
failover link failover Ethernet0/2
failover interface ip failover 10.10.10.12 255.255.255.0 standby
10.10.10.13
failover
ASA2:
!
interface ethernet 0/2
no shut
!
! Configure ASA as the secondary failover device
!
failover lan unit secondary
failover lan interface failover Ethernet0/2
failover key CISCO
failover replication http
failover link failover Ethernet0/2
failover interface ip failover 10.10.10.12 255.255.255.0 standby
10.10.10.13
failover
ASA1:
Rack4ASA# show failover
Failover On
Failover unit Primary
Failover LAN Interface: failover Ethernet0/2 (up)
Unit Poll frequency 1 seconds, holdtime 15 seconds
Interface Poll frequency 5 seconds, holdtime 25 seconds
Interface Policy 1
Monitored Interfaces 2 of 250 maximum
failover replication http
Version: Ours 8.0(4), Mate 8.0(4)
Last Failover at: 19:16:06 UTC Sep 3 2009
This host: Primary - Active
Active time: 3060 (sec)
slot 0: ASA5510 hw/sw rev (1.1/8.0(4)) status (Up Sys)
Interface outside (141.1.100.12): Normal
Interface inside (141.1.255.12): Normal
slot 1: empty
Other host: Secondary - Standby Ready
Active time: 0 (sec)
slot 0: ASA5510 hw/sw rev (2.0/8.0(4)) status (Up Sys)
Interface outside (141.1.100.13): Normal
Interface inside (141.1.255.13): Normal
slot 1: empty
ASA2:
Global Statistics:
--------------------
URLs total/allowed/denied 0/0/0
URLs allowed by cache/server 0/0
URLs denied by cache/server 0/0
HTTPSs total/allowed/denied 0/0/0
HTTPSs allowed by cache/server 0/0
HTTPSs denied by cache/server 0/0
FTPs total/allowed/denied 0/0/0
FTPs allowed by cache/server 0/0
FTPs denied by cache/server 0/0
Requests dropped 0
Server timeouts/retries 0/0
Processed rate average 60s/300s 0/0 requests/second
Denied rate average 60s/300s 0/0 requests/second
Dropped rate average 60s/300s 0/0 requests/second
Server Statistics:
--------------------
10.0.0.100 DOWN
Vendor websense
Port 15868
Requests total/allowed/denied 0/0/0
Server timeouts/retries 0/0
Responses received 0
Response time average 60s/300s 0/0
Errors:
-------
RFC noncompliant GET method 0
URL buffer update failure 0
We assign the test PC to vlan 255 and test connectivity across the ASA with
HTTP sessions destined to the ports 80 and 8080. A temporaty static route is
needed for verification purposes.
R2:
ip route 141.1.255.0 255.255.255.0 141.1.100.12
We are going to perform verifcation ausing the Test PC and accessing the URL
http://141.X.100.2
Now we’ll change the port that R2’s HTTP server is listening on to 8080. This
time the ASA should block the request.
R2:
!
ip http port 8080
Global Statistics:
--------------------
URLs total/allowed/denied 0/0/0
URLs allowed by cache/server 0/0
URLs denied by cache/server 0/0
HTTPSs total/allowed/denied 0/0/0
HTTPSs allowed by cache/server 0/0
HTTPSs denied by cache/server 0/0
FTPs total/allowed/denied 0/0/0
FTPs allowed by cache/server 0/0
FTPs denied by cache/server 0/0
Requests dropped 1
Server timeouts/retries 0/0
Processed rate average 60s/300s 0/0 requests/second
Denied rate average 60s/300s 0/0 requests/second
Dropped rate average 60s/300s 0/0 requests/second
Server Statistics:
--------------------
10.0.0.100 DOWN
Vendor websense
Port 15868
Requests total/allowed/denied 0/0/0
Server timeouts/retries 0/0
Responses received 0
Response time average 60s/300s 0/0
Errors:
-------
RFC noncompliant GET method 0
URL buffer update failure 0
R2:
!
no ip route 141.1.255.0 255.255.255.0 141.1.100.12
ip http port 80
SW2:
!
! Enable OSPF clear-text authentication on the inside interface
!
interface Vlan 255
ip ospf authentication
ip ospf authentication-key CISCO
SCRack4SW2#ping 141.1.100.25
R1:
!
! Configure the ACL to match traffic to be NAT’ed
!
access-list 100 permit ip 10.0.0.0 0.255.255.255 any
access-list 100 permit ip 150.4.0.0 0.0.255.255 any
!
! Identify the inside(interface traffic is coming in) and
outside(interface
! traffic is going out) NAT interfaces
!
interface FastEthernet 0/0
ip nat outside
!
interface Serial 0/0.123
ip nat inside
!
! Configure PAT
!
ip nat inside source list 100 interface FastEthernet 0/0 overload
R1:
!
ip nat inside source static 10.7.7.100 192.10.4.253
SC.9.9.BB2>ping 192.10.4.253
!
! Apply the inbound ACL to deny ICMP packets
! Enable auth-proxy on the interface
!
interface FastEthernet 0/0
ip access-group INGRESS-FASTETHERNET0/0 in
ip auth-proxy AUTH
AAA Server:
Step 1:
Follow the screenshots below to accomplish the ACS configuration. First, add R1
as a TACACS+ client in the ACS server (use Loopback address for it). Go to
Network Configuration and click Add Entry:
Step 2:
Step 3:
Go to User Setup and add a new user named “AUTH” with a password of
“CISCO” to the ACS and configure the auth-proxy service for this user:
Step 4:
Under the auth-proxy settings, configure the proxy-access list permitting ICMP
traffic to the specified host only.
SW2:
interface fastEthernet 0/20
switchport mode access
switchport access vlan 12
!
! Configure logging at informational level with a source of Loopback
!
logging 10.0.0.102
logging source-interface Loopback 0
logging trap informational
!
! Modify the existing ACL and identify RFC1918 and RFC2827 in it
!
! RFC 1918
!
ip access-list extended INGRESS-FASTETHERNET0/0
no 20
deny ip 10.0.0.0 0.255.255.255 any log
deny ip 192.168.0.0 0.0.255.255 any log
deny ip 172.16.0.0 0.15.255.255 any log
!
! RFC 2827
!
deny ip 141.1.0.0 0.0.255.255 any log
deny ip 150.4.0.0 0.0.255.255 any log
permit ip any any
!
! Also account for packets denied by the ACL
!
interface FastEthernet 0/0
ip accounting access-violation
R6:
!
! Configure logging time stamps; note that logs are required to use the
! routers time zone; without the “localtime” option, logs will have GMT
! timezone
!
service timestamps log datetime localtime
!
! Configure logging at informational level with a source of Loopback
!
logging 10.0.0.102
logging source-interface Loopback 0
logging trap informational
!
! Create the ACL and identify RFC1918 and RFC2827 in it
!
! RFC 1918
!
access-list 99 deny 10.0.0.0 0.255.255.255 log
access-list 99 deny 192.168.0.0 0.0.255.255 log
access-list 99 deny 172.16.0.0 0.15.255.255 log
!
! RFC 2827
!
access-list 99 deny 141.1.0.0 0.0.255.255 log
access-list 99 deny 150.4.0.0 0.0.255.255 log
access-list 99 permit any
!
! Apply the ACL inbound on the interface to BB1.Also account for
packets
! denied by the ACL
!
interface Serial 0/0/0
ip accounting access-violation
ip access-group 99 in
SCRack4R6#show logging
Syslog logging: enabled (0 messages dropped, 3 messages rate-limited,
0 flushes, 0 overruns, xml disabled, filtering
disabled)
!
! Create a inspect class-map for inbound and match required protocols
!
class-map type inspect match-any cmap_inbound
match protocol icmp
!
! Configure the parameter-map for audit-trail and session limit
!
parameter-map type inspect my_param_max_sess
sessions maximum 5
audit-trail on
!
! Configure the inspect policy-map for outbound. Call the class-map and
! inspect accordingly to the parameter-map
!
policy-map type inspect pmap_outbound
class type inspect cmap_outbound
inspect my_param_max_sess
!
! Configure the inspect policy-map for inbound. Call the class-map,
inspect
! and police traffic
!
policy-map type inspect pmap_inbound
class type inspect cmap_inbound
inspect
police rate 8000 burst 1000
!
! Define the security zones and add interfaces to it
!
zone security inside
zone security outside
!
interface serial 0/0.45
zone-member security inside
!
interface serial 0/1
zone-member security inside
!
int FastEthernet0/0
zone-member security inside
!
int FastEthernet0/1
zone-member security outside
!
! Configure the firewall policies for traffic initiated between
security
! zones. Call the inspect policy-maps.
!
zone-pair security inside-to-outside source inside destination outside
service-policy type inspect pmap_outbound
!
zone-pair security outside-to-inside source outside destination inside
service-policy type inspect pmap_inbound
SCRack4R5#ping 30.0.0.1
SCRack4R5#telnet 30.0.0.1
Trying 30.0.0.1 ... Open
+-----------------------------------------------------------------------+
| |
| Welcome to BB3. These commands are available for use at privilege 0 |
| |
| ping show ip bgp |
| telnet show ip bgp neighbors |
| traceroute show ip bgp summary |
| show ip route show ip interface brief |
| show ip protocols |
| |
| The reference configuration for this device is available at: |
| http://www.ine.com/downloads/bb3.txt |
| |
+-----------------------------------------------------------------------+
SC.9.9.BB3>
SC.9.9.BB3>ping 141.1.54.5
SC.9.9.BB3>telnet 141.1.54.5
Trying 141.1.54.5 ...
% Connection timed out; remote host not responding
Check connectivity between interfaces on the inside zone; all traffic between
these interfaces should be allowed
SCRack4R5#ping 10.0.0.100
SCRack4R6#telnet 10.7.7.7
Trying 10.7.7.7 ... Open
Password:
SCRack4SW1>en
Password:
SCRack4SW1#
!
! Configure Phase 2 parameters
!
crypto ipsec transform-set AES_SHA esp-aes esp-sha-hmac
!
! Configure dynamic crypto-map with PFS, SA lifetime and Phase 2 set
!
crypto dynamic-map DYNAMIC 10 set transform-set AES_SHA
crypto dynamic-map DYNAMIC 10 set pfs group2
crypto dynamic-map DYNAMIC 10 set security-a life kilo 1000
!
!
!
crypto map VPN 1000 ipsec-isakmp dynamic DYNAMIC
crypto map VPN interface outside
!
! Configure split-tunnel ACL
!
access-list SPLIT_TUNNEL permit ip 141.1.255.0 255.255.255.0 any
!
! Configure group-policy accordingly with the tasks
!
group-policy IPSGROUP_POLICY internal
group-policy IPSGROUP_POLICY attributes
password-storage enable
wins-server value 141.1.255.200
dns-server value 141.1.255.200
vpn-simultaneous-logins 2
vpn-idle-timeout 10
split-tunnel-policy tunnelspecified
split-tunnel-network-list value SPLIT_TUNNEL
!
! Configure the tunnel-group name for the EZVPN client and specify the
key
!
tunnel-group IPSGROUP type ipsec-ra
tunnel-group IPSGROUP ipsec-attributes
pre-shared-key CISCO
!
! Configure the VPN pool and the local username
!
ip local pool POOL-VPN 141.1.255.51-141.1.255.55 mask 255.255.255.0
username IPSUSER password CISCOIPS
!
! Call the VPN pool inside the tunnel-group attributes; specify the
group-
! policy settings to be inherited
!
tunnel-group IPSGROUP general-attributes
address-pool POOL-VPN
default-group-policy IPSGROUP_POLICY
R4:
!
! Create the Virtual-Tunnel interface and configure encapsulation to be
! IPSec, default being GRE
!
interface Virtual-Template1 type tunnel
no ip address
tunnel mode ipsec ipv4
!
! Configure the EZVPN profile in mode client. Specify the virtual-
template
! interface to be used for this VPN connection
!
crypto ipsec client ezvpn EZ_CLIENT
connect auto
group IPSGROUP key CISCO
mode client
peer 141.1.100.12
virtual-interface 1
username IPSUSER password CISCOIPS
!
! Identify the inside and outside VPN interfaces
!
interface Loopback 44
ip address 150.4.44.44 255.255.255.0
crypto ipsec client ezvpn EZ_CLIENT inside
!
interface S0/0.45
crypto ipsec client ezvpn EZ_CLIENT outside
Check EZVPN client status; verify configuration settings and tunnel status.
interface: Virtual-Access2
Crypto map tag: Virtual-Access2-head-0, local addr 141.1.54.4
inbound ah sas:
R2:
!
! Create and configure the point-to-point tunnel interfaces; leave
! encapsulation GRE as default;source the tunnel from Loopback0
!
interface Tunnel21
tunnel source Loopback 0
tunnel destination 150.4.1.1
ip address 10.12.12.2 255.255.255.0
!
interface Tunnel23
tunnel source Loopback 0
tunnel destination 150.4.3.3
ip address 10.23.23.2 255.255.255.0
!
interface Tunnel25
tunnel source Loopback 0
tunnel destination 150.4.5.5
ip address 10.25.25.2 255.255.255.0
!
! Configure the new Loopback
!
interface Loopback2
ip address 10.100.100.2 255.255.255.255
!
! Speak RIP version 2 ONLY on the tunnel interfaces
!
router rip
version 2
no auto-summary
passive-interface default
network 10.0.0.0
no passive-interface Tunnel21
no passive-interface Tunnel23
no passive-interface Tunnel25
R3:
!
! Create and configure the point-to-point tunnel interface; leave
! encapsulation GRE as default;source the tunnel from Loopback0
!
interface Tunnel32
tunnel source Loopback 0
tunnel destination 150.4.2.2
ip address 10.23.23.3 255.255.255.0
!
! Configure the new Loopback
!
interface Loopback2
ip address 10.100.100.3 255.255.255.255
!
! Speak RIP version 2 ONLY on the tunnel interface
!
router rip
version 2
no auto-summary
passive-interface default
network 10.0.0.0
no passive-interface Tunnel32
R5:
!
! Create and configure the point-to-point tunnel interface; leave
! encapsulation GRE as default;source the tunnel from Loopback0
!
interface Tunnel52
tunnel source Loopback0
tunnel destination 150.4.2.2
ip address 10.25.25.5 255.255.255.0
!
! Configure the new Loopback
!
interface Loopback2
ip address 10.100.100.5 255.255.255.255
!
! Speak RIP version 2 ONLY on the tunnel interface
!
router rip
version 2
no auto-summary
passive-interface default
network 10.0.0.0
no passive-interface Tunnel52
!
! Configure IKE Phase 2 policy and use transport mode for less overhead
!
crypto ipsec transform-set 3DES_MD5_TRANS esp-3des esp-md5-hmac
mode transport
!
! Configure a IPSec profile and apply it to the tunnel interface
!
crypto ipsec profile VPN_TUNNEL
set transform-set 3DES_MD5_TRANS
!
interface Tunnel12
tunnel protection ipsec profile VPN_TUNNEL
R2:
!
! Configure IKE Phase 1 policy and the pre-shared key
!
crypto isakmp policy 10
authentication pre-share
encr 3des
hash md5
!
crypto isakmp key CISCO address 150.4.1.1
crypto isakmp key CISCO address 150.4.5.5
!
! Configure IKE Phase 2 policy and use transport mode for less overhead
!
crypto ipsec transform-set 3DES_MD5_TRANS esp-3des esp-md5-hmac
mode transport
!
! Configure a IPSec profile and apply it to the tunnel interfaces
!
crypto ipsec profile VPN_TUNNEL
set transform-set 3DES_MD5_TRANS
!
interface Tunnel21
tunnel protection ipsec profile VPN_TUNNEL
!
interface Tunnel25
tunnel protection ipsec profile VPN_TUNNEL
R5:
!
! Configure IKE Phase 1 policy and the pre-shared key
!
crypto isakmp policy 10
authentication pre-share
encr 3des
hash md5
!
crypto isakmp key CISCO address 150.4.2.2
!
! Configure IKE Phase 2 policy and use transport mode for less overhead
!
crypto ipsec transform-set 3DES_MD5_TRANS esp-3des esp-md5-hmac
mode transport
!
! Configure a IPSec profile and apply it to the tunnel interfaces
!
crypto ipsec profile VPN_TUNNEL
set transform-set 3DES_MD5_TRANS
!
interface Tunnel52
tunnel protection ipsec profile VPN_TUNNEL
interface: Tunnel25
Crypto map tag: Tunnel25-head-0, local addr 150.4.2.2
inbound ah sas:
outbound ah sas:
interface: Tunnel21
Crypto map tag: Tunnel21-head-0, local addr 150.4.2.2
inbound ah sas:
outbound ah sas:
R2:
!
! Configure NTP synchronization, needed for certificates validity
!
ntp server 10.0.0.100
!
! Configure the IKE Phase 1 policy
!
crypto isakmp policy 20
encr 3des
hash md5
!
! Create RSA keys for certificate enrollment
!
ip domain-name internetworkexpert.com
crypto key generate rsa general-keys modulus 1024
!
! Create a trustpoint to enroll with and get certificate from
!
crypto pki trustpoint IESERVER1
enrollment url http://10.0.0.100:80/certsrv/mscep/mscep.dll
revocation-check none
!
! Get the CA certificate and request a certificate from it afterwards
!
crypto pki authenticate IESERVER1
crypto pki enroll IESERVER1
!
! Apply the IPSec profile on the tunnel
!
interface Tunnel 23
tunnel protection ipsec profile VPN_TUNNEL
R3:
!
! Configure NTP synchronization, needed for certificates validity
!
ntp server 10.0.0.100
!
! Configure the IKE Phase 1 policy
!
crypto isakmp policy 10
encr 3des
hash md5
!
! Create RSA keys for certificate enrollment
!
ip domain-name internetworkexpert.com
crypto key generate rsa general-keys modulus 1024
!
! Create a trustpoint to enroll with and get certificate from
!
crypto pki trustpoint IESERVER1
enrollment url http://10.0.0.100:80/certsrv/mscep/mscep.dll
revocation-check none
!
! Get the CA certificate and request a certificate from it afterwards
!
crypto pki authenticate IESERVER1
crypto pki enroll IESERVER1
!
! Configure the IKE Phase 2 policy,then the IPSec profile and apply it
to the
! tunnel interface
!
crypto ipsec transform-set 3DES_MD5_TRANS esp-3des esp-md5-hmac
mode transport
CA Certificate
Status: Available
Certificate Serial Number: 0x1E76973E6706ABA7452D37E7EEC0DBB6
Certificate Usage: Signature
Issuer:
cn=Brian Dennis
o=Internetwork Expert\
Inc.
l=Reno
st=Nevada
c=US
[email protected]
Subject:
cn=Brian Dennis
o=Internetwork Expert\
Inc.
l=Reno
st=Nevada
c=US
[email protected]
CRL Distribution Points:
http://sc09-aaa/CertEnroll/Brian%20Dennis.crl
Validity Date:
start date: 22:39:54 UTC Dec 10 2008
end date: 22:49:27 UTC Dec 10 2018
Associated Trustpoints: IESERVER1
CA Certificate
Status: Available
Certificate Serial Number: 0x1E76973E6706ABA7452D37E7EEC0DBB6
Certificate Usage: Signature
Issuer:
cn=Brian Dennis
o=Internetwork Expert\
Inc.
l=Reno
st=Nevada
c=US
[email protected]
Subject:
cn=Brian Dennis
o=Internetwork Expert\
Inc.
l=Reno
st=Nevada
c=US
[email protected]
CRL Distribution Points:
http://sc09-aaa/CertEnroll/Brian%20Dennis.crl
Validity Date:
start date: 22:39:54 UTC Dec 10 2008
end date: 22:49:27 UTC Dec 10 2018
Associated Trustpoints: IESERVER1
interface: Tunnel32
Crypto map tag: Tunnel32-head-0, local addr 150.4.3.3
inbound ah sas:
outbound ah sas:
!
! Configure the IPSec encryption profile
!
crypto ipsec profile gdoi-profile-group1
set transform-set gdoi-trans-group1
!
! Create the RSA keys needed to sign the re-keying messages
!
crypto key generate rsa general-keys modulus 1024 label GETVPN
!
! Configure the GDOI group
!
crypto gdoi group group1
identity number 1
server local
rekey address ipv4 191
rekey lifetime seconds 400
rekey authentication mypubkey rsa GETVPN
sa ipsec 1
profile gdoi-profile-group1
match address ipv4 101
address ipv4 141.1.123.1
redundancy
local priority 10
!
! Configure the ACL to match IPSec interesting traffic; this ACL will
be
! downloaded by every GM
!
access-list 101 permit icmp host 141.1.123.2 host 141.1.123.3
access-list 101 permit icmp host 141.1.123.3 host 141.1.123.2
!
! Create the ACL to match the source and destination of the rekey
messages;
! since rekeying is via multicast, destination is a multicast address
!
access-list 191 permit udp host 141.1.123.1 eq 848 host 230.15.15.15 eq
848
R2:
!
! Configure the pre-shared key
!
crypto isakmp key cisco address 141.1.123.1
!
! Configure the GDOI group and specify server IP address
!
crypto gdoi group group1
identity number 1
server address ipv4 141.1.123.1
!
! Configure a crypto-map and call the GDOI group; apply the crypto-map
!
crypto map map-group1 10 gdoi
set group group1
interface s0/0.123
crypto map map-group1
R3:
!
! Configure the pre-shared key and IKE Phase 1 policy
!
crypto isakmp policy 20
auth pre
enc 3des
hash md5
crypto isakmp key cisco address 141.1.123.1
!
! Configure the GDOI group and specify server IP address
!
crypto gdoi group group1
identity number 1
server address ipv4 141.1.123.1
exit
!
! Configure a crypto-map and call the GDOI group; apply the crypto-map
!
crypto map map-group1 10 gdoi
set group group1
interface s1/0.123
crypto map map-group1
IPSec SA Number : 1
IPSec SA Rekey Lifetime: 3600 secs
Profile Name : gdoi-profile-group1
Replay method : Count Based
Replay Window Size : 64
SA Rekey
Remaining Lifetime : 1464 secs
ACL Configured : access-list 101
Rekeys received
Cumulative : 5
After registration : 5
KEK POLICY:
Rekey Transport Type : Multicast
Lifetime (secs) : 0
Encrypt Algorithm : 3DES
Key Size : 192
Sig Hash Algorithm : HMAC_AUTH_SHA
Sig Key Length (bits) : 1024
TEK POLICY:
Serial0/0.123:
IPsec SA:
sa direction:inbound
spi: 0x80C99C15(2160696341)
transform: esp-aes esp-sha-hmac
sa timing:remaining key lifetime (sec): (1306)
Anti-Replay : Disabled
IPsec SA:
sa direction:outbound
spi: 0x80C99C15(2160696341)
transform: esp-aes esp-sha-hmac
sa timing:remaining key lifetime (sec): (1306)
Anti-Replay : Disabled
IPsec SA:
sa direction:inbound
spi: 0x80C99C15(2160696341)
transform: esp-aes esp-sha-hmac
sa timing:remaining key lifetime (sec): (1299)
Anti-Replay : Disabled
IPsec SA:
sa direction:outbound
spi: 0x80C99C15(2160696341)
transform: esp-aes esp-sha-hmac
sa timing:remaining key lifetime (sec): (1299)
Anti-Replay : Disabled
SCRack4R2#ping 141.1.123.3
interface: Serial0/0.123
Crypto map tag: map-group1, local addr 141.1.123.2
inbound ah sas:
outbound ah sas:
outbound pcp sas:
inbound ah sas:
!
! Configure the IKE Phase 2 policy-aka transform-set
!
crypto ipsec transform-set 3DES_MD5 esp-3des esp-md5-hmac
!
! Identify interesting traffic in ACL
!
ip access-list extended TO_VLAN8
permit ip any 10.8.8.0 0.0.0.255
!
!
! Configure the crypto-map with reverse-route injection
!
crypto map VPN 10 ipsec-isakmp
match address TO_VLAN8
set peer 141.1.100.12
set transform 3DES_MD5
reverse-route
!
! Configure IPSec HA; raise priority to 101 and configure preemption so
that
! R2 is active if both routers are up and running;
!
interface FastEthernet 0/0
standby 1 name HSRP1
standby 1 priority 101
standby 1 preempt
crypto map VPN redundancy HSRP1
!
! Redistribute static/ VPN injected routes into OSPF domain; the
“subnets”
! keyword is required under OSPF so that non-classful networks are
! redistributed
!
router ospf 1
redistribute static subnets
R5:
!
! Configure ISAKMP keepalive DPD messages at periodic intervals and
invalid-
! spi for fast failure detection; configure the pre-shared key as well.
!
crypto isakmp keepalive 10 periodic
crypto isakmp invalid-spi-recovery
crypto isakmp key CISCO address 141.1.100.12
!
! Configure the IKE Phase 2 policy-aka transform-set
!
crypto ipsec transform-set 3DES_MD5 esp-3des esp-md5-hmac
!
! Identify interesting traffic in ACL
!
ip access-list extended TO_VLAN8
permit ip any 10.8.8.0 0.0.0.255
!
! Configure the crypto-map with reverse-route injection
!
crypto map VPN 10 ipsec-isakmp
match address TO_VLAN8
set peer 141.1.100.12
set transform 3DES_MD5
reverse-route
!
! Configure IPSec HA; raise priority to 101 and configure preemption so
that
! R2 is active if both routers are up and running; R5 gets default
priority
!
interface FastEthernet 0/1
standby 1 name HSRP1
crypto map VPN redundancy HSRP1
!
! Redistribute static/ VPN injected routes into OSPF and EIGRP
domain;the
! “subnets” keyword is required under OSPF so that non-classful
networks are
! redistributed; normally EIGRP resistributed routes need a
specific/seed
! metric, except for the connected and static redistributed
!
router ospf 1
redistribute static subnets
!
router eigrp 100
redistribute static
ASA1:
!
! Modify the DH group to match the default on routers
!
crypto isakmp policy 20
encr 3des
hash md5
group 1
auth pre-share
!
! Bind pre-shared key to HSRP IP address ASA will create tunnel-group
! automatically; this is the legacy way of creating tunnel-groups.
!
crypto isakmp key CISCO address 141.1.100.25
!
! Identify the interesting traffic in a ACL and configure IKE Phase 2
! parameters
!
access-list FROM_VLAN8 permit ip 10.8.8.0 255.255.255.0 any
crypto ipsec transform-set 3DES_MD5 esp-3des esp-md5-hmac
!
! Configure a static crypto-map entry, lower than the dynamic entry
!
crypto map VPN 10 match address FROM_VLAN8
crypto map VPN 10 set peer 141.1.100.251
crypto map VPN 10 set transform-set 3DES_MD5
!
! Tune ISAKMP keepalives for group 141.1.100.25
!
tunnel-group 141.1.100.25 ipsec-attributes
isakmp keepalive threshold 10 retry 2
In the above output, the first packet is lost while the IPSec tunnel is being
established; the other 3 lost packets are lost when R2 gets reloaded and HSRP
active node changes to R5.
interface: FastEthernet0/0
Crypto map tag: VPN, local addr 141.1.100.25
<snip>
SCRack4R2#reload
Proceed with reload? [confirm]
interface: FastEthernet0/1
Crypto map tag: VPN, local addr 141.1.100.25
inbound ah sas:
outbound ah sas:
At this point R2 is the HSRP active node again. We generate more traffic to
trigger tunnel establishment to R2.
interface: FastEthernet0/0
Crypto map tag: VPN, local addr 141.1.100.25
inbound ah sas:
outbound ah sas:
At any point you may enter a question mark '?' for help.
User ctrl-c to abort configuration dialog at any prompt.
Default settings are in square brackets '[]'.
Current Configuration:
service host
network-settings
host-ip 1.1.1.1/24,1.1.1.254
host-name ips
telnet-option disabled
ftp-timeout 300
!
no login-banner-text
exit
time-zone-settings
offset 0
standard-time-zone-name UTC
exit
summertime-option disabled
ntp-option disabled
exit
service web-server
port 443
exit
service event-action-rules rules0
overrides
override-item-status Enabled
risk-rating-range 90-100
exit
exit
service host
network-settings
host-ip 141.1.255.10/24,141.1.255.12
host-name IPS
telnet-option enabled
access-list 10.0.0.100/32
ftp-timeout 300
no login-banner-text
exit
time-zone-settings
offset 0
standard-time-zone-name UTC
exit
summertime-option disabled
ntp-option disabled
exit
service web-server
port 777
exit
service event-action-rules rules0
overrides
override-item-status Enabled
risk-rating-range 90-100
exit
exit
[0] Go to the command prompt without saving this config.
[1] Return back to the setup without saving this config.
[2] Save this configuration and exit setup.
SW1:
!
! Configure the C&C port of IPS in vlan 255
!
interface FastEthernet 0/10
switchport mode access
switchport access vlan 255
Static PAT for TCP port 443 has been configured before. We need to create
additional static entry to permit telnet and ICMP traffic in addition to HTTPs
connection.
ASA1:
!
! Configure the static
!
static (inside,outside) 141.1.100.10 141.1.255.10 netmask
255.255.255.255
!
! Configure a object-group to match traffic to IPS
!
object-group service IPS_STUFF
service-object tcp eq telnet
service-object tcp eq https
service-object icmp
!
! Create the ACL using a single line and apply it inbound on the
outside
! interface
!
access-list outside_in permit object-group IPS_STUFF host 10.0.0.100
host 141.1.100.10
access-group outside_in in interface outside
Verify that telnet, icmp and https access to the IPS work:
IDM:
Step 1:
Step 2:
Assign the new inline VLAN pair to the default virtual sensor. Go to
Configuration | Analysis Engine | Virtual Sensors and click
Edit. In the new windows click Assign:
Step 3:
SCRack4R2#ping 141.1.100.12
SCRack4R2#ping 141.1.100.5
IDM:
Step 1:
Add an SSH host key for R2 to the list of the trusted public keys in the IPS.This is
required for the blocking/rate-limiting feature. Go to Configuration | SSH |
Known Host Keys and click Add:
Step 2:
Step 3:
Create new blocking device with the IP address of R2 and associate it with the
device login profile. Make sure you enabled Rate Limit capability for this
device. Go to Configuration | Blocking | Blocking Devices and
click Add:
Step 4:
Add new blocking device interface to R2 and specify the outgoing direction for
“Serial 0/0.123”. Go to Configuration | Blocking | Router Blocking
Device Interfaces and click Add:
Step 5:
Edit the Event Action setting for this signature to Produce Alert and
Request Rate-Limit. Modify the External Rate Limit Percentage
and Rate to 1 and 75:
Serial0/0.123
IPS:
!
! Configure the sensor to block user account after 10 unsuccessful
logins;
! default is 0, which means feature is disabled
!
sensor# conf t
sensor(config)# service authentication
sensor(config-aut)# attemptLimit 10
sensor(config-aut)# exit
Apply Changes?[yes]: yes
Add a new event action filter in the IPS, that filters all events generated by R5.
Go to Configuration | Policies | Event Action Rules | rules0
click Event Action Filters and then click Add. Add 150.X.5.5 as the
attacker address and select all actions to substract. After this, repeat the same
with R5’s IP address as the victim IP:
!
! We’ll temporarely shutdown the serial interface between R2 and R5 to
maks
! sure pings run over the Ethernet segment, where IPS is inline
!
SCRack4R5#conf t
Enter configuration commands, one per line. End with CNTL/Z.
SCRack4R5(config)#interface serial 0/0.25
SCRack4R5(config-subif)#shutdown
!
! We see there is no policing/rate-limiting in place;.This means
! signature 2152 did not fire when R5 Loopback0 was victim/attacker
!
SCRack4R2#show policy-map interface serial 0/0.123
Serial0/0.123
R5:
SCRack4R5#conf t
Enter configuration commands, one per line. End with CNTL/Z.
SCRack4R5(config)#interface serial 0/0.25
SCRack4R5(config-subif)#no shut
Serial0/0.123
!
! Authorize commands at level 15 and authorize exec attributes. There
is no
! need for local “fallback” since for VTY is not specified in the task
and at
! the console authorization is not required
!
aaa authorization commands 15 default group tacacs+
aaa authorization exec default group tacacs+
!
! Configure tacacs server connection attributes
!
tacacs-server host 10.0.0.100 key CISCO
ip tacacs source-interface Loopback0
!
! Apply the authentication lists to console,aux and VTY lines
!
line console 0
login authentication CONSOLE
!
line aux 0
login authentication CONSOLE
!
line vty 0 4
login authentication VTY
AAA Server:
Step 1:
Step 2:
Step 3:
Step 4:
Add a user named “ADMIN” and associate the command authorization set
“ADMIN” with this user. Additionally, configure “privilege level” of 15 and enable
“shell (exec)” under TACACS+ Settings.
Step 5:
Add a user named “NOC” and associate the command authorization set “NOC”
with this user. Additionally, configure “privilege level” of 15 and enable “shell
(exec)” under TACACS+ Settings.
SCRack4R2#telnet 141.1.100.5
Trying 141.1.100.5 ... Open
Username: ADMIN
Password:
SCRack4R5#conf t
Enter configuration commands, one per line. End with CNTL/Z.
SCRack4R5(config)#interface fastEthernet 0/0
SCRack4R2#telnet 141.1.100.5
Trying 141.1.100.5 ... Open
Username: NOC
Password:
SCRack4R5#conf t
Command authorization failed.
SCRack4R5#conf n
Command authorization failed.
SCRack4R5#dir
Directory of flash:/
SCRack4R5#show running-config
Building configuration...
Console Access
Username: ADMIN
Password:
SCRack4R5#conf t
Enter configuration commands, one per line. End with CNTL/Z.
SCRack4R5(config)#exit
Sep 8 15:22:32.126: %SYS-5-CONFIG_I: Configured from console by ADMIN
on console
SCRack4R5#show user
Line User Host(s) Idle Location
* 0 con 0 ADMIN idle 00:00:00
SW2:
!
! Enable AAA on the switch and configure dot1x authentication via
radius
!
aaa new-model
aaa authentication dot1x default group radius
aaa authorization network default group radius
!
! Configure a authentication list for VTY
!
aaa authentication login VTY line
!
! Enable dot1x authentication globally on the switch
!
dot1x system-auth-control
!
! Enable dot1x authentication attributes on port 16
!
interface FastEthernet0/16
switchport mode access
dot1x port-control auto
dot1x guest-vlan 5
dot1x auth-fail vlan 43
no shutdown
!
! Configure the connection with radius server
!
ip radius source-interface Loopback 0
radius-server host 10.0.0.100
radius-server key cisco
!
! Apply the VTY list on VTY lines
!
line vty 0 15
login authentication VTY
AAA Server:
Step 1:
Add SW2 as a RADIUS client to the ACS server using the authentication key
“cisco”.
Step 2:
Step 3:
Add new user to the ACS server, named “dot1x-user”. Configure RADIUS
attributes for the new user per the screenshot below. Make sure the Tags of the
Values are set to 1 and configure the exact name of the vlan which in our case
is “VLAN0255”:
SW2:
interface FastEthernet0/20
switchport mode access
dot1x port-control auto
dot1x guest-vlan 5
dot1x auth-fail vlan 43
SCRack4SW2#show vlan id 5
VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1
Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------
-----
5 enet 100005 1500 - - - - - 0
0
SW2:
!
! Revert back the configuration on FastEthernet0/20
!
default interface FastEthernet0/20
interface FastEthernet0/20
switchport mode access
switchport access vlan 12
SCRack4SW2#telnet 150.4.8.8
Trying 150.4.8.8 ... Open
Password:
SCRack4SW2>en
Password:
SCRack4SW2#exit
ASA1:
!
! Configure the outside ACL to allow per-user entries
!
access-group outside_in in int outside per-user-override
!
! Configure the interesting traffic for cut-through proxy
!
access-list AUTH permit tcp 10.0.0.0 255.0.0.0 any eq telnet
!
! Configure the ASA to speak radius with the ACS server
!
aaa-server RAD protocol radius
aaa-server RAD (outside) host 10.0.0.100
key cisco
!
! Enable authentication for connections through the ASA
!
aaa authentication match AUTH outside RAD
ACS:
Step 1:
Add the ASA as a new RADIUS client to the ACS server. Then, add new
downloadable ACL to the ACS server. To do that, go to Shared Profile
Components | Downloadable IP ACLs and click Add:
Step 2:
Add a new user named “user-cut” in the ACS and associate the downloadable
ACL with the user.
Step 3:
AAA Server:
Add a new user in the ACS server , name “SSHUSER” using the password of
“cisco”
Password:
Type help or '?' for a list of available commands.
Rack4ASA>
ACS:
R4:
!
! Configure R4 as NTP stratum level 2
!
ntp master 2
!
! Configure authentication
!
ntp authentication-key 1 md5 cisco
ntp trusted-key 1
ntp authenticate
!
! Configure peering with R5 and timezone
!
ntp peer 150.4.5.5 key 1 source Loopback 0
clock timezone PST -8
clock summer-time PDT recurring
R5:
!
! Configure R5 as NTP stratum level 2
!
ntp master 2
!
! Configure authentication
!
ntp authentication-key 1 md5 cisco
ntp trusted-key 1
ntp authenticate
!
! Configure peering with R4 and timezone
!
ntp peer 150.4.4.4 key 1 source Loopback 0
clock timezone PST -8
clock summer-time PDT recurring
R4 and R5:
!
! Configure key-chain for EIGRP.Notice the overlapping between accept-
! lifetimes
!
key chain EIGRP
key 1
key-string CISCO1
accept-lifetime local 00:00:00 Jan 1 1993 00:05:00 Jan 1 2011
send-lifetime local 00:00:00 Jan 1 1993 00:00:00 Jan 1 2011
key 2
key-string CISCO2
accept-lifetime local 23:55:00 Dec 31 2010 infinite
send-lifetime local 00:00:00 Jan 1 2011 infinite
!
! Apply EIGRP authentication on both EIGRP running interfaces
!
interface Serial 0/1
ip authentication mode eigrp 100 md5
ip authentication key-chain eigrp 100 EIGRP
!
interface Serial 0/0.45
ip authentication mode eigrp 100 md5
ip authentication key-chain eigrp 100 EIGRP
SCRack4R5#show clock
17:56:36.766 PDT Thu Sep 10 2009
SCRack4R4#show clock
17:57:09.159 PDT Thu Sep 10 2009
Change clocks on both machines and see if EIGRP authentication key switches
without losing neighbor relations.
R4 and R5
clock set 23:54:00 31 Dec 2010
SCRack4R5show clock
23:55:08.804 PST Fri Dec 31 2010
SCRack4R5#show clock
00:00:26.950 PST Sat Jan 1 2011
SCRack4R5#show clock
00:05:03.403 PST Sat Jan 1 2011
!
! Configure class-map to classify Traffic/ match ACL 100
!
class-map cmap-cpp
match access-group 100
!
! Configure Policing as required
!
policy-map pmap-cpp
class cmap-cpp
police 9000 conform transmit exceed drop
!
! Apply policy-map to the control plane
!
control-plane
service-policy input pmap-cpp
!
! Deny ssh, https and telnet to the router unless received on
Serial0/0.25
!
control-plane host
management-interface Serial 0/0.25 allow ssh https telnet icmp
!
! Create ACL to match on ODD IP addresses
!
access-list 1 deny 0.0.0.1 255.255.255.254
access-list 1 permit any
SCRack4R2#telnet 141.1.100.5
Trying 141.1.100.5 ...
% Connection timed out; remote host not responding
R5
!
undebug all
!
SCRack4R1#ping 141.1.25.5
SCRack4R1#telnet 141.1.25.5
Trying 141.1.25.5 ...
% Connection refused by remote host
SCRack4R5#show access-lists 1
Standard IP access list 1
10 deny 0.0.0.1, wildcard bits 255.255.255.254 (1 match)
20 permit any (4 matches)
!
! Call the ACL in a class-map
!
class-map icmp-class
match access-group 101
!
! Configure policy-map to drop traffic
!
policy-map control-plane-out
class icmp-class
drop
!
! Apply the policy-map on the control-plane
!
control-plane
service-policy output control-plane-out
R2:
!
ip route 100.100.100.100 255.255.255.255 141.1.25.5
Rack4R2#debug ip icmp
!
R2:
!
no ip route 100.100.100.100 255.255.255.255 141.1.25.5
undebug all
!
! Configure a class-map and call the ACL in it
!
class−map ACL−IP−OPTIONS−CLASS
match access−group name ACL−IP−OPTIONS−ANY
!
! Configure the aggregate-policy to drop
!
policy−map COPP−POLICY
class ACL−IP−OPTIONS−CLASS
drop
!
! Apply the policy
!
control−plane
service−policy input COPP−POLICY
SCRack4R1#ping
Protocol [ip]:
Target IP address: 144.1.123.2
Repeat count [5]: 1
Datagram size [100]:
Timeout in seconds [2]:
Extended commands [n]: y
Source address or interface:
Type of service [0]:
Set DF bit in IP header? [no]:
Validate reply data? [no]:
Data pattern [0xABCD]:
Loose, Strict, Record, Timestamp, Verbose[none]: Record
Number of hops [ 9 ]:
Loose, Strict, Record, Timestamp, Verbose[RV]:
Sweep range of sizes [n]:
Type escape sequence to abort.
Sending 1, 100-byte ICMP Echos to 144.1.123.2, timeout is 2 seconds:
Packet has IP options: Total option bytes= 39, padded length=40
Record route: <*>
(0.0.0.0)
(0.0.0.0)
(0.0.0.0)
(0.0.0.0)
(0.0.0.0)
(0.0.0.0)
(0.0.0.0)
(0.0.0.0)
(0.0.0.0)
!
! Call the ACL in a class-map
!
class−map CMAP−TTL−LOW−CLASS
match access−group name ACL−IP−TTL−LOW
!
! Configure the policy to drop an apply it to the transit sub-interface
of RP
!
policy−map CPPR−TRANSIT−POLICY
class CMAP−TTL−LOW−CLASS
drop
!
control−plane transit
service−policy input CPPR−TRANSIT−POLICY
!
! Configure CPU monitoring
!
process cpu threshold type total rising 95 interval 10 falling 20
interval 20
SCRack4R5#wr
Building configuration...
R5
!
! Enable HSRP MD5 authentication
!
interface FastEthernet 0/1
standby 1 authentication md5 key-string CISCO
!
! Configure the policy-map and apply it outbound on Serial0/1
!
policy-map pmap-outbound
class PRIORITY
bandwidth percent 25
class ICMP
police rate percent 10
class TELNET
set dscp af43
!
interface Serial 0/1
service-policy out pmap-outbound
SCRack4R4#telnet 141.1.45.5
Trying 141.1.45.5 ...
% Connection timed out; remote host not responding
ASA1:
!
! Allow inbound Netflow reporting traffic from R6 Loopback
!
access-list outside permit udp host 150.4.6.6 host 141.1.100.88 eq 9999
512 544 576 1024 1536 2048 2560 3072 3584 4096 4608
.000 .000 .005 .000 .000 .000 .000 .000 .000 .000 .000
!
! Apply the inspection under the default global_policy so we cover all
! interfaces
!
policy-map global_policy
class inspection_default
inspect snmp NO_SNMP_V1
Global policy:
Service-policy: global_policy
Class-map: inspection_default
Inspect: dns preset_dns_map, packet 0, drop 0, reset-drop 0
Inspect: ftp, packet 0, drop 0, reset-drop 0
Inspect: h323 h225 _default_h323_map, packet 0, drop 0, reset-
drop 0
Inspect: h323 ras _default_h323_map, packet 0, drop 0, reset-drop
0
Inspect: netbios, packet 0, drop 0, reset-drop 0
Inspect: rsh, packet 0, drop 0, reset-drop 0
Inspect: rtsp, packet 0, drop 0, reset-drop 0
Inspect: skinny , packet 0, drop 0, reset-drop 0
Inspect: esmtp _default_esmtp_map, packet 0, drop 0, reset-drop 0
Inspect: sqlnet, packet 0, drop 0, reset-drop 0
Inspect: sunrpc, packet 0, drop 0, reset-drop 0
Inspect: tftp, packet 0, drop 0, reset-drop 0
Inspect: sip , packet 0, drop 0, reset-drop 0
Inspect: xdmcp, packet 0, drop 0, reset-drop 0
Inspect: icmp, packet 4052, drop 0, reset-drop 0
Inspect: snmp NO_SNMP_V1, packet 11, drop 11, reset-drop 0
SW2:
!
! Remove SNMP configuration
!
no snmp-server host 141.1.100.2 cisco
no snmp-server enable traps
SW1:
!
interface Vlan43
ip address 204.12.4.10 255.255.255.0
no shutdown
SCRack4SW1#ping 204.12.4.4
R5:
!
! Configure HSRP to use the BIA MAC address instead of the virtual MAC
! address
!
interface FastEthernet 0/1
standby use-bia
SW1:
!
! Enable port-security; if violation occurs send a syslog message
!
interface FastEthernet 0/2
switchport port-security
switchport port-security violation restrict
SW2:
!
! Enable port-security; if violation occurs send a syslog message
!
interface FastEthernet 0/5
switchport port-security
switchport port-security violation restrict
SCRack4R2#show standby
FastEthernet0/0 - Group 1
State is Active
1 state change, last state change 3d15h
Virtual IP address is 141.1.100.25
Active virtual MAC address is 0013.c451.f240
Local virtual MAC address is 0013.c451.f240 (bia)
Hello time 3 sec, hold time 10 sec
Next hello sent in 2.856 secs
Authentication MD5, key-string "cisco"
Preemption enabled
Active router is local
Standby router is 141.1.100.5, priority 100 (expires in 9.652 sec)
Priority 101 (configured 101)
Group name is "HSRP1" (cfgd)
SCRack4SW1#show port-security
Secure Port MaxSecureAddr CurrentAddr SecurityViolation Security
Action
(Count) (Count) (Count)
-----------------------------------------------------------------------
Fa0/2 1 1 0
Restrict
-----------------------------------------------------------------------
Total Addresses in System (excluding one mac per port) : 0
Max Addresses limit in System (excluding one mac per port) : 5120
Protected: true
Unknown unicast blocked: enabled
Unknown multicast blocked: disabled
Appliance trust: none
!
! Use CAR to limit the traffic
!
interface Serial 0/0.123
rate-limit output access-group 110 128000 32000 32000 conf tran ex
drop
SCRack4R2#ping 141.1.100.12
ASA2:
!
! Configure hostname, nameifs and IP addresses as per the diagram
!
hostname Rack4ASA2
!
interface Ethernet 0/0
no shutdown
nameif outside
ip address 136.1.100.13 255.255.255.0
ASA2:
Rack4ASA2# show nameif
Interface Name Security
Ethernet0/0 outside 0
ASA2:
!
! Enable OSPF on the outside interface in area 136; be as specific as
! possible with the network command
!
router ospf 1
router-id 150.4.13.13
network 136.1.100.13 255.255.255.255 area 136
ASA2:
1 * *
Rack4ASA1# show conn
5 in use, 6 most used
UDP outside 136.1.125.5:49188 inside 10.0.0.100:1646, idle 0:00:15,
bytes 0, flags -
UDP outside 136.1.125.5:49187 inside 10.0.0.100:1645, idle 0:00:18,
bytes 0, flags -
ASA1:
!
! Configure static PAT for UDP port 53
!
static (outside,inside) udp interface 53 136.1.59.100 53
!
! Configure PAT for hosts on Vlan 10
!
nat (inside) 10.0.0.0 255.255.255.0
global (outside) 1 interface
!
! Configure a class-map and match packets marked EF
!
class-map cmap-voice
match dscp ef
!
! Assign traffic to the priority queue by calling the class-map in the
! global policy-map
!
policy-map global_policy
class cmap-voice
priority
Queue Type = BE
Tail Drops = 0
Reset Drops = 0
Packets Transmit = 1
Packets Enqueued = 0
Current Q Length = 0
Max Q Length = 0
R5:
!
ip telnet tos B8
SCRack4R5#telnet 136.1.125.100 49
Trying 136.1.125.100, 49 ... Open
Queue Type = BE
Tail Drops = 0
Reset Drops = 0
Packets Transmit = 5
Packets Enqueued = 0
Current Q Length = 0
Max Q Length = 0
R5:
!
no ip telnet tos B8
!
!
! Set the SLA lifetime to be infinite
!
sla monitor schedule 5 life forever start-time now
!
! Create the tracking object and attach it to the static route
!
track 1 rtr 5 reachability
route outside 54.4.2.254 255.255.255.255 136.1.100.3 track 1
!
! Configure username for SSH authentication and hard-code SSH version 2
!
username SSH password 0 CISCO
ip ssh time-out 30
!
! Configure incoming and outgoing telnet/SSH sessions. The exec-timeout
! should be 5 minutes
!
line vty 0 5
transport input ssh telnet
transport output ssh telnet
exec-timeout 5
R4:
!
! Configure SSH version 2
!
ip domain name INE.com
crypto key generate rsa general modulus 1024
ip ssh version 2
!
! Configure username for SSH authentication and hard-code SSH version 2
!
username SSH password 0 CISCO
ip ssh time-out 30
!
! Configure incoming and outgoing telnet/SSH sessions. The exec-timeout
! should be 5 minutes
!
line vty 0 5
transport input ssh telnet
transport output ssh telnet
exec-timeout 5
Password:
SCRack4R3>exit
R6:
!
! Configure the ACL to allow necessary traffic inbound on Fa0/1
!
ip access-list extended FROM_BB3
permit icmp any any echo-reply
permit icmp any any port-unreachable
permit icmp any any time-exceed
permit tcp host 204.12.4.254 eq bgp host 204.12.4.6
permit tcp host 204.12.4.254 host 204.12.4.6 eq bgp
!
! Configure the ACL to be used for blocking JAVA applets
!
access-list 1 deny any
!
! Configure the inspection of tcp, udp, ftp and smtp traffic
!
ip inspect name TO_BB3 tcp
ip inspect name TO_BB3 udp
ip inspect name TO_BB3 ftp
ip inspect name TO_BB3 smtp
!
! Deny java to everyone
!
ip inspect name TO_BB3 http java-list 1
!
! Configure DNS timeout and TCP session deletion 3 seconds after FIN
!
ip inspect dns-timeout 3
ip inspect tcp finwait 3
ip inspect max-incomplete low 150
ip inspect max-incomplete high 250
!
! Disable alerts
!
ip inspect alert-off
!
! Set hash table size that is closest to average number of sessions
!
ip inspect hashtable-size 4096
!
! Apply the ACL inbound and inspection outbound on Fa0/1 towards BB3
!
interface FastEthernet0/1
ip inspect TO_BB3 out
ip access-group FROM_BB3 in
Interface Configuration
Interface FastEthernet0/1
Inbound inspection rule is not set
Outgoing inspection rule is TO_BB3
tcp alert is off audit-trail is off timeout 3600
udp alert is off audit-trail is off timeout 30
ftp alert is off audit-trail is off timeout 3600
smtp max-data 20000000 alert is off audit-trail is off timeout 3600
http java-list 1 alert is off audit-trail is off timeout 3600
Inbound access list is FROM_BB3
Outgoing access list is not set
R1:
!ip route 204.12.4.0 255.255.255.0 136.1.136.6
SCRack4R1#ping 204.12.4.254
SCRack4R1#telnet 204.12.4.254
Trying 204.12.4.254 ... Open
+-----------------------------------------------------------------------+
| |
| Welcome to BB3. These commands are available for use at privilege 0 |
| |
| ping show ip bgp |
| telnet show ip bgp neighbors |
| traceroute show ip bgp summary |
| show ip route show ip interface brief |
| show ip protocols |
| |
| The reference configuration for this device is available at: |
| http://www.ine.com/downloads/bb3.txt |
| |
+-----------------------------------------------------------------------+
SC.9.9.BB3>
SCRack4R1#traceroute 204.12.4.254
R1:
!
no ip route 204.12.4.0 255.255.255.0 136.1.136.6
!
! Configure inspect class-map to match on outbound traffic
!
class-map type inspect match-any cmap-outbound-apps
match protocol ssh
match protocol telnet
match protocol icmp
match protocol tcp
!
! Configure inspect class-map to match on inbound traffic
!
class-map type inspect match-any cmap-inbound-apps
match protocol telnet
match protocol icmp
!
! Configure an inspect parameter-map to set some parameters like in
CBAC
!
parameter-map type inspect param-map
audit-trail on
max-incomplete low 5
max-incomplete high 10
dns-timeout 3
sessions maximum 50
tcp synwait-time 5
!
! Configure an urlfilter parameter-map to deny a certain URL
!
parameter-map type urlfilter param-map-url
exclusive-domain deny .badsite.com
!
! Configure the inspect policy-map for inbound traffic
!
policy-map type inspect pmap-inbound
class type inspect cmap-inbound-apps
inspect param-map
police rate 20000 burst 5000
class type inspect cmap-http
inspect param-map
urlfilter param-map-url
!
! Configure the inspect policy-map for outbound traffic
!
policy-map type inspect pmap-outbound
class type inspect cmap-outbound-apps
inspect param-map
class type inspect cmap-http
inspect param-map
urlfilter param-map-url
!
! Create the two security zones
!
zone security inside
zone security outside
!
! Configure zone-pairs and apply firewall policies correspondingly
!
zone-pair security inside-outside source inside destination outside
service-policy type inspect pmap-outbound
!
! Map interfaces to security zones
!
interface Loopback 4
zone-member security inside
!
interface Serial0/1
zone-member security inside
!
interface Serial 0/0.1245
zone-member security inside
!
interface FastEthernet0/1
zone-member security inside
!
interface Loopback 0
zone-member security inside
!
interface FastEthernet 0/0
zone-member security outside
SCRack4SW2#ping 136.1.255.7
SCRack4SW2#telnet 136.1.255.7
Trying 136.1.255.7 ... Open
Password:
SCRack4SW1>exit
SCRack4SW1#ping 136.1.255.8
SCRack4SW1#telnet 136.1.255.8
Trying 136.1.255.8 ... Open
Password:
SCRack4SW2>exit
<snip>
Zone-pair: outside-inside
Police
rate 20000 bps,5000 limit
conformed 52 packets, 3718 bytes; actions: transmit
exceeded 0 packets, 0 bytes; actions: drop
conformed 0 bps, exceed 0 bps
!
! Configure the keyring
!
crypto keyring vpn
pre-shared-key address 150.4.4.4 key cisco
!
! Configure the isakmp profile, needed for keyring match
!
crypto isakmp profile isa-prof
keyring vpn
match identity address 150.4.4.4 255.255.255.255
!
! Configure the proxy-ACL for IPSec interesting traffic
!
ip access-list extended VLAN100_TO_VLAN4
permit ip 136.1.100.0 0.0.0.255 10.4.4.0 0.0.0.255
!
! Configure the IPSec encryption/hashing policy, aka transform-set
!
crypto ipsec transform-set AES_256_SHA esp-aes 256 esp-sha-hmac
!
! Bound all the above together in the crypto-map. Configure PFS so that
! a new DH exchange is forced with every new SA; specify the SA
lifetime
! to be 10 minutes; specify IKE/IPSec traffic to be
initiated/terminated
! on the Loopback interface
!
crypto map VPN local-address loop 0
crypto map VPN isakmp-profile isa-prof
crypto map VPN 20 ipsec-isakmp
match address VLAN100_TO_VLAN4
set peer 150.4.4.4
set transform-set AES_256_SHA
set pfs group5
set isakmp-profile isa-prof
set security-association lifetime seconds 600
!
! Apply the crypto-map
!
interface FastEthernet 0/0
crypto map VPN
R4:
!
! Configure the strongest ISAKMP policy with AES 256 and SHA-1
!
crypto isakmp policy 20
encr aes 256
hash sha
auth pre-share
group 5
!
! Configure the keyring
!
crypto keyring vpn vrf vrf1
pre-shared-key address 150.4.3.3 key cisco
!
! Configure the isakmp profile, needed for keyring match. Maje sure to
! specify the VRF in it
!
crypto isakmp profile isa-prof
vrf vrf1
keyring vpn
match identity address 150.4.3.3 255.255.255.255 vrf1
!
! Configure the proxy-ACL for IPSec interesting traffic
!
ip access-list extended VLAN4_TO_VLAN100
permit ip 10.4.4.0 0.0.0.255 136.1.100.0 0.0.0.255
!
! Configure the IPSec encryption/hashing policy, aka transform-set
!
crypto ipsec transform-set AES_256_SHA esp-aes 256 esp-sha-hmac
!
!
!
crypto map VPN isakmp-profile isa-prof
crypto map VPN local-address loopback 0
crypto map VPN 10 ipsec-isakmp
match address VLAN4_TO_VLAN100
set peer 150.4.3.3
set transform-set AES_256_SHA
set pfs group5
set security-association lifetime seconds 600
set isakmp-profile isa-prof
!
! Apply the crypto-map
!
interface Serial 0/1
crypto map VPN
!
int Serial 0/0.1245
crypto map VPN
interface: FastEthernet0/0
Crypto map tag: VPN, local addr 150.4.3.3
inbound ah sas:
outbound ah sas:
ASA2:
!
! Enable ISAKMP on the outside interface and configure ISAKMP policy.
! Configure DH group 1,as it’s the only supported by L2TP clients; the
! ASA uses DH group 2 by default
!
crypto isakmp enable outside
crypto isakmp policy 10
encr des
hash md5
group 1
auth pre-share
!
! Create L2TP user ans store password in format accessible for MSCHAP
as
! the ASA will authenticate the user against local database
!
username L2TP password CISCO mschap
username L2TP attributes
vpn-tunnel-protocol l2tp-ipsec
!
! Configure address pool for L2TP users
!
ip local pool L2TP_POOL 192.168.100.1-192.168.100.100 mask
255.255.255.0
!
! Configure default RA group policy, permit L2TP over IPsec.
!
group-policy DfltGrpPolicy attributes
vpn-tunnel-protocol IPSec l2tp-ipsec
!
! Create transport mode IPSec as Windows L2TP clients use transport
mode
!
crypto ipsec transform-set DES_MD5_TRANS esp-des esp-md5-hmac
crypto ipsec transform-set DES_MD5_TRANS mode transport
!
! Configure dynamic crypto map for IPsec wrapping of L2TP
!
crypto dynamic-map DYNAMIC 10 set transform-set DES_MD5_TRANS
crypto map VPN 1000 ipsec-isakmp dynamic DYNAMIC
crypto map VPN interface outside
!
! Configure Default RA group, assign Address Pool and Auth Server
!
tunnel-group DefaultRAGroup general-attributes
address-pool L2TP_POOL
authentication-server-group LOCAL
!
! Configure IPsec pre-shared key
!
tunnel-group DefaultRAGroup ipsec-attributes
pre-shared-key CISCO
!
! Permit U-Turn on the outside, to reach out the IPS
!
same-security-traffic permit intra-interface
Active SA: 1
Rekey SA: 0 (A tunnel will report 1 Active and 1 Rekey SA during
rekey)
Total IKE SA: 1
IKE Tunnels: 1
IPsec Tunnels: 1
L2TPOverIPsec Tunnels: 1
IKE:
Tunnel ID : 1.1
UDP Src Port : 500 UDP Dst Port : 500
IKE Neg Mode : Main Auth Mode : preSharedKeys
Encryption : DES Hashing : MD5
Rekey Int (T): 28800 Seconds Rekey Left(T): 28558 Seconds
D/H Group : 1
Filter Name :
IPsec:
Tunnel ID : 1.2
Local Addr : 136.1.100.13/255.255.255.255/17/1701
Remote Addr : 136.1.125.105/255.255.255.255/17/1701
Encryption : DES Hashing : MD5
Encapsulation: Transport
Rekey Int (T): 3600 Seconds Rekey Left(T): 3357 Seconds
Rekey Int (D): 250000 K-Bytes Rekey Left(D): 249980 K-Bytes
Idle Time Out: 30 Minutes Idle TO Left : 29 Minutes
Bytes Tx : 1330 Bytes Rx : 21226
Pkts Tx : 25 Pkts Rx : 113
L2TPOverIPsec:
Tunnel ID : 1.3
Username : L2TP
Assigned IP : 192.168.100.1 Public IP : 136.1.125.105
Encryption : none Auth Mode : msCHAPV1
Idle Time Out: 30 Minutes Idle TO Left : 27 Minutes
Client OS : Microsoft
Client OS Ver: 5.0
Bytes Tx : 366 Bytes Rx : 17746
Pkts Tx : 16 Pkts Rx : 102
NAC:
Reval Int (T): 0 Seconds Reval Left(T): 0 Seconds
SQ Int (T) : 0 Seconds EoU Age(T) : 246 Seconds
Hold Left (T): 0 Seconds Posture Token:
Redirect URL :
!
! Since all traffic from inside is NAT’ed we need to configure NAT
! exemption for IPSec traffic; match the IPSec traffic in ACL
!
access-list nonat permit ip 10.0.0.0 255.255.255.0 136.1.100.0
255.255.255.0
!
! Configure proxy-ACL to match interesting IPSec traffic
!
access-list crypto-acl permit ip 10.0.0.0 255.255.255.0 136.1.100.0
255.255.255.0
!
! Configure the tunnel-group and pre-shared key
!
tunnel-group 136.1.100.13 type ipsec-l2l
tunnel-group 136.1.100.13 ipsec-attributes
pre-shared-key cisco
!
! Configure IPSec traffic policy, aka transform set
!
crypto ipsec transform-set ESP-3DES-SHA esp-3des esp-sha-hmac
!
! Configure the crypto map and apply it on outside interface
!
crypto map outside_map 1 match address crypto-acl
crypto map outside_map 1 set pfs group1
crypto map outside_map 1 set peer 136.1.100.13
crypto map outside_map 1 set transform-set ESP-3DES-SHA
crypto map outside_map interface outside
!
! Configure NAT exemption for IPSec traffic
!
nat (inside) 0 access-list nonat
ASA2:
!
! Configure proxy-ACL to match interesting IPSec traffic
!
access-list crypto-acl permit ip 136.1.100.0 255.255.255.0 10.0.0.0
255.255.255.0
!
! Configure IKE Phase 1 policy to match on with ASA1
!
crypto isakmp policy 20
authentication pre-share
encryption 3des
hash sha
!
! Configure the tunnel-group and pre-shared key
!
tunnel-group 136.1.125.12 type ipsec-l2l
tunnel-group 136.1.125.12 ipsec-attributes
pre-shared-key cisco
!
! Configure IPSec traffic policy, aka transform set
!
crypto ipsec transform-set ESP-3DES-SHA esp-3des esp-sha-hmac
!
! Configure the crypto-map with a sequence number lower than 1000 which
! is the dynamic entry for task 3.2
!
crypto map VPN 1 match address crypto-acl
crypto map VPN 1 set pfs group1
crypto map VPN 1 set peer 136.1.125.12
crypto map VPN 1 set transform-set ESP-3DES-SHA
Active SA: 1
Rekey SA: 0 (A tunnel will report 1 Active and 1 Rekey SA during
rekey)
Total IKE SA: 1
R3:
!
! Configure R3 as NTP master and authenticate clients
!
ntp source Loopback0
ntp master 2
ntp authentication-key 1 md5 cisco
ntp trusted-key 1
ntp authenticate
clock timezone PST -8
clock summer-time PDT recurring
!
! Enable the HTTP server necessary for certificate server
!
ip http server
ip domain-name INE.com
!
! Configure the IOS CA server; specify the database path and the level
! of information stored in the database to minimum; activate the server
! and configure the server to issue certificates automatically
!
crypto pki server R3-CA_Server
database url nvram:
database level minimum
grant auto
no shutdown
!
! Configure R3 as trustpoint and authenticate/enroll with it; since R3
! is actively participating in the VPN it needs a certificate of its
own
!
crypto ca trustpoint R3-CA
enrollment url http://150.4.3.3:80
revocation-check none
!
cry pki authenticate R3-CA
cryp pki enroll R3-CA
!
! Configure IKE Phase 1 policy
!
crypto isakmp policy 1
encr aes
hash sha
authentication rsa-sig
!
! Configure the IPSec traffic policy, aka transform-set
!
crypto ipsec transform-set Trans-GDOI-AES-SHA esp-aes esp-sha
!
! Configure the IPSec profile
!
crypto ipsec profile PROF-GDOI-Group1
set transform-set Trans-GDOI-AES-SHA
!
! Configure the GDOI policy and the data-plane protection parameters
!
crypto gdoi group group1
identity number 1
server local
address ipv4 150.4.3.3
rekey authentication mypubkey rsa SCRack4R3.INE.com
rekey transport unicast
sa ipsec 1
profile PROF-GDOI-Group1
match address ipv4 136
redundancy
local priority 10
!
! Configure the proxy-ACL, interesting traffic for IPSec, which will
get
! downloaded by every GM
!
access-list 136 permit icmp host 136.1.136.1 host 136.1.136.6
access-list 136 permit icmp host 136.1.136.6 host 136.1.136.1
R6:
!
! Configure NTP and synchronize with R3
!
clock timezone PST -8
clock summer-time PDT recurring
ntp authentication-key 1 md5 cisco
ntp trusted-key 1
ntp authenticate
ntp server 150.4.3.3 key 1 source Loopback0
!
! Generate RSA keys for certificate enrollment
!
ip domain-name INE.com
crypto key generate rsa general-keys modulus 1024
!
! Configure the trustpoint and authenticate/enroll with the CA
!
crypto ca trustpoint R3-CA
enrollment url http://150.4.3.3:80
revocation-check none
!
cry pki authenticate R3-CA
cryp pki enroll R3-CA
!
! Configure the IKE Phase 1 policy
!
crypto isakmp policy 1
encr aes
hash sha
authentication rsa-sig
!
! Configure the GDOI group and server IP address
!
crypto gdoi group group1
identity number 1
server address ipv4 150.4.3.3
!
! Configure the crypto-map, reference the GDOI group and apply the
! crypto-map
!
crypto map map-group1 10 gdoi
set group group1
!
interface FastEthernet0/0
crypto map map-group1
R1:
!
! Configure NTP and synchronize with R3
!
clock timezone PST -8
clock summer-time PDT recurring
ntp authentication-key 1 md5 cisco
ntp trusted-key 1
ntp authenticate
ntp server 150.4.3.3 key 1 source Loopback0
!
! Generate RSA keys for certificate enrollment
!
ip domain-name INE.com
crypto key generate rsa general-keys modulus 1024
!
! Configure the trustpoint and authenticate/enroll with the CA
!
crypto ca trustpoint R3-CA
enrollment url http://150.4.3.3:80
revocation-check none
!
crypto pki authenticate R3-CA
crypto pki enroll R3-CA
!
! Configure the IKE Phase 1 policy
!
crypto isakmp policy 1
encr aes
hash sha
authentication rsa-sig
!
! Configure the GDOI group and server IP address
!
crypto gdoi group group1
identity number 1
server address ipv4 150.4.3.3
!
! Configure the crypto-map, reference the GDOI group and apply the
! crypto-map
!
CA Certificate
Status: Available
Certificate Serial Number: 0x1
Certificate Usage: Signature
Issuer:
cn=R3-CA_Server
Subject:
cn=R3-CA_Server
Validity Date:
start date: 10:12:34 PDT Sep 14 2009
end date: 10:12:34 PDT Sep 13 2012
Associated Trustpoints: R3-CA
CA Certificate
Status: Available
Certificate Serial Number (hex): 01
Certificate Usage: Signature
Issuer:
cn=R3-CA_Server
Subject:
cn=R3-CA_Server
Validity Date:
start date: 10:12:34 PDT Sep 14 2009
end date: 10:12:34 PDT Sep 13 2012
Associated Trustpoints: R3-CA
Storage: nvram:R3-CA_Server#1CA.cer
CA Certificate
Status: Available
Certificate Serial Number: 0x1
Certificate Usage: Signature
Issuer:
cn=R3-CA_Server
Subject:
cn=R3-CA_Server
Validity Date:
start date: 10:12:34 PDT Sep 14 2009
end date: 10:12:34 PDT Sep 13 2012
Associated Trustpoints: R3-CA R3-CA_Server
IPSec SA Number : 1
IPSec SA Rekey Lifetime: 3600 secs
Profile Name : PROF-GDOI-Group1
Replay method : Count Based
Replay Window Size : 64
SA Rekey
Remaining Lifetime : 860 secs
ACL Configured : access-list 136
Rekeys received
Cumulative : 0
After registration : 0
Rekey Acks sent : 0
KEK POLICY:
Rekey Transport Type : Unicast
Lifetime (secs) : 86362
Encrypt Algorithm : 3DES
Key Size : 192
Sig Hash Algorithm : HMAC_AUTH_SHA
Sig Key Length (bits) : 1024
TEK POLICY:
FastEthernet0/0:
IPsec SA:
sa direction:inbound
spi: 0x6DD91C6(115184070)
transform: esp-aes esp-sha-hmac
sa timing:remaining key lifetime (sec): (825)
Anti-Replay : Disabled
IPsec SA:
sa direction:outbound
spi: 0x6DD91C6(115184070)
transform: esp-aes esp-sha-hmac
sa timing:remaining key lifetime (sec): (825)
Anti-Replay : Disabled
IPsec SA:
sa direction:inbound
spi: 0x6DD91C6(115184070)
transform: esp-aes esp-sha-hmac
sa timing:remaining key lifetime (sec): (824)
Anti-Replay : Disabled
IPsec SA:
sa direction:outbound
spi: 0x6DD91C6(115184070)
transform: esp-aes esp-sha-hmac
sa timing:remaining key lifetime (sec): (824)
Anti-Replay : Disabled
SCRack4R1#ping 136.1.136.6
interface: FastEthernet0/0
Crypto map tag: map-group1, local addr 136.1.136.1
inbound ah sas:
outbound ah sas:
standard-time-zone-name UTC
exit
exit
! ------------------------------
service logger
exit
! ------------------------------
service network-access
exit
! ------------------------------
service notification
exit
! ------------------------------
service signature-definition sig0
exit
! ------------------------------
service ssh-known-hosts
exit
! ------------------------------
service trusted-certificates
exit
! ------------------------------
service web-server
exit
! ------------------------------
service anomaly-detection ad0
exit
! ------------------------------
service external-product-interface
exit
! ------------------------------
service analysis-engine
exit
SW1:
!
! Create the RSPAN vlan 111
!
vlan 111
remote-span
!
! Configure SPAN sessions sourced off vlan 52
!
monitor session 1 source vlan 52 rx
monitor session 1 destination remote vlan 111 reflector fa 0/19
SW2:
!
! Create an RSPAN vlan 52
!
vlan 111
remote-span
!
! Configure a SPAN session of VLAN 111 and VLAN 52
!
monitor session 1 source vlan 52 , 111 rx
monitor session 1 destination interface FastEthernet0/10
IDM:
Enable the ICMP echo and echo-reply signatures to test sensor configuration. Go
to Policies | Signature Definitions | sig0 and enable signatures
2000 and 2004:
You may configure the same thing from the IPS CLI:
Note
The sensor supports many IP fragment reassembly methods; the default being
Wondows NT. All the rest are supported only if the sensor runs in promiscuous
mode.
The TCP stream reassembly mode can be strict (only allows the next expected in
the sequence), loose (allows gaps in the sequence) or asymmetric (allows
asymmetric traffic to be reassembled). We need the loose mode per the
requirements.
Rack4IPS# conf t
Rack4IPS(config)# service signature-definition sig0
Rack4IPS(config-sig)# fragment-reassembly
Rack4IPS(config-sig-fra)# ip-reassemble-mode linux
Rack4IPS(config-sig-fra)# exit
Rack4IPS(config-sig)# stream-reassembly
Rack4IPS(config-sig-str)# tcp-reassembly-mode loose
Rack4IPS(config-sig-str)# exit
Rack4IPS(config-sig)# exit
Apply Changes:?[yes]: yes
!
! Configure ACL to match the HTTPS management subnet and apply the ACL
! to HTTPS access
!
access-list 1 permit 136.1.2.0 0.0.0.255
ip http access-class 1
!
! Create local username CISCO with password CISCO
!
username CISCO password CISCO
username CISCO privielege 15
!
! Enable AAA. Configure the default authentication/exec authorization
! list with tacacs+ and local fallback.
!
aaa new-model
aaa authentication login default group tacacs+ local
aaa authorization exec default group tacacs+ local
!
! Configure the console and VTY authentication lists plus the VTY exec
! authorization list
!
aaa authentication login CONSOLE none
aaa authentication login VTY line
aaa authorization exec VTY none
!
! In order for a user to manage router via HTTP, it must be assigned
! privilege level 15. Configure this via TACACS+ as well (fallback to
! local). Enable HTTP authentication via AAA methods - it will
! inherit the default list authentication method
ip http authentication aaa
!
! Configure the TACACS+ server IP address and key
!
tacacs-server host 136.1.125.100 key CISCO
ip tacacs source loopback0
!
! Apply authentication list on console and authentication/authorization
! list on VTY
!
line console 0
login authentication CONSOLE
line vty 0 4
login authentication VTY
authorization exec VTY
ACS:
Step 1:
Step 2:
Add new user named “WEBADMIN” with the password of “CISCO”. And
configure the following TACACS+ settings for this user: Enable Shell(exec)
and set Privilege Level to 15
Confirm that console access requires no authentication and the VTYs lines use
line authentication.
SCRack4R1#telnet 150.4.1.1
Trying 150.4.1.1 ... Open
Password:
SCRack4R1>en
Password:
SCRack4R1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
SCRack4R1(config)#exit
SCRack4R1#exit
!
! Configure the TACACS+ server’s IP address and key
!
tacacs-server host 136.1.125.100 key CISCO
ip tacacs source-interface Loopback 0
!
! Configure ACL with “deny any” for HTTP access on the router
!
access-list 1 deny any
!
! Enable the HTTP server, configure it with AAA authentication
!
ip http server
ip http authentication aaa
ip http access-class 1
!
! Configure the AUTH proxy ACL and create an AUTH proxy admission rule
!
ip access-list extended TO_SERVER
permit tcp any host 136.1.2.105 eq www
!
ip auth-proxy name ACCESS_TO_SERVER http list TO_SERVER
ip auth-proxy auth-cache-time 30
!
! Configure ACL to deny access to the server by default
!
ip access-list extended ACCESS
deny ip any host 136.1.2.105
permit ip any any
!
! Apply the ACL to filter access to server unless authenticated and
! apply AUTH proxy
!
interface Serial 0/0.1245
ip access-group ACCESS in
ip auth-proxy ACCESS_TO_SERVER
!
! Apply the authentication lists on console and VTY lines
!
line console 0
login authentication CONSOLE
!
line vty 0 4
login authentication VTY
ACS:
Step 1:
Add R2 as a TACACS+ client to the ACS server using the authentication key
value of “CISCO”.
Step 2:
Step 3:
Create new user named “AUTH” with the password of “CISCO” and set the
following attributes under the “auth-proxy” service:
priv-lvl=15
proxyacl#1=permit udp any host 136.1.2.105
proxyacl#2=permit tcp any host 136.1.2.105
proxyacl#3=permit icmp any host 136.1.2.105
Make sure R2 is able to use the ACS server for authentication. Next, open the
URL http://136.X.2.105 from the AAA server in order to verify AUTH proxy
functionality
Check the inbound ACL after successful authentication; verify that TCP/UDP and
ICMP protocols are now permitted:
!
! Configure the VRF aware TACACS+ server IP address and key; port needs
! to be specified as well.
!
aaa group server tacacs+ VRF1
server-private 136.1.125.100 port 49 key CISCO
ip vrf forwarding vrf1
ip tacacs source-interface Loopback0
!
! Apply the accounting list on both console and VTY lines; also on VTY
! lines apply the login authentication list
!
line console 0
accounting commands 15 default
!
line vty 0 15
accounting commands 15 default
ACS:
All you need to do is add R4 as a TACACS+ client to the ACS so it could send
accounting records.
SCRack4R5#telnet 150.4.4.4
Trying 150.4.4.4 ... Open
Password:
SCRack4R4>en
Password:
SCRack4R4#conf t
Enter configuration commands, one per line. End with CNTL/Z.
SCRack4R4(config)#interface fastEthernet 0/1
SCRack4R4(config-if)#exit
ACS:
!
! Lower the privilege level of the 2 commands from level 15 to level 2
!
privilege exec level 2 debug ip rip
privilege exec level 2 undebug ip rip
!
aaa authorization exec default local
SCRack4R5#telnet 150.4.5.5
Trying 150.4.5.5 ... Open
Username: CONSULTANT
Password:
SCRack4R5#show privilege
Current privilege level is 2
SCRack4R5#debug ip rip
RIP protocol debugging is on
SCRack4R5#undebug ip rip
RIP protocol debugging is off
SCRack4R5#conf t
^
% Invalid input detected at '^' marker.
SCRack4R5#exit
Note
ASA1:
!
! Configure the LDAP map
!
ldap attribute-map INE-MAP
map-name msNPAllowDialin cVPN3000-IETF-Radius-Class
!
! Configure integration with the LDAP server
!
aaa-server LDAPGROUP protocol ldap
aaa-server LDAPGROUP host 10.0.0.100
ldap-base-dn dc=training, dc=internetworkexpert, dc=com
ldap-scope subtree
ldap-naming-attribute sAMAccountName
We need to configure a password that contains the “?” character; In order to type
it in, you should press the “CTRL+V” sequence and then type the “?” character,
followed by the rest of the password.
ldap-login-password cisco?123!
ldap-login-dn
CN=Administrator,CN=Users,DC=training,DC=internetworkexpert,DC=com
server-type Microsoft
!
! Apply the LDAP map
!
ldap-attribute-map INE-MAP
!
! Configure ssh process to listen on port 2000
!
ip ssh port 2000 rotary 1
!
! Configure SSH as transport for lines 2 through 4 and assign them to a
! rotary pool
!
line vty 0 1
password cisco
login
transport input telnet
!
line vty 2 4
transport input ssh
login local
rotary 1
SCRack4R6#telnet 150.4.6.6
Trying 150.4.6.6 ... Open
Password:
SCRack4R6>en
Password:
SCRack4R6#
SCRack4R6#telnet 150.4.6.6
Trying 150.4.6.6 ... Open
Password:
SCRack4R6>en
Password:
SCRack4R6#
Notice that the third telnet connection is fails, as starting from the third VTY line,
the VTY line transport is SSH:.
SCRack4R6#telnet 150.4.6.6
Trying 150.4.6.6 ...
% Connection refused by remote host
Password:
SCRack4R6>en
Password:
SCRack4R6#
Password:
SCRack4R6>en
Password:
SCRack4R6#
!
! Configure a class-map and call the ACL
!
class-map cmap-control
match access-group 100
!
! Configure the policy-map to police traffic
!
policy-map pmap-control-in
class cmap-control
police 20000 conform transmit exceed drop
!
! Apply the policy-map and allow TELNET, SSH and FTP only if coming
from
! Serial0/0.1245
!
control-plane
service-policy input pmap-control-in
!
control-plane host
management-interface serial 0/0.1245 allow telnet ssh ftp
Password:
SCRack4R2>en
Password:
SCRack4R2#
Password:
SCRack4R2>en
Password:
SCRack4R2#
--------------------------------------------------------
Management-Interface activated Sep 15 2009 17:2
--------------------------------------------------------
SCRack4R6#wr mem
SCRack4R6#show archive
The maximum archive configurations allowed is 14.
There are currently 1 archive configurations saved.
The next archive file will be named flash:archived-config-1
Archive # Name
1 flash:archived-config-0 <- Most Recent
2
3
4
5
6
7
8
9
10
!
! Redistribute the static into OSPF
!
router ospf 1
redistribute static subnets
!
! Configure a NAT pool type rotary for DNAT
!
ip nat pool SERVER_POOL 136.1.100.100 136.1.100.100 prefix 24 type
rotary
!
! Match in an ACL traffic going to the mapped/VIP address of the server
!
ip access-list extended TO_SERVER
permit tcp any host 136.1.2.100 range 3000 3500
!
! Configure the DNAT and mark interfaces as inside/outside
!
ip nat inside destination list TO_SERVER pool SERVER_POOL
!
interface fastEthernet 0/1
ip nat inside
!
interface fastEthernet 0/0
ip nat outside
!
! Configure 2 groups and assign views to each
!
snmp-server group ADMIN v3 priv read ALL write ALL
snmp-server group OPERATOR v3 priv read ALL write CISCO
!
! Configure users with authentication and traffic encryption
!
snmp-server user ADMIN ADMIN v3 auth md5 CISCO priv des56 CISCO
snmp-server user OPERATOR OPERATOR v3 auth md5 CISCO priv des56 CISCO
R3:
!
! Configure syslog logging.
!
logging 136.1.125.100
logging trap informational
!
ip access-list extended VLAN136_IN
permit icmp any 136.1.136.0 0.0.0.255 echo log-input
permit ip any any
!
! Apply the ACL inbound on FastEthernet0/1
!
interface FastEthernet0/1
ip access-group VLAN136_IN in
!
! Tune logging interval
!
ip access-list logging interval 100
ASA1:
!
! Allow syslog traffic to the AAA server
!
access-list OUTSIDE_IN extended permit udp host 136.1.136.3 host
136.1.125.100 eq syslog
SW1:
!
! Apply the “Access” template for maximum ACL entries
!
sdm prefer access
Note
Check the template applied to the switch before and after reloading it.
!
! Configure an inspect IM class type and match on MSN IM protocol
!
class-map type inspect im match-all IM_CLASS_INSPECT
match protocol msn-im
!
! Configure regular class-map and match the ACL
!
class-map IM_CLASS
match access-list IM_ACL
!
! Configure a inspect IM policy-map type and for traffic referenced by
! the inspect type class-map drop connection and log
!
policy-map type inspect im IM_POLICY_INSPECT
parameters
class IM_CLASS_INSPECT
drop-connection log
!
! Apply the policy under the global policy-map
!
policy-map global_policy
class IM_CLASS
inspect im IM_POLICY_INSPECT
Global policy:
Service-policy: global_policy
Class-map: inspection_default
Class-map: IM_CLASS
Inspect: im IM_POLICY_INSPECT, packet 0, drop 0, reset-drop 0
class IM_CLASS_INSPECT
drop-connection log, packet 0
R6:
!
! Configure ACL to match HTTP traffic destined to the server
!
access-list 199 permit tcp any host 136.1.2.102 eq www
!
! Configure the TCP Intercept function in watch mode with a timeout
! value of 10 seconds
!
ip tcp intercept list 199
ip tcp intercept mode watch
ip tcp intercept watch-timeout 10
ASA1:
!
! Re-create the static for AAA server and specify the maximum number of
! embryonic connections
!
no static (inside,outside) 136.1.125.100 10.0.0.100 netmask
255.255.255.255
static (inside,outside) 136.1.125.100 10.0.0.100 netmask
255.255.255.255 0 10
clear xlate
SW1, SW2:
!
! Identify IPX traffic
!
mac access-list extended MACL-1
permit any any 0x8137 0x0
permit any any 0x8138 0x0
!
! Configure VLAN access-map; for IPX traffic drop and forward the rest
!
vlan access-map VACL-1 10
match mac address MACL-1
action drop
vlan access-map VACL-1 20
action forward
!
! Apply the VLAN access-map only on VLAN 10
!
vlan filter VACL-1 vlan-list 10
!
! Configure interfaces with IP addresses, nameifs
!
interface Ethernet 0/0
no shutdown
nameif outside
ip address 10.0.0.12 255.255.255.0
!
interface Ethernet 0/1
no shutdown
nameif inside
ip address 148.1.127.12 255.255.255.0
!
! Configure the hostname and IP address
!
hostname Rack4ASA2
!
ip address 192.10.4.13 255.255.255.0
!
! Configure the interfaces with appropriate nameifs
!
interface Ethernet 0/0
nameif outside
no shutdown
!
interface Ethernet 0/1
nameif inside
no shutdown
!
! Configure the Policy PAT
!
!
! Configure the ACL to permit traffic from the AAA server to IPS; apply
! it inbound on the outside interface
!
access-list OUTSIDE_IN extended permit tcp any host 10.0.0.10 eq 14433
access-group OUTSIDE_IN in interface outside
SCRack4R3#ping 192.10.4.254
!
! Configure ACL for local policy routing and match ICMP echo
!
ip access-list extended LOCAL_PINGS_TO_BB2
permit icmp any host 192.10.4.254 echo
!
! Configure a route-map, match on the ACL and set the next-hop to Lo0
!
route-map LOCAL_POLICY
match ip address LOCAL_PINGS_TO_BB2
set interface Loopback0
!
! Configure the local-policy routing feature
!
ip local policy route-map LOCAL_POLICY
SCRack4R5#ping 192.10.4.254
SCRack4R3#debug ip policy
Policy routing debugging is on
SCRack4R3#show access-lists
Extended IP access list LOCAL_PINGS_TO_BB2
10 permit icmp any host 192.10.4.254 echo (1 match)
Extended IP access list TO_BB2
10 deny icmp any host 192.10.4.254 echo (5 matches)
20 permit ip any any (1 match)
SCRack4R4#telnet 150.4.1.1
Trying 150.4.1.1 ... Open
Password:
SCRack4R1>telnet 150.4.5.5
% telnet connections not permitted from this terminal
!
! Configure the time-range when WEB access is allowed unauthenticated
!
time-range WORK_TIME
periodic weekday 8:00 to 16:59
!
! Configure the ACL: allow traffic to the WEB server in the time-range;
! for the rest of the time configure dynamic entry(lock and key) to
! force users authenticate first
!
ip access-list extended ACCESS
permit tcp any host 148.1.4.100 eq www time-range WORK_TIME
dynamic WEB permit tcp any host 148.1.4.100 eq www
deny tcp any host 148.1.4.100 eq www
permit ip any any
!
! Configure the local user and configure “autocommand” for dynamic ACL;
! the “autocommand” could be applied on the VTY lines as well but this
! will restrict regular access to VTY lines note we are not asked to
! configure idle/absolute timeout
!
username WEB password CISCO
username WEB autocommand access-enable host
!
! Apply the ACL inbound on both Serial interfaces
!
interface Serial 0/0.124
ip access-group ACCESS in
!
interface Serial 0/1
ip access-group ACCESS in
!
! Configure access on all VTY lines for port 30001
!
line vty 0 181
rotary 1
!
! Apply the authentication list that requires no authentication to the
! console
!
line console 0
login authentication CONSOLE
SCRack4R1#telnet 150.4.4.4
Trying 150.4.4.4 ... Open
Username: WEB
Password:
SCRack4R4#show access-lists
Extended IP access list ACCESS
10 permit tcp any host 148.1.4.100 eq www time-range WORK_TIME
(inactive)
20 Dynamic WEB permit tcp any host 148.1.4.100 eq www
permit tcp host 148.1.0.1 host 148.1.4.100 eq www
30 deny tcp any host 148.1.4.100 eq www
40 permit ip any any (76 matches)
SCRack4R1#telnet 148.1.4.100 80
Trying 148.1.4.100, 80 ...
% Connection timed out; remote host not responding
SCRack4R4#show access-lists
Extended IP access list ACCESS
10 permit tcp any host 148.1.4.100 eq www time-range WORK_TIME
(inactive)
20 Dynamic WEB permit tcp any host 148.1.4.100 eq www
permit tcp host 148.1.0.1 host 148.1.4.100 eq www (12 matches)
30 deny tcp any host 148.1.4.100 eq www
40 permit ip any any (104 matches)
Clear the dynamic ACL entry and modify the system clock so that the time-range
is valid. Verify that access to WEB server is allowed without authentication.
SCRack4R4#show access-lists
Extended IP access list ACCESS
10 permit tcp any host 148.1.4.100 eq www time-range WORK_TIME
(active)
20 Dynamic WEB permit tcp any host 148.1.4.100 eq www
30 deny tcp any host 148.1.4.100 eq www
40 permit ip any any (149 matches)
SCRack4R1#telnet 148.1.4.100 80
Trying 148.1.4.100, 80 ...
% Connection timed out; remote host not responding
SCRack4R4#show access-lists
Extended IP access list ACCESS
10 permit tcp any host 148.1.4.100 eq www time-range WORK_TIME
(active) (12 matches)
20 Dynamic WEB permit tcp any host 148.1.4.100 eq www
30 deny tcp any host 148.1.4.100 eq www
40 permit ip any any (163 matches)
!
! Configure a parameter-map for audit trail
!
parameter-map type inspect param-map-audit
audit-trail on
!
! Configure the inspect type policy-maps for inbound/outbound; inbound
! traffic will be inspected and policed, while outbound only inspected
!
policy-map type inspect pmap-inbound
class type inspect cmap-inbound
inspect param-map-audit
police rate 8000 burst 2000
!
policy-map type inspect pmap-outbound
class type inspect cmap-outbound
inspect
!
! Create the 2 security zones
!
zone security inside
zone security outside
!
! Configure the firewall policy in both directions
!
zone-pair security in-out source inside dest outside
service-policy type inspect pmap-outbound
!
zone-pair security out-in source outside destination inside
service-policy type inspect pmap-inbound
!
! Assign interfaces to appropriate security zones
!
interface Loopback 0
zone-member security inside
!
interface FastEthernet0/1
zone-member security inside
!
interface FastEthernet 0/0
zone-member security inside
!
interface Serial 0/0/0
zone-member security outside
SCRack4R1#telnet 54.4.3.254
Trying 54.4.3.254 ... Open
+-----------------------------------------------------------------------+
| |
| Welcome to BB1. These commands are available for use at privilege 0 |
| |
| ping show ip bgp |
| telnet show ip bgp neighbors |
| traceroute show ip bgp summary |
| show ip route show ip interface brief |
| show ip protocols |
| |
| The reference configuration for this device is available at: |
| http://www.ine.com/downloads/bb1.txt |
| |
+-----------------------------------------------------------------------+
SC.9.9.BB1>
SC.9.9.BB1>ping 148.1.255.1
Inspect
Packet inspection statistics [process switch:fast switch]
tcp packets: [0:122]
icmp packets: [0:10]
Inspect
Packet inspection statistics [process switch:fast switch]
icmp packets: [0:10]
!
! Configure the ACL for traffic to be NAT’ed
!
ip access-list extended TRANSLATE
permit ip 10.0.0.0 0.255.255.255 192.10.4.0 0.0.0.255
!
! Configure policy PAT and tune timeouts for DNS and TCP translations
!
ip nat inside source list TRANSLATE interface Loopback 0 overload
ip nat translation dns-timeout 120
ip nat translation tcp-timeout 21600
R3:
!
! Identify interfaces as outside and inside
!
interface FastEthernet 0/1
ip nat outside
!
interface FastEthernet 0/0
ip nat inside
!
interface Serial 1/0.35
ip nat inside
!
! Configure the ACL for traffic to be NAT’ed
!
ip access-list extended TRANSLATE
permit ip 10.0.0.0 0.255.255.255 192.10.4.0 0.0.0.255
!
! Configure policy PAT and tune timeouts for DNS and TCP translations
!
ip nat inside source list TRANSLATE interface Loopback 0 overload
ip nat translation dns-timeout 120
ip nat translation tcp-timeout 21600
Connection is dropped by the ASA2 as is initiated from the outside of the firewall.
!
! Configure TCP map and allow option 19
!
tcp-map OPTION19
tcp-options range 19 19 allow
!
! Apply the TCP map and disable randomization for BGP traffic, at the
! global level
!
policy-map global_policy
class BGP
set connection advanced-options OPTION19
set connection random-sequence-number disable
!
! Allow eBGP session to be initiated by R2 and R3 as well
!
access-list OUTSIDE_IN permit tcp 192.10.4.0 255.255.255.0 192.10.4.0
255.255.255.0 eq bgp
R3:
!
! Configure BGP MD5 authentication
!
router bgp 200
neighbor 192.10.4.2 pass CISCO
neighbor 192.10.4.254 pass CISCO
R2:
!
! Configure BGP MD5 authentication
!
router bgp 200
neighbor 192.10.4.3 pass CISCO
neighbor 192.10.4.254 pass CISCO
SRTT: 197 ms, RTTO: 984 ms, RTV: 787 ms, KRTT: 0 ms
minRTT: 12 ms, maxRTT: 300 ms, ACK hold: 200 ms
Status Flags: active open
Option Flags: nagle, md5
IP Precedence value : 6
<snip>
SRTT: 182 ms, RTTO: 1073 ms, RTV: 891 ms, KRTT: 0 ms
minRTT: 8 ms, maxRTT: 300 ms, ACK hold: 200 ms
Status Flags: passive open, gen tcbs
Option Flags: nagle, md5
IP Precedence value : 6
<snip>
<snip>
!
! Configure authentication login list for VTY lines
!
aaa authentication login VTY line
!
! Configure the local username for EZVPN xauth
!
username vpn_user password cisco
!
! Configure the ISAKMP policy; modify the DH group from default 1, as
! EZVPN requires DH group 2
!
crypto isakmp policy 2
hash sha
encr aes
authentication pre-share
group 2
!
! Configure the traffic encryption/hash policy-aka transform-set
!
crypto ipsec transform-set EZ_TRANS_AES_SHA_Tunnel esp-aes esp-sha-hmac
!
! Configure ISKAMP profile and specify the Virtual Tunnel Interface
!
crypto isakmp profile easy-IKE-profile-1
match identity group vpn_group
client authentication list vpn_group
isakmp authorization list vpn_group
client configuration address respond
virtual-template 1
!
! We are not allowed to use crypto-maps; so we’ll use IPSec profiles
!
crypto ipsec profile IPSEC-easyvpn-profile-1
set transform-set EZ_TRANS_AES_SHA_Tunnel
set isakmp-profile easy-IKE-profile-1
!
! Create the Virtual Tunnel Interface and apply the IPSec profile
!
interface Virtual-Template1 type tunnel
ip unnumbered loop 0
tunnel mode ipsec ipv4
tunnel protection ipsec profile IPSEC-easyvpn-profile-1
!
! Configure the pool of addresses for EZVPN clients
!
ip local pool POOL_1 148.1.57.101 148.1.57.110
!
! Configure the split-tunneling access-list
!
access-list 100 permit ip 148.1.57.0 0.0.0.255 any
!
! Configure the EZVPN group with PSK, pool, ACL for split-tunneling and
! the save-password option to allow client caching of xauth credentials
!
crypto isakmp client configuration group vpn_group
key cisco
pool POOL_1
acl 100
save-password
line vty 0 181
login authentication VTY
R4:
!
! Configure the Virtual Tunnel Interface
!
interface Virtual-Template1 type tunnel
no ip address
tunnel mode ipsec ipv4
!
! Configure the EZVPN client parameters:group name, PSK, etc
!
crypto ipsec client ezvpn EZ_CLIENT
connect auto
group vpn_group key cisco
mode client
peer 150.4.5.5
virtual-interface 1
username vpn_user password cisco
xauth userid mode local
!
! Configure the new Loopback address as the inside EZVPN interface
!
interface Loopback 2
ip address 44.44.44.44 255.255.255.0
crypto ipsec client ezvpn EZ_CLIENT inside
!
! Configure interface Serial0/1 as the outside EZVPN interface
!
interface serial 0/1
crypto ipsec client ezvpn EZ_CLIENT outside
interface: Virtual-Access2
Crypto map tag: Virtual-Access2-head-0, local addr 148.1.45.4
inbound ah sas:
outbound ah sas:
!
! Configure EIGRP for Tunnel and Loopback interfaces
!
router eigrp 1
no auto-summary
network 192.168.100.5 0.0.0.0
passive-interface default
network 192.168.255.5 0.0.0.0
no passive-interface Tunnel 156
R1:
!
! Configure the new Loopback interface
!
interface Loopback1
ip address 192.168.255.1 255.255.255.255
!
! Configure the mGRE tunnel; configure NHRP redirect, NHRP shortcut and
! disable split-horizon
!
interface Tunnel156
ip address 192.168.100.1 255.255.255.0
ip nhrp shortcut
ip nhrp map multicast 150.4.5.5
ip nhrp map 192.168.100.5 150.4.5.5
ip nhrp network-id 1
ip nhrp nhs 192.168.100.5
tunnel source Loopback0
tunnel mode gre multipoint
!
! Configure EIGRP for Tunnel and Loopback interfaces
!
router eigrp 1
no auto-summary
network 192.168.100.1 0.0.0.0
network 192.168.255.1 0.0.0.0
passive-interface default
no passive-interface Tunnel 156
R6:
!
! Configure the new Loopback interface
!
interface Loopback1
ip address 192.168.255.6 255.255.255.255
!
! Configure the mGRE tunnel; configure NHRP redirect, NHRP shortcut and
! disable split-horizon
!
interface Tunnel156
ip address 192.168.100.6 255.255.255.0
ip nhrp shortcut
ip nhrp map multicast 150.4.5.5
ip nhrp map 192.168.100.5 150.4.5.5
ip nhrp network-id 1
ip nhrp nhs 192.168.100.5
tunnel source Loopback0
tunnel mode gre multipoint
!
! Configure EIGRP for Tunnel and Loopback interfaces
!
router eigrp 1
no auto-summary
metwork 192.168.100.6 0.0.0.0
network 192.168.255.6 0.0.0.0
passive-interface default
no passive-interface Tunnel 156
Verify NHRP shortcuts on spokes and confirm that traffic from spoke-to-spoke
does not pass through the HUB. The first packet is routed across the hub while
the remaining take the shortcut path:
SCRack4R6#traceroute 192.168.255.1
SCRack4R1#traceroute 192.168.255.6
!
! Configure the CA server; for easier deployment configure it to grant
! certificates automatically
!
crypto pki server R2-CA_Server
database url nvram:
database level minimum
grant auto
no shut
!
! Configure the RSA key pair for certificate enrollment
!
crypto key generate rsa general-keys modulus 1024
!
! Configure the trustpoint, authenticate and enroll with it
!
crypto ca trustpoint R2-CA
enrollment url http://150.4.2.2:80
revocation-check none
!
crypto pki authenticate R2-CA
crypto pki enroll R2-CA
!
! Configure the Transform-Set; usually to minimize overhead on
GRE/IPsec
! transport mode is used; as the task does not suggest it we can use
! either one
crypto ipsec transform-set AES_SHA_TRANSPORT_MODE esp-aes esp-sha-hmac
mode transport
!
! Configure the IPSec profile and apply it on the Tunnel interface
!
crypto ipsec profile DMVPN_PROF
set transform-set AES_SHA_TRANSPORT_MODE
set pfs group2
!
interface Tunnel156
tunnel protection ipsec profile DMVPN_PROF
CA Certificate
Status: Available
Certificate Serial Number (hex): 01
Certificate Usage: Signature
Issuer:
cn=R2-CA_Server
Subject:
cn=R2-CA_Server
Validity Date:
start date: 16:01:51 PDT Sep 19 2009
end date: 16:01:51 PDT Sep 18 2012
Associated Trustpoints: R2-CA
Storage: nvram:R2-CA_Server#1CA.cer
SCRack4R6#ping 192.168.255.5
interface: Tunnel156
Crypto map tag: Tunnel156-head-0, local addr 150.4.6.6
inbound ah sas:
outbound ah sas:
inbound ah sas:
outbound ah sas:
!
! Configure a group-policy and specify the VPN protocol as webvpn
!
group-policy web-vpn internal
group-policy web-vpn attributes
vpn-tunnel-protocol webvpn
!
! Configure local username and apply the group-policy under user
! attributes
!
username web-user password cisco
username web-user attributes
vpn-group-policy web-vpn
!
! Configure a tunnel-group and specify the group-policy to be used
!
tunnel-group web_vpn type remote-access
tunnel-group web_vpn general-attributes
default-group-policy web-vpn
!
! Specify a group URL and alias so that the user does not need toselect
! a group at login; based on the URL the ASA will know on what tunnel-
! group to match on
!
Since the URL-entry is enabled by default it will be inherited by the new group-
policy as well.
At any point you may enter a question mark '?' for help.
User ctrl-c to abort configuration dialog at any prompt.
Default settings are in square brackets '[]'.
Current Configuration:
service host
network-settings
host-ip 192.168.1.2/24,192.168.1.1
host-name sensor
telnet-option disabled
ftp-timeout 300
no login-banner-text
exit
time-zone-settings
offset 0
standard-time-zone-name UTC
exit
summertime-option disabled
ntp-option disabled
exit
service web-server
port 443
exit
service event-action-rules rules0
overrides
override-item-status Enabled
risk-rating-range 90-100
exit
exit
service host
network-settings
host-ip 148.1.105.10/24,148.1.105.5
host-name IPS
telnet-option disabled
access-list 10.0.0.100/32
ftp-timeout 300
no login-banner-text
exit
time-zone-settings
offset 0
standard-time-zone-name UTC
exit
summertime-option disabled
ntp-option disabled
exit
service web-server
port 443
exit
service event-action-rules rules0
overrides
override-item-status Enabled
risk-rating-range 90-100
exit
exit
[0] Go to the command prompt without saving this config.
[1] Return back to the setup without saving this config.
[2] Save this configuration and exit setup.
SW2:
!
! Configure the interface towards IPS sensing as trunk and allow only
! the necessary VLANs
!
interface FastEthernet0/10
switchport trunk encapsulation dot1q
switchport mode trunk
switchport trunk allowed vlan 255,256,2313,2314
IDM:
Step1:
Step 2:
Step 3:
Step 4:
Clone the default signature definition and add two more named “sig1” and “sig2”.
Go to Configuration | Policies | Signature Definition and click
Clone:
Step 5:
Clone the default event action rules and add two more named “rules1” and
“rules2”. Go to Configuration | Policies | Event Action Rules and
click Clone:
Step 6:
Clone the default anomaly detection rules and add two more named “ad1” and
“ad2”. Go to Configuration | Policies | Anomaly Detections and
click Clone:
Step 7:
Add new virtual sensor VS1 and associate the previously configured sets with it.
Go to Configuration | Analysis Engine | Virtual Sensors and click
Add:
Step 8:
Add a new virtual sensor VS2 and associate the previously configured sets with
it. Go to Configuration | Analysis Engine | Virtual Sensors and
click Add:
SCRack4R1#ping 148.1.255.8
SCRack4R2#ping 192.10.4.3
SCRack4R2#ping 192.10.4.13
IDM:
Step 1:
Step 2:
Step 3:
Since we need to inspect telnet sessions, choose TCP as the protocol to decode
and inspect:
Step 4:
Step 5:
Choose “Other” as the service so we can define telnet in the next screen:
Step 6:
Leave everything default in this screen as we are not given any specifications:
Step 7:
Step 8:
Step 9:
Step 10:
Step 11:
Step 12:
For the last two configuration screens, leave the values to their defaults and
finish the process.
Step 13:
Step 14:
SCRack4R3#telnet 192.10.4.2
Trying 192.10.4.2 ... Open
Password:
SCRack4R2>en
Password:
SCRack4R2#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Password:
SCRack4R2>en
Password:
SCRack4R2#conf t
Enter configuration commands, one per line. End with CNTL/Z.
How can we fix it? Either disable the signature for “sig1” or tune the signature to
just produce an alert without modifying the packet. Either way will work. For
clarification, asking the proctor is recommended.
sensor# conf t
sensor(config)# service signature-definition sig1
sensor(config-sig)# signatures 1306 0
sensor(config-sig-sig)# engine normalizer
sensor(config-sig-sig-nor)# event-action produce-alert
sensor(config-sig-sig-nor)# exit
sensor(config-sig-sig)# exit
sensor(config-sig)# exit
Apply Changes?[yes]:
Step1:
Use the custom signature wizard to create a new signature for “sig2”. Go to
Configuration | Policies | Signature Definitions | sig2. Go
to Custom Signature Wizard and click Start the Wizard:
Step2:
Follow the screenshots below to configure the new signature settings. Select the
String TCP engine:
Step3:
Step4:
Specify the direction From Service, Service Port value of 23 for telnet and
specify the Regex String.
Step5:
Modify the severity of the alarm to High per the task requirements:
Step6:
Change the Advanced settings for this signature as we need to change event
summarization mode.:
Step 7:
Step 8:
Step9:
Use the default values for the next two configuration dialogs:
SCRack4R1#telnet 148.1.255.6
Trying 148.1.255.6 ... Open
Password:
Password:
Password:
% Bad passwords
!
! Configure the AAA server with RADIUS protocol; enable sssh
! authentication via AAA
!
aaa-server RADIUS protocol radius
aaa-server RADIUS (outside) host 10.0.0.100 CISCO
aaa authentication ssh console RADIUS
!
! Permit SSH connections from the AAA server only
!
ssh 10.0.0.100 255.255.255.255 outside
ACS:
Step 1:
Add the ASA as a RADIUS client to the ACS database using the authentication
key value of CISCO.
Step 2:
Create a new user in the ACS, named “SSHUSER” with the password of
“CISCO”.
Note
Verify that you can connect to the ASA using SSH protocol.
!
! Enable the proxy-auth authorization using tacacs+
!
aaa authorization auth-proxy default group tacacs+
!
! Configure the connection with TACACS server; source traffic from
! Loopback0
!
ip tacacs source Loopback0
tacacs-server host 10.0.0.100 key CISCO
!
! Configure an access-list with deny any and apply it to the HTTP
! server; the HTTP server should e used only for proxy-auth and not for
! accessing the router
!
access-list 2 deny any
ip http server
ip http access-class 2
ip http authentication aaa
!
! Enable proxy-auth, specify a inactivity timeout of 20 minutes;
! configure the banner
!
ip auth-proxy name PROXY http auth-cache-time 20
ip auth-proxy auth-proxy-banner http # Authorized Users Only! #
!
! Configure access-list to deny ICMP traffic and permit the rest
!
ip access-list extended VLAN3_IN
deny icmp any any
permit ip any any
!
! Apply the access-list and the auth-proxy on FastEthernet0/0
!
interface FastEthernet 0/0
ip access-group VLAN3_IN in
ip auth-proxy PROXY
!
! Apply the login authentication lists on VTY lines and console
!
line vty 0 181
login authentication VTY
!
line console 0
login authentication CONSOLE
ASA1:
!
! Configure static on the ASA so that the AAA server sees R3 Loopback0
! as 10.0.0.3
!
static (inside,outside) 10.0.0.3 150.4.3.3
ACS:
Step 1:
Create a new client entry in the ACS for the NAT’d address of R3 Loopback0.
Use TACACS+ protocol and the key value of “CISCO”.
Step 2:
Step 3:
Create new user in the ACS database named “VLAN3” with a password of
“CISCO”. Edit the auth-proxy settings for this user and associate an access-list
entry with it to permit ICMP traffic:
!
! Configure ACL to match on telnet traffic and configure RADIUS
! authentication for this ACL
!
access-list TELNET permit tcp any any eq 23
aaa authentication match TELNET outside RADIUS
!
! Identify traffic from host with MAC address 1234.4567.890a and exempt
! it from authentication
!
mac-list AAA_EXEMPT permit 1234.4567.890a ffff.ffff.ffff
aaa mac-exempt match AAA_EXEMPT
!
! Configure inactivity and absolute timeout for the sessions
!
timeout uauth 00:15:00 inactivity
timeout uauth 01:00:00 absolute
AAA Server:
ASA1 has been already added as a RADIUS client in the ACS, so we just need
to go ahead and add a user named “TELNET-USER” with the password
“CISCO”.
ACS:
Step 1:
Step 2:
!
! Configure policy-map to drop traffic identified by the class-map
!
policy-map type port-filter pmap-cppr
class cmap-cppr
drop
!
! Apply the policy-map on the host subinterface
!
control-plane host
service-policy type port-filter input pmap-cppr
R2:
!
memory reserve critical 2000
!
! Configure policy-map type logging and Rate-limit log messages to one
! every 30 seconds
!
policy-map type logging pmap-log
class cmap-log
log interval 30000
!
! Apply the logging policy to all sub-interfaces
!
control-plane host
service-policy type logging input pmap-log
!
control-plane transit
service-policy type logging input pmap-log
!
control-plane cef-exception
service-policy type logging input pmap-log
!
! Configure ACL to permit R2 Ethernet interface only
!
access-list 1 permit 192.10.4.2
!
! Configure TFTP server and apply acess-list
!
tftp-server flash:c2600-advsecurityk9-mz.124-15.T8.bin 1
SW1:
!
! Activate IP source guard with IP-MAC filtering and port-security
!
interface FastEthernet 0/20
ip verify source port-security
switchport port-security
!
! Enable DHCP snooping on VLAN 12 to activate IP Source Guard
!
ip dhcp snooping
ip dhcp snooping vlan 12
!
! Configure the switch to insert Option 82 and configure the manual
! binding for Source Guard
!
ip dhcp snooping information option
ip source binding 000c.2983.284c vlan 12 10.0.0.100 interface Fa0/20
SCRack4SW1#show port-security
Secure Port MaxSecureAddr CurrentAddr SecurityViolation Security
Action
(Count) (Count) (Count)
-----------------------------------------------------------------------
Fa0/20 1 1 0
Shutdown
-----------------------------------------------------------------------
-
Total Addresses in System (excluding one mac per port) : 0
Max Addresses limit in System (excluding one mac per port) : 5120
Note
When changes are made to the security ACLs, the switch completely blocks
traffic on the affected ports while updating the TCAM; this way the switch
ensures the updated access-lists do no pass any frames by mistake. Here, we
disable the feature and configure switch to keep on forwarding frames while the
TCAM is updated with the new configuration.
SW1:
!
access-list hardware program nonblocking
!
! Globally enable clear-text authentication
!
router ospf 1
area 0 authentication
R2:
!
! Configure the authentication string on the interface to R1
!
interface Serial 0/0.124
ip ospf authentication-key CISCO
!
! Globally enable clear-text authentication
!
router ospf 1
area 0 authentication
R4:
!
! Configure the authentication string on the interface to R1; disable
! authentication on the link to R5
!
interface Serial 0/0.124
ip ospf authentication-key CISCO
!
interface Serial 0/1
ip ospf authentication null
!
! Globally enable clear-text authentication
!
router ospf 1
area 0 authentication
R6:
!
! Configure the authentication string on the interface in Vlan255
!
interface FastEthernet 0/1
ip ospf authentication-key CISCO
!
! Globally enable clear-text authentication
!
router ospf 1
area 0 authentication
SW2:
!
! Configure the authentication string on the SVI 255
!
interface Vlan 255
ip ospf authentication-key CISCO
!
! Globally enable clear-text authentication
!
router ospf 1
area 0 authentication
!
! Configure a TCP-map to normalize TCP connections
!
tcp-map NORMALIZE
check-retransmission
checksum-verification
reserved-bits clear
exceed-mss drop
!
! Drop any fragments on both interfaces
!
fragment chain 1 outside
fragment chain 1 inside
!
! Create class-map and match on previously configured ACL
!
class-map TO_SERVER
match access-list TO_SERVER
!
! Apply the policy globally
!
policy-map global_policy
class TO_SERVER
set connection conn-max 5000 embryonic-conn-max 2000
set connection timeout dcd 0:0:5 3 tcp 0:5:0 reset
set connection advanced-options NORMALIZE
SCRack4R2#ping 192.10.4.254
Global policy:
Service-policy: global_policy
Class-map: inspection_default
Inspect: dns preset_dns_map, packet 0, drop 0, reset-drop 0
Inspect: ftp, packet 0, drop 0, reset-drop 0
Inspect: h323 h225 _default_h323_map, packet 0, drop 0, reset-
drop 0
Inspect: h323 ras _default_h323_map, packet 0, drop 0, reset-drop
0 Inspect: rsh, packet 0, drop 0, reset-drop 0
Inspect: rtsp, packet 0, drop 0, reset-drop 0
Inspect: esmtp _default_esmtp_map, packet 0, drop 0, reset-drop 0
Inspect: sqlnet, packet 0, drop 0, reset-drop 0
Inspect: skinny , packet 0, drop 0, reset-drop 0
Inspect: sunrpc, packet 0, drop 0, reset-drop 0
Inspect: xdmcp, packet 0, drop 0, reset-drop 0
Inspect: sip , packet 0, drop 0, reset-drop 0
Inspect: netbios, packet 1, drop 0, reset-drop 0
Inspect: tftp, packet 0, drop 0, reset-drop 0
Class-map: BGP
Set connection policy: random-sequence-number disable
drop 0
Set connection advanced-options: OPTION19
Retransmission drops: 0 TCP checksum drops :
0
Exceeded MSS drops : 0 SYN with data drops:
0
Invalid ACK drops : 0 SYN-ACK with data
drops: 0
Out-of-order (OoO) packets : 0 OoO no buffer drops:
0
OoO buffer timeout drops : 0 SEQ past window
drops: 0
Reserved bit cleared: 0 Reserved bit drops :
0
IP TTL modified : 0 Urgent flag cleared:
0
Window varied resets: 0
TCP-options:
Selective ACK cleared: 0 Timestamp cleared :
0
Window scale cleared : 0
Other options cleared: 0
Other options drops: 0
Class-map: TO_SERVER
Set connection policy: conn-max 5000 embryonic-conn-max 2000
current embryonic conns 0, current conns 0, drop 0
Set connection timeout policy:
tcp 0:05:00 reset
DCD: enabled, retry-interval 0:00:05, max-retries 3
DCD: client-probe 0, server-probe 0, conn-expiration 0
Set connection advanced-options: NORMALIZE
Retransmission drops: 0 TCP checksum drops :
0
Exceeded MSS drops : 0 SYN with data drops:
0
Step 1:
Locate the “Unknown IP protocol signature” in the signature definition set for
VS1. Go to Configuration | Policies | Signature Definitions |
sig1 and search for the signature with “Unknown IP”:
Step 2:
Modify the summarization mode for this signature and change the threshold
settings:
!
! Configure interface nameifs and IP addresses as in the diagram
!
interface Ethernet 0/1
no shutdown
nameif inside
ip address 192.10.4.12 255.255.255.0
!
interface Ethernet 0/0
no shutdown
nameif outside
ip address 164.1.126.12 255.255.255.0
!
! Configure interface nameifs and IP addresses as in the diagram
!
interface Ethernet 0/1
no shut
nameif inside
ip address 164.1.131.13 255.255.255.0
!
interface Ethernet 0/0
no shut
nameif outside
ip address 164.1.128.13 255.255.255.0
ASA1:
!
! Modify the DNS response maximum-size to 1024
!
policy-map type inspect dns preset_dns_map
parameters
message-length maximum 1024
Global policy:
Service-policy: global_policy
Class-map: inspection_default
Inspect: dns preset_dns_map, packet 0, drop 0, reset-drop 0
message-length maximum 1024, drop 0
dns-guard, count 0
protocol-enforcement, drop 0
nat-rewrite, count 0
!
! Configure an IM inspect policy-map to drop these connections
!
policy-map type inspect im PMAP_INS_IM_MSN_GAMES_WEBCAM
parameters
class CMAP_INS_IM_MSN_GAMES_WEBCAM
drop-connection
!
! Apply the inspection globally
!
policy-map global_policy
class inspection_default
inspect im PMAP_INS_IM_MSN_GAMES_WEBCAM
Global policy:
Service-policy: global_policy
Class-map: inspection_default
Inspect: im PMAP_INS_IM_MSN_GAMES_WEBCAM, packet 0, drop 0,
reset-drop 0
class CMAP_INS_IM_MSN_GAMES_WEBCAM
drop-connection, packet 0
!
! Configure domain, lease, DNS servers ONLY for the clients’ on the
! outside interface
!
dhcpd dns 164.1.128.99 164.1.128.100 interface outside
dhcpd lease 7200 interface outside
dhcpd domain internetworkexpert.com interface outside
!
! Configure access-list to match on VLAN 407 subnet; map HTTP traffic
on ! port 8080 for traffic sourced in VLAN 407
!
access-list 47 permit 164.1.47.0 0.0.0.255
ip port-map http port 8080 list 47
!
! Configure inspection for TCP, UDP and ICMP traffic
!
ip inspect name INSPECT tcp
ip inspect name INSPECT udp
ip inspect name INSPECT http
ip inspect name INSPECT icmp
ip inspect tcp idle-time 216000
!
! Configure access-list to be used in NAT overload
!
ip access-list standard NET_150
permit 150.4.0.0 0.0.255.255
!
ip access-list standard NET_10
permit 10.0.0.0 0.255.255.255
!
! Configure the 2 NAT pools
!
ip nat pool POOL1 204.12.9.150 204.12.9.151 prefix 24
ip nat pool POOL2 204.12.9.250 204.12.9.251 prefix 24
!
! Configure static NAT for 204.12.4.100 HTTP server and NAT overload
!
ip nat inside source static tcp 164.1.47.100 8080 204.12.9.100 80
ip nat inside source list NET_150 pool POOL1 overload
ip nat inside source list NET_10 pool POOL2 overload
!
! Apply access-list inbound and inspection outbound
!
interface FastEthernet 0/1
ip nat outside
ip access-group FROM_BB3 in
ip inspect INSPECT out
!
! Configure the inside NAT interfaces
!
interface FastEthernet0/0
ip nat inside
!
interface Serial0/1
ip nat inside
!
interface Serial0/0.345
ip nat inside
Interface Configuration
Interface FastEthernet0/1
Inbound inspection rule is not set
Outgoing inspection rule is INSPECT
tcp alert is on audit-trail is off timeout 216000
udp alert is on audit-trail is off timeout 30
http alert is on audit-trail is off timeout 216000
icmp alert is on audit-trail is off timeout 10
Inbound access list is FROM_BB3
Outgoing access list is not set
SCRack4SW1#traceroute 204.12.9.254
SCRack4SW1#telnet 204.12.9.254
Trying 204.12.9.254 ... Open
+-----------------------------------------------------------------------+
| |
| Welcome to BB3. These commands are available for use at privilege 0 |
| |
| ping show ip bgp |
| telnet show ip bgp neighbors |
| traceroute show ip bgp summary |
| show ip route show ip interface brief |
| show ip protocols |
| |
| The reference configuration for this device is available at: |
| http://www.ine.com/downloads/bb3.txt |
| |
+-----------------------------------------------------------------------+
SC.9.9.BB3>
SCRack4SW1#ping 204.12.9.254
+-----------------------------------------------------------------------+
| |
| Welcome to BB3. These commands are available for use at privilege 0 |
| |
| ping show ip bgp |
| telnet show ip bgp neighbors |
| traceroute show ip bgp summary |
| show ip route show ip interface brief |
| show ip protocols |
| |
| The reference configuration for this device is available at: |
| http://www.ine.com/downloads/bb3.txt |
| |
+-----------------------------------------------------------------------+
SC.9.9.BB3>
+-----------------------------------------------------------------------+
| |
| Welcome to BB3. These commands are available for use at privilege 0 |
| |
| ping show ip bgp |
| telnet show ip bgp neighbors |
| traceroute show ip bgp summary |
| show ip route show ip interface brief |
| show ip protocols |
| |
| The reference configuration for this device is available at: |
| http://www.ine.com/downloads/bb3.txt |
| |
+-----------------------------------------------------------------------+
SC.9.9.BB3>
!
! Configure the NAT pool type rotary
!
ip nat pool SERVERS 164.1.55.150 164.1.55.152 prefix 24 type rotary
!
! Identify HTTP traffic to server
!
ip access-list extended VIRTUAL_SERVER
permit tcp any host 164.1.55.100 eq 80
!
! Configure destination NAT for load-balancing
!
ip nat inside destination list VIRTUAL_SERVER pool SERVERS
!
! Configure a parameter-map to specify a maximum number of sessions and
! enable audit-trail
!
parameter-map type inspect my_param_max_sess
sessions maximum 100
audit-trail on
!
! Configure a type inspect policy-map and police traffic
!
policy-map type inspect pmap_zbf
class type inspect cmap_icmp_tcp_udp
inspect my_param_max_sess
police rate 50000 burst 10000
!
! Create security zones and add interfaces to it
!
zone security inside
zone security outside
!
int Serial 0/0/0
zone-member security outside
!
int FastEthernet 0/0
zone-member security inside
!
! Configure the firewall policy for both directions
!
zone-pair security inside-to-outside source inside destination outside
service-policy type inspect pmap_zbf
!
zone-pair security outside-to-inside source outside destination inside
service-policy type inspect pmap_zbf
SCRack4R2#telnet 54.9.2.254
Trying 54.9.2.254 ... Open
+-----------------------------------------------------------------------+
| |
| Welcome to BB1. These commands are available for use at privilege 0 |
| |
| ping show ip bgp |
| telnet show ip bgp neighbors |
| traceroute show ip bgp summary |
| show ip route show ip interface brief |
| show ip protocols |
| |
| The reference configuration for this device is available at: |
| http://www.ine.com/downloads/bb1.txt |
| |
+-----------------------------------------------------------------------+
SC.9.9.BB1>
SCRack4R2#ping 54.9.2.254
Inspect
Packet inspection statistics [process switch:fast switch]
tcp packets: [0:38]
icmp packets: [0:10]
Inspect
Session creations since subsystem startup or last reset 0
Current session counts (estab/half-open/terminating) [0:0:0]
Maxever session counts (estab/half-open/terminating) [0:0:0]
Last session created never
Last statistic reset never
Last session creation rate 0
Maxever session creation rate 0
Last half-open session total 0
Police
rate 50000 bps,10000 limit
conformed 0 packets, 0 bytes; actions: transmit
exceeded 0 packets, 0 bytes; actions: drop
conformed 0 bps, exceed 0 bps
!
! Disable ISKAMP negotiations. We will set up IPSec SA manually,
! therefore it will never actually expire
!
no crypto isakmp enable
!
! Configure the proxy-ACL to trigger IPSec session
!
ip access-list extended GRE_TUNNEL
permit gre host 150.4.5.5 host 150.4.3.3
!
! Configure the transform-set
!
crypto ipsec transform-set 3DES_MD5 esp-3des esp-md5-hmac
!
! 3DES Cipher key is 192 bits = 48 hex digits (each is 4 bits).
! Actually, only 168 bits are used for encryption (i.e. like with
! 64 bit DES key only 56 bits are used)
!
! Authenticator key is 128 bits = 32 hex digits
! Make sure the keys match on the both sides
!
crypto map VPN local-address loopback 0
crypto map VPN 10 ipsec-manual
set peer 150.4.3.3
set session-key inbound esp 3355 cipher
123456789012345678901234567890123456789012345678 authenticator
12345678901234567890123456789012
set session-key outbound esp 5533 cipher
123456789012345678901234567890123456789012345678 authenticator
12345678901234567890123456789012
set transform-set 3DES_MD5
match address GRE_TUNNEL
!
interface Serial 0/0.345
crypto map VPN
!
interface Serial 0/1
crypto map VPN
!
! Configure policy-routing to force all traffic coming on interface
! FastEthernet0/0 to exit out the Tunnel
!
route-map POLICY permit 10
set interface Tunnel 0
!
interface FastEthernet 0/0
ip policy route-map POLICY
R3:
!
! Configure the tunnel interface sourced and destined on Loopbacks
!
interface Tunnel 0
tunnel source Loopback 0
tunnel destination 150.4.5.5
ip address 35.35.35.3 255.255.255.0
!
! Disable ISKAMP negotiations. We will set up IPSec SA manually,
! therefore it will never actually expire
!
no crypto isakmp enable
!
! Configure the proxy-ACL to trigger IPSec session
!
ip access-list extended GRE_TUNNEL
permit gre host 150.4.3.3 host 150.4.5.5
!
! Configure the transform-set
!
crypto ipsec transform-set 3DES_MD5 esp-3des esp-md5-hmac
!
! Cipher key is 168 bits = 42 hex digits
! Authenticator key is 128 bits = 32 hex digits
!
crypto map VPN local-address loopback 0
crypto map VPN 10 ipsec-manual
set peer 150.4.5.5
set session-key inbound esp 5533 cipher
123456789012345678901234567890123456789012345678 authenticator
12345678901234567890123456789012
set session-key outbound esp 3355 cipher
123456789012345678901234567890123456789012345678 authenticator
12345678901234567890123456789012
set transform-set 3DES_MD5
match address GRE_TUNNEL
!
interface Serial 1/0.345
crypto map VPN
!
! Configure policy-routing to force all traffic coming on interface
! FastEthernet0/0 to exit out the Tunnel
!
route-map POLICY
set interface Tunnel 0
!
interface FastEthernet 0/1
ip policy route-map POLICY
SCRack4R3#ping 35.35.35.5
interface: Serial1/0.345
Crypto map tag: VPN, local addr 150.4.3.3
inbound ah sas:
outbound ah sas:
!
! Group-policy to apply web-type access-list
! and enable content filtering
!
group-policy WEBVPN internal
group-policy WEBVPN attributes
webvpn
functions url-entry filter
html-content-filter java scripts
filter value WEBACCESS
!
! Local username to authenticate remote users
!
username CISCO password CISCO123
!
! Tunnel-group definition
!
tunnel-group WEBVPN type webvpn
tunnel-group WEBVPN general-attributes
default-group-policy WEBVPN
!
! Configure group-alias to enlist on WebVPN login page
!
tunnel-group WEBVPN webvpn-attributes
group-alias WEBVPN enable
authentication aaa
!
! Lock the user into WEBVPN group only
!
username CISCO attributes
group-lock value WEBVPN
Test PC:
Step 1:
!
! Port-forwarding configuration is global
!
webvpn
port-forward TELNET_BB2 2023 192.10.4.254 telnet
!
! Configure port-forwarding in the group-policy
!
group-policy WEBVPN attributes
webvpn
Test PC:
!
! Encrypt the pre-shared key in the router configuration with AES
!
key config-key password-encrypt MASTER-123
password encryption aes
!
! Configure the pre-shared-key
!
crypto isakmp key cisco address 164.0.0.0 255.0.0.0
!
! Configure the transform-set
!
crypto ipsec transform-set MY-GET-T-SET esp-aes esp-sha-hmac
!
! Configure the IPSec profile
!
crypto ipsec profile ipsec-prof-get
set transform-set MY-GET-T-SET
set pfs group2
!
! Configure the proxy-ACL for interesting IPSec traffic
!
access-list 101 permit icmp host 150.4.6.6 host 150.4.1.1
access-list 101 permit icmp host 150.4.1.1 host 150.4.6.6
!
! Configure the RSA key pair to sign re-keying messages
!
crypto key generate rsa general-keys label GETVPN modulus 1024
!
! Configure the key server
!
crypto gdoi group group1
identity number 1
server local
rekey transport unicast
rekey authentication mypubkey rsa GETVPN
sa ipsec 1
profile ipsec-prof-get
match address ipv4 101
R1:
!
! Configure the ISAKMP policy
!
crypto isakmp policy 1
auth pre
enc aes
hash sha
group 2
!
! Configure the pre-shared key
!
crypto isakmp key cisco address 150.4.2.2
!
! Configure the GDOI server
!
crypto gdoi group group1
identity number 1
server address ipv4 150.4.2.2
!
! Configure and apply the crypto map
!
crypto map GET-MAP 10 gdoi
set group group1
!
interface Serial 0/0.12
crypto map GET-MAP
R6:
!
! Configure the ISAKMP policy
!
crypto isakmp policy 1
auth pre
enc aes
hash sha
group 2
!
! Configure the pre-shared key
!
crypto isakmp key cisco address 150.4.2.2
!
! Configure the GDOI server
!
crypto gdoi group group1
identity number 1
server address ipv4 150.4.2.2
!
! Configure and apply the crypto map
!
crypto map GET-MAP 10 gdoi
set group group1
!
interface FastEthernet 0/1
crypto map GET-MAP
IPSec SA Number : 1
IPSec SA Rekey Lifetime: 3600 secs
Profile Name : ipsec-prof-get
Replay method : Count Based
Replay Window Size : 64
SA Rekey
Remaining Lifetime : 865 secs
ACL Configured : access-list 101
interface: Serial0/0.12
Crypto map tag: GET-MAP, local addr 164.1.12.1
inbound ah sas:
outbound ah sas:
inbound ah sas:
outbound ah sas:
At any point you may enter a question mark '?' for help.
User ctrl-c to abort configuration dialog at any prompt.
Default settings are in square brackets '[]'.
Current Configuration:
service host
network-settings
host-ip 192.168.1.2/24,192.168.1.1
host-name sensor
telnet-option disabled
ftp-timeout 300
no login-banner-text
exit
time-zone-settings
offset 0
standard-time-zone-name UTC
exit
summertime-option disabled
ntp-option disabled
exit
service web-server
port 443
exit
service event-action-rules rules0
overrides
override-item-status Enabled
risk-rating-range 90-100
exit
exit
service event-action-rules rules1
overrides
override-item-status Enabled
risk-rating-range 90-100
exit
exit
service event-action-rules rules2
overrides
override-item-status Enabled
risk-rating-range 90-100
exit
exit
service host
network-settings
host-ip 10.0.0.10/24,10.0.0.3
host-name Rack4IPS
telnet-option enabled
access-list 10.0.0.0/24
ftp-timeout 300
no login-banner-text
exit
time-zone-settings
offset 0
standard-time-zone-name UTC
exit
summertime-option disabled
ntp-option disabled
exit
service web-server
port 443
exit
service event-action-rules rules0
overrides
override-item-status Enabled
risk-rating-range 90-100
exit
exit
service event-action-rules rules1
overrides
override-item-status Enabled
risk-rating-range 90-100
exit
exit
service event-action-rules rules2
overrides
override-item-status Enabled
risk-rating-range 90-100
exit
exit
[0] Go to the command prompt without saving this config.
[1] Return back to the setup without saving this config.
[2] Save this configuration and exit setup.
SCRack4R3#telnet 10.0.0.10
Trying 10.0.0.10 ... Open
login: cisco
Password:
Last login: Mon Sep 28 07:19:47 on pts/0
***NOTICE***
<snip>
Rack4IPS#
!
! Put R4 interface FastEthernet0/1 in VLAN 413
!
interface fastEthernet 0/4
switchport access vlan 413
IPS:
!
! Enable the sensing interface and create the VLAN Pair
!
sensor# conf t
sensor(config)# service interface
sensor(config-int)# physical-interfaces gigabitEthernet0/0
sensor(config-int-phy)# admin-state enabled
sensor(config-int-phy)# subinterface-type inline-vlan-pair
sensor(config-int-phy-inl)# subinterface 1
sensor(config-int-phy-inl-sub)# vlan1 413
sensor(config-int-phy-inl-sub)# vlan2 43
sensor(config-int-phy-inl-sub)# exit
sensor(config-int-phy-inl)# exit
sensor(config-int-phy)# exit
sensor(config-int)# exit
Apply Changes?[yes]:yes
sensor(config)#
!
! Configure the new signature definition called “Sig1”
!
sensor(config)# service signature-definition Sig1
Editing new instance Sig1.
sensor(config-sig)# exit
Apply Changes?[yes]: yes
!
! Configure the new event action rule called “Rules1”
!
sensor(config)# service event-action-rules Rules1
Editing new instance Rules1.
sensor(config-eve)# exit
Apply Changes?[yes]: yes
!
! Configure the new anomaly detection policy called “AD1”
!
sensor(config)# service anomaly-detection AD1
Editing new instance AD1.
sensor(config-ano)# exit
Apply Changes?[yes]: yes
!
! Configure the new virtual sensor called “VS1”
!
sensor(config)# service analysis-engine
sensor(config-ana)# virtual-sensor VS1
sensor(config-ana-vir)# signature-definition Sig1
sensor(config-ana-vir)# event-action-rules Rules1
sensor(config-ana-vir)# anomaly-detection
sensor(config-ana-vir-ano)# anomaly-detection-name AD1
sensor(config-ana-vir-ano)# exit
sensor(config-ana-vir)# physical-interface gigabitEthernet0/0
subinterface-number 1
sensor(config-ana-vir)# exit
sensor(config-ana)# exit
Apply Changes?[yes]: yes
SCRack4R5#ping 204.12.9.254
!
! Configure a TACACS+ server; R4 has a redundant path towards the AAA
! server so source TACACS traffic from Loopback0
!
ip tacacs source-interface loop 0
tacacs-server host 10.0.0.100
tacacs-server key cisco
!
! Apply the authentication list to all VTY lines
!
line vty 0 181
login authentication MY-TAC
Step 1:
Create a new user named “IPS” with a password of “cisco” in the ACS server.
Step 3:
Let the IPS obtain the public RSA key for the SSH process in R4. Go to
Configuration | SSH | Known Host Keys:
Step 4:
Step 5:
Add new blocking device corresponding to R4 and bind the device login profile to
it. Go to Configuration | Blocking | Blocking Devices and click
Add:
Step 6:
Step 7:
Locate the ICMP Flood signature for virtual sensor VS1 and configure it for rate-
limiting at 1% of the bandwidth. Go to Configuration | Policies |
Signature Definitions | Sig1 and edit signature 2152:
Step 7:
Configure traffic coming from Loopback0 of R4 from ever trigger any action on
any signature for virtual sensor VS1. Go to Configuration | Policies |
Event Action Rules | Rules1 | Event Action Filters and click
Add:
SCRack4R4#show ssh
Connection Version Encryption State
Username
66 1.5 3DES Session started IPS
%No SSHv2 server connections running.
Serial0/0.345
Step 1:
Enable the AIC engine and tune the AIC Web Ports values. Go to
Configuration | Policies | Signature Definitions | Sig1 |
Miscellaneous to accomplish this:
Step 2:
Activate the signature for FTP “DELE” command and set the actions. Go to
Configuration | Policies | Signature Definitions | Sig1 and
edit actions for signature 12907: Set the action to Deny Connection Inline.
Step 3:
Activate the signature for HTTP “POST” method and set the actions. Go to
Configuration | Policies | Signature Definitions | Sig1 and
edit actions for signature 12683: Set the action to Produce Alert
Step 4:
Activate the signature for non-HTTP traffic and set the actions. Go to
Configuration | Policies | Signature Definitions | Sig1 and
edit actions for signature 12674: Set the action to Deny Connection Inline.
!
! When network access authentication is combined with the virtual
telnet
! server the access-list needs to match also the telnet traffic to the
! virtual telnet IP address
!
access-list AUTH permit tcp 192.10.4.0 255.255.255.0 any eq 139
access-list AUTH permit tcp 192.10.4.0 255.255.255.0 host 192.10.4.50
eq 23
!
! Configure authentication so that connections on TCP port 139 are
! allowed
!
aaa authentication match AUTH inside RAD
!
! Enable the virtual telnet server
!
virtual telnet 192.10.4.50
ACS:
Step 1:
Add ASA1 as a RADIUS client to the ACS server using the authentication key
value of “cisco”.
Step 2:
SC.9.9.BB2>telnet 192.10.9.50
Trying 192.10.9.50 ... Open
LOGIN Authentication
Username: USER1
Password:
Authentication Successful
ssh 0 0 inside
ssh 0 0 outside
!
! Configure the TACACS server for user authentication
!
aaa-server TAC protocol tacacs
aaa-server TAC (inside) host 10.0.0.100 cisco
!
! Configure SSH authentication to use TACACS server
!
aaa authentication ssh console TAC
!
! Enable local command authorization so that levels 2-15 can be used-
aka
! enable password for levels 2-15
!
aaa authorization command LOCAL
enable password CISCO5 level 5
!
! Put the “show run” command available at privilege-level 5
!
privilege show level 5 command running-config
ACS:
Step 1:
Step 2:
Create a user named “NOC-USER” with the password “cisco” in the ACS server.
Password:
Type help or '?' for a list of available commands.
Rack4ASA2> enable 5
Password: ******
Rack4ASA2# show running-config
: Saved
:
ASA Version 8.0(4)
!
hostname Rack4ASA2
enable password zdCTvh0TBpS6TU4W level 5 encrypted
enable password 8Ry2YjIyt7RRXU24 encrypted
passwd 2KFQnbNIdI.2KYOU encrypted
names
!
interface Ethernet0/0
nameif outside
security-level 0
ip address 164.1.128.13 255.255.255.0
!
interface Ethernet0/1
nameif inside
security-level 100
ip address 164.1.131.13 255.255.255.0
!
interface Ethernet0/2
shutdown
no nameif
no security-level
no ip address
!
! Configure authorization exec via RADIUS with local fallback
!
aaa authorization exec default group radius local if-authenticated
!
! Configure level 12 commands accounting
!
aaa accounting command 12 default start-stop group tacacs+
!
! Define and configure RADIUS, TACACS+ servers
!
radius-server host 10.0.0.100 key CISCO
ip radius source Loopback0
!
tacacs-server host 10.0.0.100 key CISCO
ip tacacs source Loopback0
!
! Make the commands available for privilege-level 12
!
privilege exec all level 12 debug
privilege exec all level 12 undebug
!
! Apply the authentication lists on VTY lines and console
!
line vty 0 181
login authentication VTY
!
line con 0
login authentication CONSOLE
Step 1:
Step 2:
Add R5 as a RADIUS client in the ACS server. You may use the same IP
address you used for TACACS+ client just use a different client name.
Step 3:
Step 4:
Add a new user named “R5USER” with a password of “CISCO” in the ACS
server.
Configure the following RADIUS “cisco-av-pair” attribute for this user to assign
privilege-level 12:
SCRack4R5#telnet 150.4.5.5
Trying 150.4.5.5 ... Open
Username: R5USER
Password:
SCRack4R5#show privilege
Current privilege level is 12
SCRack4R5#debug ip rip
RIP protocol debugging is on
SCRack4R5#undebug all
All possible debugging has been turned off
SCRack4R5#conf t
^
% Invalid input detected at '^' marker.
SCRack4R5#exit
AAA Server:
Check the reports and activity for R5user and notice the logged commands. Go
to Reports and Activity | TACACS+ Administration:
!
! Configure the RADIUS server
!
radius-server host 10.0.0.100 key cisco
ip radius source loopback 0
!
!
! Apply the authentication login list to all VTY lines
!
line vty 0 15
login authentication VTY
ACS:
Step 1:
Add SW1 as RADIUS client in the ACS server using the authentication key value
of “cisco”.
Step 2:
Edit RADIUS Interface settings and enable the following attribute for the
“User” profile:
Step 3:
Create new user named “ADMIN” with a password of “cisco” in the ACS server.
Set RADIUS Service-Type attribute for this to the value of “Administrative”:
Step 5:
Create new user named “USER” with a password of “cisco” in the ACS server.
Set RADIUS Service-Type attribute for this user to “Login”.
SCRack4SW1#telnet 150.4.7.7
Trying 150.4.7.7 ... Open
Username: ADMIN
Password:
SCRack4SW1#show privilege
Current privilege level is 15
SCRack4SW1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
SCRack4SW1(config)#exit
SCRack4SW1#exit
SCRack4SW1#telnet 150.4.7.7
Trying 150.4.7.7 ... Open
Username: USER
Password:
SCRack4SW1>show privilege
Current privilege level is 1
SCRack4SW1>exit
AAA Server:
!
! Configure access-list to match all traffic on UDP port 520-RIP
!
ip access-list extended RIP_UPDATES
permit udp any eq 520 any eq 520
!
! Permit Legal RIP updates
!
vlan access-map VLAN33_FILTER 10
match ip address LEGAL_RIP
action forward
!
! Drop every other RIP update
!
vlan access-map VLAN33_FILTER 20
match ip address RIP_UPDATES
action drop
!
! Permit everything else
!
vlan access-map VLAN33_FILTER 30
action forward
!
! Apply the filtering only on VLAN 33
!
vlan filter VLAN33_FILTER vlan-list 33
!
! Configure the key number and key string at the interface level; on
! FastEthernet0/1 there is no need for authentication as there are
! no adjacencies there
!
interface FastEthernet 0/0
ip ospf message-digest-key 1 md5 CISCO
!
interface Serial 0/1
ip ospf message-digest-key 1 md5 CISCO
!
interface Serial 0/0.345
ip ospf message-digest-key 1 md5 CISCO
R3:
!
! Enable MD5 authentication globally under the OSPF process
!
router ospf 1
area 0 authentication message-digest
!
! Configure the key number and key string at the interface level
!
interface Serial 1/0.345
ip ospf message-digest-key 1 md5 CISCO
R5:
!
! Enable MD5 authentication globally under the OSPF process
!
router ospf 1
area 0 authentication message-digest
!
! Configure the key number and key string at the interface level
!
interface Serial 0/1
ip ospf message-digest-key 1 md5 CISCO
!
interface Serial 0/0.345
ip ospf message-digest-key 1 md5 CISCO
SW1:
!
! Enable MD5 authentication globally under the OSPF process
!
router ospf 1
area 0 authentication message-digest
!
! Configure the key number and key string at the interface level
!
int vlan 407
!
! Enable logging with facility local3; enable log level to be critical
!
logging facility local3
logging trap critical
!
! Enable syslog message sequence numbering for protection against
! tempering
!
service sequence-numbers
SCRack4SW2#more flash:syslog.txt
%SYS-5-CONFIG_I: Configured from console by console
SCRack4R5#telnet 164.1.45.4
Trying 164.1.45.4 ... Open
Username: R5USER
Password:
SCRack4R4>exit
!
! Configure class-map and match on ACL plus the “fasttrack” protocol
!
class-map match-all cmap-fasttrack
match access-group name acl-fasttrack
match protocol fasttrack
!
! Drop traffic that matches the class-map
!
policy-map pmap-fasttrack
class cmap-fasttrack
drop
!
! Apply the policy outbound on interface Serial0/0.12
!
interface Serial0/0.12
service-policy output pmap-fasttrack
Serial0/0.12
!
! Apply the filter inbound and specify the maximum number of prefixes
!
router bgp 100
neighbor 204.12.4.254 prefix-list SLASH_24_AND_SHORTER in
neighbor 204.12.4.254 maximum 10000
R6:
!
! Configure the prefix-list to match on prefixes <=24
!
ip prefix-list SLASH_24_AND_SHORTER permit 0.0.0.0/0 le 24
!
! Apply the filter inbound and specify the maximum number of prefixes
!
router bgp 100
neighbor 54.4.2.254 prefix-list SLASH_24_AND_SHORTER in
neighbor 54.4.2.254 maximum 10000
!
! Enable root guard on trunk port facing SW2
!
interface FastEthernet0/23
spanning-tree guard root
SW2:
!
! Configure BPDU-Fiter at the interface level
!
interface range FastEthernet 0/16 - 18
switchport mode access
spanning-tree bpdufilter enable
Notice that the STP instance for VLAN431 is in root inconsistent state on the
port:
VLAN0413
Spanning tree enabled protocol ieee
Root ID Priority 413
Address 0012.0183.5900
This bridge is the root
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
VLAN0413
Spanning tree enabled protocol ieee
Root ID Priority 43
Address 0012.0183.5900
Cost 38
Port 10 (FastEthernet0/10)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
SW1 prefers the path to the root through port Fa0/10 over the inter-switch link on
Fa0/23, because of the IPS being in the inline mode and bypassing the BPGUs.
SCRack4R4#ping 204.12.9.254
!
! Enable DHCP snooping on vlan 128; make sure to enter both commands
! otherwise the feature is not functional
!
ip dhcp snooping
ip dhcp snooping vlan 128
!
! Configure the port towards ASA2’s outside interface as trusted
! to allow DHCP Offer packets in- and rate limit DHCP traffic
!
interface FastEthernet 0/14
ip dhcp snooping limit rate 100
ip dhcp snooping trust
Agent Running : No
Delay Timer Expiry : Not Running
Abort Timer Expiry : Not Running
router ospf 51
network 192.10.4.0 255.255.255.0 area 51
network 191.1.123.0 255.255.255.0 area 51
logging trap 3
logging host Outside 10.0.0.100
logging timestamp
R6:
ntp trusted-key 1
interface FastEthernet0/0
no ntp disable
Password:
SCRack4R1>
Verify that you can ping from ASA1 to R3, but not from R3 to ASA1.
SCRack4R3#ping 191.1.123.12
With logging enabled, debug NTP will show packets sent and received.
SCRack4ASA1(config)#
NTP: xmit packet to 150.4.6.6:
leap 3, mode 3, version 3, stratum 0, ppoll 64
rtdel 0000 (0.000), rtdsp 10400 (1015.625), refid 00000000 (0.0.0.0)
ref 00000000.00000000 (06:28:16.000 UTC Thu Feb 7 2036)
org ce13acb6.7daa11a1 (03:44:54.490 UTC Fri Jul 24 2009)
rec aeefd673.2b514a66 (08:53:07.169 UTC Sat Jan 2 1993)
xmt aeefd6b3.2ae09842 (08:54:11.167 UTC Sat Jan 2 1993)
NTP: rcv packet from 150.4.6.6 to 191.1.123.12 on Outside:
leap 0, mode 4, version 3, stratum 4, ppoll 64
rtdel 0000 (0.000), rtdsp 001d (0.443), refid 7f7f0101 (127.127.1.1)
ref ce13ace7.5b863a76 (03:45:43.357 UTC Fri Jul 24 2009)
org aeefd6b3.2ae09842 (08:54:11.167 UTC Sat Jan 2 1993)
rec ce13acf6.7db04252 (03:45:58.490 UTC Fri Jul 24 2009)
xmt ce13acf6.7db685fc (03:45:58.491 UTC Fri Jul 24 2009)
inp aeefd6b3.2b540480 (08:54:11.169 UTC Sat Jan 2 1993)
admin-context MGT
context MGT
config-url flash:MGT.cfg
changeto context A
Although configuring the firewall for multiple contexts is not required for this step,
it is needed for a later section of the lab. Make sure to read through the entire
lab before configuring. For traffic between interfaces, you can use the “same-
security-traffic” command with both interfaces at the same security level.
R3:
ip sla 1
udp-echo 239.1.1.1 5000 control disable
timeout 1000
frequency 1
ip sla schedule 1 life forever start-time now
ASA1:
access-list CAPTURE permit ip any 239.0.0.0 255.0.0.0
capture IN access-list CAPTURE interface Inside
Looking at the capture, you can see the traffic flowing from R3, and SW1
attempting the IGMP joins Look at the output of show igmp groups, to verify
that the ASA is restricting the groups allowed.
SCRack4ASA1(config)#
10 packets shown.
0 packets not shown due to performance limitations.
SCRack4ASA1(config)#
R3:
no ip sla schedule 1 life forever start-time now
SW1:
no interface vlan122
no ip multicast-routing
no ip pim rp-address 150.4.3.3
ip access-list extended FW
deny ip 10.0.0.0 0.255.255.255 any
deny ip 172.16.0.0 0.15.255.255 any
deny ip 192.168.0.0 0.0.255.255 any
deny ip 191.1.0.0 0.0.255.255 any
deny ip 150.4.0.0 0.0.255.255 any
permit tcp any host 10.0.0.100
R3:
interface FastEthernet0/1
ip inspect MYFW out
ip access-group FW in
R4:
ip route 10.4.4.0 255.255.255.0 null0
interface FastEthernet0/1
ip nat inside
!
interface Serial0/0.34
ip nat outside
interface Serial0/1
ip nat outside
R5:
ip route 10.5.5.0 255.255.255.0 null0
interface FastEthernet0/1
ip nat inside
!
interface Serial0/1
ip nat outside
!
interface Serial0/0.25
ip nat outside
ip nat inside source static network 10.45.45.0 10.5.5.0 /24
interface Serial0/1
crypto map MYMAP
!
interface Serial0/0.25
crypto map MYMAP
!
router ospf 1
redist static subnets
!
crypto isakmp key VPN address 150.4.4.4
SCRack4R4#
interface tunnel1
ip address 191.1.145.6 255.255.255.0
tunnel source lo0
tunnel mode gre multi
ip nhrp network-id 1
ip nhrp map multicast dynamic
no ip split-horizon eigrp 1
no ip next-hop-self eigrp 1
tunnel protection ipsec profile TEST
router eigrp 1
no auto-summary
network 191.1.145.0 0.0.0.255
network 10.6.6.0 0.0.0.255
R4:
crypto isakmp key VPN address 150.4.6.6
interface tunnel1
ip address 191.1.145.4 255.255.255.0
tunnel source lo0
tunnel mode gr multi
ip nhrp network-id 1
ip nhrp map 191.1.145.6 150.4.6.6
ip nhrp map multicast 150.4.6.6
ip nhrp network-id 1
ip nhrp nhs 191.1.145.6
tunnel protection ipsec profile TEST
ip nat outside
interface loop0
ip address 10.4.4.254 255.255.255.0 secondary
router eigrp 1
no auto-summary
network 10.4.4.0 0.0.0.255
network 191.1.145.0 0.0.0.255
R5:
crypto isakmp key VPN address 150.4.6.6
!
crypto ipsec profile TEST
set transform-set MY456
!
interface tunnel1
ip address 191.1.145.5 255.255.255.0
tunnel source lo0
tunnel mode gr multi
ip nhrp network-id 1
ip nhrp map 191.1.145.6 150.4.6.6
ip nhrp map multicast 150.4.6.6
ip nhrp network-id 1
ip nhrp nhs 191.1.145.6
tunnel protection ipsec profile TEST
ip nat outside
!
no ip route 10.5.5.0 255.255.255.0 null0
interface loop0
ip address 10.5.5.254 255.255.255.0 secondary
!
router eigrp 1
no auto-summary
network 10.5.5.0 0.0.0.255
network 191.1.145.0 0.0.0.255
SCRack4R6#ping 10.4.4.4
R4:
interface Serial0/0.34
no cry map MYMAP
interface Serial0/1
no crypto map MYMAP
R5:
interface ser0/1
no cry map MYMAP
!
interface Serial0/0.25
no cry map MYMAP
!
no crypto map MYMAP
Verify that you can ping from R4 to R5 off the FastEthernet interfaces:
R3:
crypto isakmp policy 10
encry des
hash sha
group 5
auth pre-share
!
crypto key generate rsa label MYKEYS mod 1024
!
crypto isakmp key R4isakmp address 150.4.34.4
crypto isakmp key R4isakmp address 150.4.45.4
crypto isakmp key R5isakmp address 150.4.25.5
crypto isakmp key R5isakmp address 150.4.45.5
crypto isakmp key R6isakmp address 204.12.4.6
ip access-list extended FW
no deny ip any any log
permit udp host 204.12.4.6 eq 848 host 150.4.3.3 eq 848
permit esp nost 150.4.6.6 host 150.4.4.4
permit esp host 150.4.6.6 host 150.4.5.5
deny ip any any log
!
crypto ipsec transform-set MY456 esp-3des esp-sha-hmac
!
crypto ipsec profile MYGET
set security-association lifetime seconds 1800
set transform-set MY456
!
ip access-list extended GETACL
permit gre any any
!
crypto gdoi group group1
identity number 1
server local
rekey lifetime seconds 86400
rekey retransmit 10 number 2
rekey authentication mypubkey rsa MYKEYS
rekey transport unicast
sa ipsec 1
profile MYGET
match address ipv4 GETACL
replay counter window-size 1024
address ipv4 150.4.3.3
R4:
crypto isakmp key R4isakmp address 150.4.3.3
no crypto isakmp key VPN address 150.4.6.6
no crypto isakmp key VPN address 150.4.5.5
!
crypto gdoi group MYGET
identity number 1
server address ipv4 150.4.3.3
!
crypto map MYMAP 10 gdoi
set group MYGET
!
interface Tunnel1
no tunnel protection ipsec profile TEST
interface Serial0/0.34
crypto map MYMAP
!
interface Serial0/1
crypto map MYMAP
no access-list 145
R5:
crypto isakmp key R5isakmp address 150.4.3.3
no crypto isakmp key VPN address 150.4.4.4
no crypto isakmp key VPN address 150.4.6.6
!
crypto gdoi group MYGET
identity number 1
server address ipv4 150.4.3.3
!
crypto map MYMAP 10 gdoi
set group MYGET
!
interface Tunnel1
no tunnel protection ipsec profile TEST
interface Serial0/0.25
crypto map MYMAP
!
interface Serial0/1
crypto map MYMAP
no access-list 145
R6:
crypto isakmp key R6isakmp address 150.4.3.3
no crypto isakmp key VPN address 150.4.4.4
no crypto isakmp key VPN address 150.4.5.5
!
crypto gdoi group MYGET
identity number 1
server address ipv4 150.4.3.3
!
crypto map MYMAP 10 gdoi
set group MYGET
!
interface Tunnel1
no tunnel protection ipsec profile TEST
interface FastEthernet0/0
crypto map MYMAP
SCRack4R5#show access-list
SCRack4R5#
service interface
physical-interfaces GigabitEthernet0/0
admin-state enabled
subinterface-type inline-vlan-pair
subinterface 1
vlan1 1014
vlan2 1008
exit
exit
exit
exit
yes
service analysis-enginge
virtual-sensor vs0
physical-interface GigabitEthernet0/0 subinterface-number 1
exit
exit
yes
SW2:
interface FastEthernet0/10
switchport trunk encap dot1q
switchport trunk allowed vlan 1014,1008
R6:
SCRack4R6#more realm-cisco.pub.key.txt
crypto key pubkey-chain rsa
named-key realm-cisco.pub signature
key-string
30820122 300D0609 2A864886 F70D0101 01050003 82010F00 3082010A
02820101
00C19E93 A8AF124A D6CC7A24 5097A975 206BE3A2 06FBA13F 6F12CB5B
4E441F16
17E630D5 C02AC252 912BE27F 37FDD9C8 11FC7AF7 DCDD81D9 43CDABC3
6007D128
B199ABCB D34ED0F9 085FADC1 359C189E F30AF10A C0EFB624 7E0764BF
3E53053E
5B2146A9 D7A5EDE3 0298AF03 DED7A5B8 9479039D 20F30663 9AC64B93
C0112A35
FE3F0C87 89BCB7BB 994AE74C FA9E481D F65875D6 85EAF974 6D9CC8E3
F0B08B85
50437722 FFBE85B9 5E4189FF CC189CB9 69C46F9C A84DFBA5 7A0AF99E
AD768C36
006CF498 079F88F8 A3B3FB1F 9FB7B3CB 5539E1D1 9693CCBB 551F78D2
892356AE
2F56D826 8918EF3C 80CA4F4D 87BFCA3B BFF668E9 689782A5 CF31CB6E
B4B094D3
F3020301 0001
quit
exit
exit
mkdir flash:/ipsdir
conf t
ip ips name R6IPS
ip ips config location flash:/ipsdir
ip ips signature-category
category all
retired true
exit
category ios_ips basic
retired false
exit
exit
interface FastEthernet0/0
ip ips R6IPS in
end
conf t
ip ips signature-category
category ios_ips basic
ip ips signature-definition
signature 2000 0
status
enabled true
retired false
exit
exit
signature 2004 0
status
enabled true
retired false
exit
exit
Generate some ICMP traffic from R3 by pinging R6, or by pinging BB3 from R6.
SCRack4R6#ping 204.12.4.254
R5 and R6:
ip domain-name INE.com
crypto key gen rsa mod 1024
username ips password ips
line vty 0 15
login local
IPS:
Step 1:
Step 2:
Step 3:
Step 4:
Step 5:
Step 6:
interface Serial0/0/0
ip address 54.4.2.6 255.255.255.0
ip access-group IDS_Ser0/0/0_in_1 in
encapsulation frame-relay
frame-relay map ip 54.4.2.254 100
no frame-relay inverse-arp
frame-relay lmi-type cisco
end
SCRack4R6#show access-list
Extended IP access list IDS_Ser0/0/0_in_1
10 permit ip host 10.0.0.123 any
20 deny ip host 99.99.99.99 any
30 deny ip host 88.88.88.88 any
40 permit ip any any (17 matches)
SCRack4R6#
In order to install a shun entry, ASA firewall needs a route to reach the shunned
host/network. Use static routing commands to accomplish this.
Under Monitoring | Rate Limits, add a rate-limit for the protocol icmp,
with a rate of 50 and source ip of 88.88.88.88. Next, Verify the policy applied to
R5.
Serial0/0.25
AAA Server:
Step 1:
Step 2:
ASA1:
Access-group OUTSIDE permit tcp any 191.1.123.99 eq 80
Access-group OUTSIDE permit tcp any 191.1.123.99 eq 443
access-group OUTSIDE in interface Outside per-user-override
Phase: 1
Type: FLOW-LOOKUP
Subtype:
Result: ALLOW
Config:
Additional Information:
Found no matching flow, creating a new flow
Phase: 2
Type: ROUTE-LOOKUP
Subtype: input
Result: ALLOW
Config:
Additional Information:
in 192.10.4.0 255.255.255.0 Inside
Phase: 3
Type: ACCESS-LIST
Subtype:
Result: ALLOW
Config:
Implicit Rule
Additional Information:
Phase: 4
Type: ACCESS-LIST
Subtype: aaa-user
Result: ALLOW
Config:
Additional Information:
Forward Flow based lookup yields rule:
in id=0xd5d7cfa8, priority=12, domain=aaa-user, deny=false
hits=1, user_data=0xa, cs_id=0x0, flags=0x0, protocol=6
src ip=191.1.114.200, mask=255.255.255.255, port=0
dst ip=192.10.4.0, mask=255.255.255.0, port=80, dscp=0x0
Phase: 5
Type: IP-OPTIONS
Subtype:
Result: ALLOW
Config:
Additional Information:
Forward Flow based lookup yields rule:
in id=0xd592b0b8, priority=0, domain=permit-ip-option, deny=true
hits=363, user_data=0x0, cs_id=0x0, reverse, flags=0x0,
protocol=0
src ip=0.0.0.0, mask=0.0.0.0, port=0
dst ip=0.0.0.0, mask=0.0.0.0, port=0, dscp=0x0
Phase: 6
Type: AAA
Subtype: aaa-auth
Result: ALLOW
Config:
Additional Information:
Forward Flow based lookup yields rule:
in id=0xd5d86560, priority=89, domain=aaa-auth, deny=true
hits=1, user_data=0xd5d99a80, cs_id=0x0, flags=0x0, protocol=0
src ip=191.1.114.200, mask=255.255.255.255, port=0
dst ip=0.0.0.0, mask=0.0.0.0, port=0, dscp=0x0
Phase: 7
Type: IP-OPTIONS
Subtype:
Result: ALLOW
Config:
Additional Information:
Reverse Flow based lookup yields rule:
in id=0xd595a610, priority=0, domain=permit-ip-option, deny=true
hits=80, user_data=0x0, cs_id=0x0, reverse, flags=0x0,
protocol=0
src ip=0.0.0.0, mask=0.0.0.0, port=0
dst ip=0.0.0.0, mask=0.0.0.0, port=0, dscp=0x0
Phase: 8
Type: FLOW-CREATION
Subtype:
Result: ALLOW
Config:
Additional Information:
New flow created with id 1769, packet dispatched to next module
Module information for forward flow ...
snp_fp_inspect_ip_options
snp_fp_tcp_normalizer
snp_fp_translate
snp_fp_adjacency
snp_fp_fragment
snp_fp_tracer_drop
snp_ifc_stat
Phase: 9
Type: ROUTE-LOOKUP
Subtype: output and adjacency
Result: ALLOW
Config:
Additional Information:
found next-hop 192.10.4.200 using egress ifc Inside
adjacency Active
next-hop mac address 0012.0183.5900 hits 165
Result:
input-interface: Outside
input-status: up
input-line-status: up
output-interface: Inside
output-status: up
output-line-status: up
Action: allow
SCRack4ASA1#
--------------------------------------
Raw packet data (length = 128).....
01 16 00 80 b0 29 ae 4f dc e5 ba 6b c8 61 86 47 | .....).O...k.a.G
74 9d 12 e3 01 0a 48 54 54 50 55 53 45 52 02 12 | t.....HTTPUSER..
38 dc f8 8a 3b cc f3 ba 21 4d 18 80 3e d9 18 2e | 8...;...!M..>...
04 06 bf 01 7b 0c 05 06 00 00 00 0e 3d 06 00 00 | ....{.......=...
00 05 1a 22 00 00 00 09 01 1c 69 70 3a 73 6f 75 | ..."......ip:sou
72 63 65 2d 69 70 3d 31 39 31 2e 31 2e 31 31 34 | rce-ip=191.1.114
2e 32 30 30 1f 1c 69 70 3a 73 6f 75 72 63 65 2d | .200..ip:source-
69 70 3d 31 39 31 2e 31 2e 31 31 34 2e 32 30 30 | ip=191.1.114.200
--------------------------------------
Raw packet data (length = 112).....
02 16 00 70 6f b5 6c 00 2b d9 f5 25 89 57 6a 2d | ...po.l.+..%.Wj-
01 0b 82 01 1a 3c 00 00 00 09 01 36 41 43 53 3a | .....<.....6ACS:
43 69 73 63 6f 53 65 63 75 72 65 2d 44 65 66 69 | CiscoSecure-Defi
6e 65 64 2d 41 43 4c 3d 23 41 43 53 41 43 4c 23 | ned-ACL=#ACSACL#
2d 49 50 2d 42 42 32 2d 34 61 37 38 63 30 65 36 | -IP-BB2-4a78c0e6
08 06 ff ff ff ff 19 1a 43 41 43 53 3a 30 2f 31 | ........CACS:0/1
38 36 31 34 2f 62 66 30 31 37 62 30 63 2f 31 34 | 8614/bf017b0c/14
--------------------------------------
Raw packet data (length = 215).....
01 17 00 d7 b0 29 ae 4f dc e5 ba 6b c8 61 86 47 | .....).O...k.a.G
74 9d 12 e3 01 1a 23 41 43 53 41 43 4c 23 2d 49 | t.....#ACSACL#-I
50 2d 42 42 32 2d 34 61 37 38 63 30 65 36 02 12 | P-BB2-4a78c0e6..
38 dc f8 8a 3b cc f3 ba 21 4d 18 80 3e d9 18 2e | 8...;...!M..>...
04 06 bf 01 7b 0c 05 06 00 00 00 0f 3d 06 00 00 | ....{.......=...
00 05 1a 17 00 00 00 09 01 11 61 61 61 3a 73 65 | ..........aaa:se
72 76 69 63 65 3d 76 70 6e 1a 1e 00 00 00 09 01 | rvice=vpn.......
18 61 61 61 3a 65 76 65 6e 74 3d 61 63 6c 2d 64 | .aaa:event=acl-d
6f 77 6e 6c 6f 61 64 50 12 f6 7f a3 a5 3d 8e 1e | ownloadP....=..
c2 bb 85 2b be 6e 62 dd 30 1a 22 00 00 00 09 01 | ...+.nb.0.".....
1c 69 70 3a 73 6f 75 72 63 65 2d 69 70 3d 31 39 | .ip:source-ip=19
31 2e 31 2e 31 31 34 2e 32 30 30 1f 1c 69 70 3a | 1.1.114.200..ip:
73 6f 75 72 63 65 2d 69 70 3d 31 39 31 2e 31 2e | source-ip=191.1.
31 31 34 2e 32 30 30 | 114.200
61 61 61 3a 73 65 72 76 69 63 65 3d 76 70 6e | aaa:service=vpn
Radius: Type = 26 (0x1A) Vendor-Specific
Radius: Length = 30 (0x1E)
Radius: Vendor ID = 9 (0x00000009)
Radius: Type = 1 (0x01) Cisco-AV-pair
Radius: Length = 24 (0x18)
Radius: Value (String) =
61 61 61 3a 65 76 65 6e 74 3d 61 63 6c 2d 64 6f | aaa:event=acl-do
77 6e 6c 6f 61 64 | wnload
Radius: Type = 80 (0x50) Message-Authenticator
Radius: Length = 18 (0x12)
Radius: Value (String) =
f6 7f a3 a5 3d 8e 1e c2 bb 85 2b be 6e 62 dd 30 | ...=.....+.nb.0
Radius: Type = 26 (0x1A) Vendor-Specific
Radius: Length = 34 (0x22)
Radius: Vendor ID = 9 (0x00000009)
Radius: Type = 1 (0x01) Cisco-AV-pair
Radius: Length = 28 (0x1C)
Radius: Value (String) =
69 70 3a 73 6f 75 72 63 65 2d 69 70 3d 31 39 31 | ip:source-ip=191
2e 31 2e 31 31 34 2e 32 30 30 | .1.114.200
Radius: Type = 31 (0x1F) Calling-Station-Id
Radius: Length = 28 (0x1C)
Radius: Value (String) =
69 70 3a 73 6f 75 72 63 65 2d 69 70 3d 31 39 31 | ip:source-ip=191
2e 31 2e 31 31 34 2e 32 30 30 | .1.114.200
send pkt 10.0.0.100/1645
rip 0xd5e42f08 state 7 id 23
rad_vrfy() : response message verified
rip 0xd5d016f8
: chall_state ''
: state 0x7
: timer 0x0
: reqauth:
b0 29 ae 4f dc e5 ba 6b c8 61 86 47 74 9d 12 e3
: info 0x11
session_id 0x11
request_id 0x17
user '#ACSACL#-IP-BB2-4a78c0e6'
response '***'
app 443
reason 0
skey 'cisco'
sip 10.0.0.100
type 1
--------------------------------------
Raw packet data (length = 192).....
02 17 00 c0 4f 42 eb 5c e8 9b f3 d8 3d 46 d2 f5 | ....OB.\....=F..
03 29 7f 1e 1a 40 00 00 00 09 01 3a 69 70 3a 69 | .)..@.....:ip:i
6e 61 63 6c 23 31 3d 70 65 72 6d 69 74 20 74 63 | nacl#1=permit tc
70 20 61 6e 79 20 31 39 32 2e 31 30 2e 31 2e 30 | p any 192.10.4.0
20 32 35 35 2e 32 35 35 2e 32 35 35 2e 30 20 65 | 255.255.255.0 e
71 20 38 30 1a 39 00 00 00 09 01 33 69 70 3a 69 | q 80.9.....3ip:i
6e 61 63 6c 23 32 3d 70 65 72 6d 69 74 20 74 63 | nacl#2=permit tc
70 20 61 6e 79 20 68 6f 73 74 20 31 39 31 2e 31 | p any host 191.1
2e 31 32 33 2e 39 39 20 65 71 20 38 30 19 21 43 | .123.99 eq 80.!C
41 43 53 3a 66 66 66 66 66 66 66 66 2f 31 38 36 | ACS:ffffffff/186
31 35 2f 62 66 30 31 37 62 30 63 2f 31 35 50 12 | 15/bf017b0c/15P.
d2 22 d6 e0 21 01 4b b4 13 05 d2 bf 63 89 6a 6d | ."..!.K.....c.jm
AAA Server:
Step 1:
SC.9.9.BB2>telnet 150.4.2.2
Trying 150.4.2.2 ... Open
Username: TELNETUSER
Password:
SC.9.9.BB2>telnet 150.4.2.2
Trying 150.4.2.2 ... Open
Password:
SCRack4R2>
SCRack4ASA1# show uauth
Current Most Seen
Authenticated Users 1 1
Authen In Progress 0 1
user 'TELNETUSER' at 192.10.4.254, authenticated
absolute timeout: 0:05:00
inactivity timeout: 0:00:00
SCRack4ASA1#
ASA1:
aaa authorization include telnet Inside 0 0 TAC
SC.9.9.BB2>telnet 150.4.4.4
Trying 150.4.4.4 ... Open
Username: TELNETUSER
Password:
AAA Server:
Now that you have verified that the authorization fails, configure the ACS for the
command authorization for the user. Also, you can add a banner on R4, so that
you know when you are logging into the Router, and when you are authenticating
against the ASA.
R4:
banner login c R4 banner c
SC.9.9.BB2>telnet 150.4.4.4
Trying 150.4.4.4 ... Open
Username: TELNETUSER
Password:
SC.9.9.BB2>telnet 150.4.4.4
Trying 150.4.4.4 ... Open
R4 banner
Username: ADMIN
Password:
SCRack4R4#
SC.9.9.BB2>telnet 150.4.5.5
Trying 150.4.5.5 ...
% Connection timed out; remote host not responding
SC.9.9.BB2>
ASA1:
aaa accounting include telnet Inside 0 0 TAC
AAA Server:
R3:
interface FastEthernet0/0
ip ospf authentication
ip ospf authentication-key CISCO
class-map BGP
match access-group name BGP
class-map IGP
match access-group name IGP
class-map FRAGS
match access-group name FRAGS
class-map MGT
match access-group name MGT
class-map TELZERO
match access-group name TELZERO
policy-map MYCP
class BGP
police rate 1000 pps burst 2000 packets conform-action trans exceed-
action drop
class IGP
police rate 50 pps burst 100 packets conform-action transmit exceed-
action drop
class TELZERO
drop
class FRAGS
police rate 25 pps burst 50 packets conform-action transmit exceed-
action drop
class MGT
police rate 50 pps burst 100 packets conform-action transmit exceed-
action drop
control-plane
service-policy input MYCP
If you don't specify a burst value, it may default to 0, and traffic may be dropped.
If you see your BGP sessions drop, double check the output of show policy-map
control-plane to see if you are dropping traffic.
For the Queue Threshold limitations, configure class maps of the type “queue-
threshold”, and a “queue-threshold” policy map.
R3:
class-map type queue-threshold match-any BGPQ
match protocol bgp
queue-threshold 50
class SSHQ
queue-limit 25
class TELQ
queue-limit 40
class OTHERQ
queue-limit 30
control-plane host
service-policy type queue-threshold input MYCPQ
SW2:
interface FastEthernet0/15
switchport trunk encap dot1q
switchport trunk allowed vlan 19,79
switchport mode trunk
SW1:
int FastEthernet0/20
switchport access vlan 79
ASA2:
interface Ethernet0/2
no shut
interface Ethernet0/2.19
vlan 19
interface Ethernet0/2.79
vlan 79
context B
config-url B.cfg
allocate-interface Ethernet0/2.19
allocate-interface Ethernet0/2.79
changeto context B
names
name 10.0.0.100 ACS
access-list O permit udp any host ACS eq 1812
access-list O permit udp any host ACS eq 1813
access-list O permit udp any host ACS eq 1645
access-list O permit udp any host ACS eq 1646
access-list O permit tcp any host ACS eq 49
access-list O permit icmp any host ACS echo
access-list O permit icmp any host ACS echo-reply
access-list O permit udp host 10.0.0.123 host ACS eq snmptrap
access-group L2 in interface
class-map TAC
match port tcp eq 49
!
class-map TCP
match access-list NOTAC
policy-map LIMIT
class TAC
set conn embryonic-conn-max 7
class TCP
set conn embryonic-conn-max 3
!
service-policy LIMIT interface outside
Global policy:
Service-policy: global_policy
Class-map: class-default
Match: any
Action:
Output flow:
Interface outside:
Service-policy: LIMIT
Class-map: TAC
Match: port tcp eq tacacs
Action:
Input flow: set connection embryonic-conn-max 7
Class-map: class-default
Match: any
Action:
Global policy:
Service-policy: global_policy
Class-map: class-default
Match: any
Action:
Output flow:
Interface outside:
Service-policy: LIMIT
Class-map: TCP
Match: access-list NOTAC
Access rule: permit tcp any any neq tacacs
Action:
Input flow: set connection embryonic-conn-max 3
Class-map: class-default
Match: any
Action:
Rack4ASA2/B#
R4:
line vty 0 181
login authent VTY
authorization exec VTY
end
!
enable view
!
conf t
parser view ACCESS
secret cisco
commands exec include logout
commands exec include wr mem
commands exec include show ip interface brief
commands configure include interface loopback 0
commands configure include all interface serial 0/0
commands configure include all interface ser0/1
commands exec include show priv
commands router include all network
commands configure include router
commands configure include interface
commands exec include config t
commands interface include all ip address
!
radius-server host 10.0.0.100 key cisco
ip radius source-int lo0
AAA Server:
Add the user to the ACS - username R4ACCESS and the password of cisco. Set
the Cisco RADIUS attribute 009\001 cli-view-name=ACCESS to match the
view configured on the router.
For the ADMIN user, configuration is the same with the attribute cli-view-
name=root
If you want to see the information downloaded from the AAA server, you can
debug RADIUS sessions while connecting to the VTY line.
SCRack4R4#telnet 150.4.4.4
Trying 150.4.4.4 ... Open
Username:
Password:
SCRack4R4#show priv
Currently in View Context with view 'ACCESS'
SCRack4R4#
SCRack4R4(config)#?
Configure commands:
do To run exec commands in config mode
exit Exit from configure mode
interface Select an interface to configure
router Enable a routing process
SCRack4R4(config)#
For local fallback testing, shut down both serial interfaces and verify that the
users are still allowed to log in.
SCRack4R4#telnet 150.4.4.4
Trying 150.4.4.4 ... Open
Username: R4ACCESS
Password:
SCRack4R4#show priv
Currently in View Context with view 'ACCESS'
SCRack4R4#
ASA1:
access-list OUTSIDE permit tcp any host 192.10.4.150 eq 21
access-list OUTSIDE permit tcp any host 192.10.4.150 eq 80
!
class-map HTTP
match port tcp eq www
class-map FTP
match port tcp eq ftp
!
regex CMD "[cC][mM][dD]\.[eE][xX][eE]"
class-map type inspect http match-all HTTPCMD
match request uri regex CMD
!
policy-map type inspect ftp MYFTP
parameters
match request-command get put
reset
!
policy-map type inspect http MYHTTP
parameters
match req-resp content-type mismatch
log
class HTTPCMD
reset
!
policy-map OUTSIDEPOL
class HTTP
inspect http MYHTTP
class FTP
inspect ftp strict MYFTP
!
service-policy OUTSIDEPOL interface outside
Global policy:
Service-policy: global_policy
Class-map: inspection_default
Interface Outside:
Service-policy: OUTSIDEPOL
Class-map: HTTP
Inspect: http MYHTTP, packet 0, drop 0, reset-drop 0
protocol violations
packet 0
match req-resp content-type mismatch
log, packet 0
class HTTPCMD
reset, packet 0
Class-map: FTP
SCRack4ASA1#
Global policy:
Service-policy: global_policy
Class-map: inspection_default
Inspect: ftp, packet 0, drop 0, reset-drop 0
Interface Outside:
Service-policy: OUTSIDEPOL
Class-map: HTTP
Class-map: FTP
Inspect: ftp strict MYFTP, packet 0, drop 0, reset-drop 0
match request-command get put
reset, packet 0
SCRack4ASA1#
SCRack4R3#telnet 204.12.4.100
Trying 204.12.4.100 ... Open
SC.9.9.BB1_FRS>
SCRack4R6#show ip nat trans
Pro Inside global Inside local Outside local Outside
global
tcp 204.12.4.100:23 112.0.0.1:23 204.12.4.3:37884
204.12.4.3:37884
--- 204.12.4.100 112.0.0.1 --- ---
SCRack4R6#
R6:
class-map TELNET
match protocolocol telnet
policy-map TELNET
class TELNET
set prec 3
interface FastEthernet0/0
service-policy output TELNET
R3:
ip access-list ext FW
100 permit tcp any any eq 23 prec 3
110 permit tcp any any eq 23 prec 4
SW1:
interface FastEthernet0/6
mls qos trust ip-precedence
SW2:
interface FastEthernet0/14
mls qos trust ip-precedence
interface FastEthernet0/23
mls qos trust ip-precedence
SCRack4R6#telnet 150.4.3.3
Trying 150.4.3.3 ... Open
Password:
R6:
time-range WEB
periodic daily 08:00 to 22:59
interface Serial0/0/0
service-policy input dropweb
Serial0/0/0
If you generate a lot of traffic, you can see the log message for the
filter.
SW1:
ip dhcp snooping
ip dhcp snooping vlan 55
interface FastEthernet0/5
ip dhcp snooping trust
SW1:
Interface VLAN 55
ip address DHCP
IPS:
service signature-definition sig0
signatures 3002 0
engine sweep
event-action deny-attacker-inline
specify-src-addr-filter yes
src-addr-filter 0.0.0.0-191.1.123.199,191.1.123.201-
255.255.255.255
exit