CCNA Security 04
CCNA Security 04
Lesson Planning
This lesson should take 3-6 hours to present The lesson should include lecture, demonstrations, discussion and assessment The lesson can be taught in person or using remote instruction
Major Concepts
Implement ACLs Describe the purpose and operation of firewall technologies Implement CBAC Zone-based Policy Firewall using SDM and CLI
Lesson Objectives
Upon completion of this lesson, the successful participant will be able to:
1. Describe standard and extended ACLs 2. Describe applications of standard and extended ACLs 3. Describe the relationship between topology and flow for ACLs and describe the proper selection of ACL types for particular topologies (ACL design methodology) 4. Describe how to implement ACLs with SDM 5. Describe the usage and syntax for complex ACLs 6. Describe the usage and syntax for dynamic ACLs
7. Interpret the output of the show and debug commands used to verify and troubleshoot complex ACL implementations
Lesson Objectives
8. 9. Describe how to mitigate common network attacks with ACLs Describe the purpose of firewalls and where they reside in a modern network
10. Describe the various types of firewalls 11. Describe design considerations for firewalls and the implications for the network security policy
Lesson Objectives
16. Describe the role of Zone-Based Policy Firewall in a modern network 17. Describe the underlying operation of Zone-Based Policy Firewall 18. Describe the implementation of Zone-Based Policy Firewall with CLI 19. Describe the implementation of Zone-Based Policy Firewall with manual SDM 20. Describe the implementation of Zone-Based Policy Firewall with the SDM Wizard 21. Describe the verification and troubleshooting of Zone-Based Policy Firewall
10
The first value specifies the ACL number The second value specifies whether to permit or deny accordingly The third value indicates protocol type The source IP address and wildcard mask determine where traffic originates. The destination IP address and wildcard mask are used to indicate the final destination of the network traffic The command to apply the standard or extended numbered ACL:
11
Named IP ACLs
Standard
Router(config)# ip access-list extended vachon1 Router(config-ext-nacl)# deny ip any 200.1.2.10 0.0.0.1 Router(config-ext-nacl)# permit tcp any host 200.1.1.11 eq 80 Router(config-ext-nacl)# permit tcp any host 200.1.1.10 eq 25 Router(config-ext-nacl)# permit tcp any eq 25 host 200.1.1.10 any established Router(config-ext-nacl)# permit tcp any 200.1.2.0 0.0.0.255 established Router(config-ext-nacl)# permit udp any eq 53 200.1.2.0 0.0.0.255 Router(config-ext-nacl)# deny ip any any Router(config-ext-nacl)# interface ethernet 1 Router(config-if)# ip access-group vachon1 in Router(config-if)# exit
Extended
12
There are several pieces of information logged: The actionpermit or deny The protocolTCP, UDP, or ICMP The source and destination addresses For TCP and UDPthe source and destination port numbers For ICMPthe message types
13
ACLs are process top-down. The most specific statements must go at the top of the list
All ACLs have an implicit deny all statement at the end, therefore every list must have at least one permit statement to allow any traffic to pass
14
15
r1
r1(config)# access-list 1 deny 172.16.4.0 0.0.0.255 r1(config)# access-list 1 permit any r1(config)# interface ethernet 0 r1(config-if)# ip access-group 1 out
2009 Cisco Learning Institute.
16
r1 access-list 101 deny tcp 172.16.4.0 0.0.0.255 172.16.3.0 0.0.0.255 eq 21 access-list 101 deny tcp 172.16.4.0 0.0.0.255 172.16.3.0 0.0.0.255 eq 20 access-list 101 permit ip any any
2009 Cisco Learning Institute.
17
19
Inbound ACL
2009 Cisco Learning Institute.
Outbound ACL
20
ACL Placement
Standard ACLs should be placed as close to the destination as possible. Standard ACLs filter packets based on the source address only. If placed too close to the source, it can deny all traffic, including valid traffic.
Extended ACLs should be placed on routers as close as possible to the source that is being filtered. If placed too far from the source being filtered, there is inefficient use of network resources.
2009 Cisco Learning Institute.
21
R2
Serial 0/0/0
F0/1
R1
F0/0
R3
192.168.20.2/24
PC A
2009 Cisco Learning Institute.
POP3 Server
22
Viewing Commands
23
Using SDM
24
Access Rules
Choose Configure > Additional Tasks > ACL Editor
Rule types: Access Rules NAT Rules Ipsec Rules NAC Rules Firewall Rules QoS Rules Unsupported Rules Externally Defined Rules Cisco SDM Default Rules
2009 Cisco Learning Institute.
25
8. Complete this field based on the choice made in #7 9. Enter an optional description
26
3. Choose a direction
4. An information box with options appears if a rule is already associated with that interface, that direction. 1. Click Associate
2009 Cisco Learning Institute.
27
Viewing Commands
R1# show running-config <output omitted> ! hostname R1 <output omitted> enable secret 5 $1$MJD8$.1LWYcJ6iUi133Yg7vGHG/ <output omitted> crypto pki trustpoint TP-self-signed1789018390 enrollment selfsigned subject-name cn=IOS-Self-SignedCertificate-1789018390 revocation-check none rsakeypair TP-self-signed-1789018390 ! crypto pki certificate chain TP-selfsigned-1789018390 certificate self-signed 01 3082023A 308201A3 A0030201 02020101 300D0609 2A864886 F70D0101 04050030 <output omitted> 1BF29620 A084B701 5B92483D D934BE31 ECB7AB56 8FFDEA93 E2061F33 8356 quit interface FastEthernet0/1 ip address 192.168.1.1 255.255.255.0 ip access-group Outbound in <output omitted> ! interface Serial0/0/0 ip address 10.1.1.1 255.255.255.252 clock rate 128000 ! <output omitted> no ip http server ip http secure-server ! ip access-list standard Outbound remark SDM_ACL Category=1 permit 192.168.1.3 ! access-list 100 remark SDM_ACL Category=16 access-list 100 deny tcp any host 192.168.1.3 eq telnet log access-list 100 permit ip any any ! <output omitted> !
28
29
Types of ACLs
Standard IP ACLs Extended IP ACLs
30
The established keyword: Forces a check by the routers to see if the ACK, FIN, PSH, RST, SYN or URG TCP control flags are set. If flag is set, the TCP traffic is allowed in. Does not implement a stateful firewall on a router Hackers can take advantage of the open hole Option does not apply to UDP or ICMP traffic
2009 Cisco Learning Institute.
31
Serial0/0/0
R 2
Serial0/0/1
Serial 0/0/0
Serial0/0/1
R 1 F0/1
R 3
F0/1
R 1 PC A
192.168.1.3/24
PC C
32
Reflexive ACLs
Provide a truer form of session filtering Much harder to spoof
Serial0/0/0
R 2
Serial0/0/1
Serial 0/0/0
Serial0/0/1
Allow an administrator to perform actual session filtering for any type of IP traffic Work by using temporary access control entries (ACEs)
R 1 F0/1
F0/1
R 3
R 1 PC A
192.168.1.3/24
PC C
33
Serial0/ 0/0
R Internet 2
Serial0/0/1
2.
Serial 0/0/0
3.
R 1
PC A
2009 Cisco Learning Institute.
34
Dynamic ACLs
Overview Creating a Dynamic ACL Setting up a Dynamic ACL CLI Commands
35
36
37
Router(config)# access-list ACL_# dynamic dynamic_ACL_name [timeout minutes] {deny | permit} IP_protocol source_IP_address src_wildcard_mask destination_IP_address dst_wildcard_mask [established] [log]
38
CLI Commands
39
Time-based ACLs
Overview CLI Commands Example Configuration
40
Overview
41
CLI Commands
42
Example Configuration
Perimeter(config)# time-range employee-time Perimeter(config-time)# periodic weekdays 12:00 to 13:00 Perimeter(config-time)# periodic weekdays 17:00 to 19:00 Perimeter(config-time)# exit Perimeter(config)# access-list 100 permit tcp any host 200.1.1.11 eq 25 Perimeter(config)# access-list 100 permit tcp any eq 25 host 200.1.1.11 established Perimeter(config)# access-list 100 permit udp any host 200.1.1.12 eq 53 Perimeter(config)# access-list 100 permit udp any eq 53 host 200.1.1.12 Perimeter(config)# access-list 100 permit tcp any 200.1.1.0 0.0.0.255 established time-range employeetime Perimeter(config)# access-list 100 deny ip any any Perimeter(config)# interface ethernet 1 Perimeter(config-if)# ip access-group 100 in Perimeter(config-if)# exit Perimeter(config)# access-list 101 permit tcp host 200.1.1.11 eq 25 any Perimeter(config)# access-list 101 permit tcp host 200.1.1.11 any eq 25 Perimeter(config)# access-list 101 permit udp host 200.1.1.12 eq 53 any Perimeter(config)# access-list 101 permit udp host 200.1.1.12 any eq 53 Perimeter(config)# access-list 101 permit tcp 200.1.1.0 0.0.0.255 any time-range employee-time Perimeter(config)# access-list 100 deny ip any any Perimeter(config)# interface ethernet 1 Perimeter(config-if)# ip access-group 101 out
43
R2 Internet
Serial0/0/1
Serial 0/0/0
10.1.1.1
R1
192.168.1.0/24
I cant surf the web at 10:00 A.M. because of the timebased ACL!
44
Serial0/0/0
R 2
Serial0/0/1
The ACLs are implemented. Now it is time to verify that they are working properly.
R 1 F0/1
R 3
F0/1
R 1
PC C
45
Confirmation
Perimeter# show access-list 100 Extended IP access list 100 permit tcp any host 200.1.1.14 eq www permit tcp any host 200.1.1.12 eq smtp permit tcp any eq smtp host 200.1.1.12 established permit tcp any host 200.1.1.11 eq ftp permit tcp any host 200.1.1.11 eq ftp-data permit tcp any eq www 200.1.2.0 0.0.0.255 established permit udp any eq domain 200.1.2.0 0.0.0.255 deny ip any any (1237 matches)
2009 Cisco Learning Institute.
(189 matches)
46
Troubleshooting
Perimeter# debug ip packet IP packet debugging is on IP: IP: IP: IP: IP: IP: IP: IP: IP: s=172.69.13.44 (Serial0/0), d=10.125.254.1 (Serial0/1), g=172.69.16.2, forward s=200.0.2.2 (Ethernet0), d=10.36.125.2 (Serial0/1), g=172.69.16.2, forward s=200.0.2.6 (Ethernet0), d=255.255.255.255, rcvd 2 s=200.0.2.55 (Ethernet0), d=172.69.2.42 (Serial0/0), g=172.69.13.6, forward s=200.0.2.33 (Ethernet0), d=10.130.2.156 (Serial0/1), g=172.69.16.2, forward s=200.0.2.27 (Ethernet0), d=172.69.43.126 (Serial0/0), g=172.69.23.5, forward s=200.0.2.27 (Ethernet0), d=172.69.43.126 (Serial0/0), g=172.69.13.6, forward s=200.5.5.5 (Ethernet1), d=255.255.255.255, rcvd 2 s=200.0.2.2 (Ethernet0), d=10.36.125.2 (Serial0/1), g=172.69.16.2, access denied
47
48
Attacks Mitigated
ACLs can be used to: Mitigate IP address spoofinginbound
Filter traceroute
49
CLI Commands
Inbound
R1(config)#access-list R1(config)#access-list R1(config)#access-list R1(config)#access-list R1(config)#access-list R1(config)#access-list R1(config)#access-list 150 150 150 150 150 150 150 deny deny deny deny deny deny deny ip ip ip ip ip ip ip 0.0.0.0 0.255.255.255 any 10.0.0.0 0.255.255.255 any 127.0.0.0 0.255.255.255 any 172.16.0.0 0.15.255.255 any 192.168.0.0 0.0.255.255 any 224.0.0.0 15.255.255.255 any host 255.255.255.255 any
Outbound
R1(config)#access-list 105 permit ip 192.168.1.0 0.0.0.255 any
50
Serial 0/0/0
200.5.5.5/24
F0/1
R1
F0/0
R1(config)#access-list 122 permit udp any host 192.168.20.2 eq domain R1(config)#access-list 122 permit tcp any host 192.168.20.2 eq smtp R1(config)#access-list 122 permit tcp any host 192.168.20.2 eq ftp
R1(config)#access-list R1(config)#access-list R1(config)#access-list R1(config)#access-list
2009 Cisco Learning Institute.
eq eq eq eq
Serial 0/0/0
200.5.5.5/24
F0/1
R1
F0/0
192.168.20.2/24
Inbound on S0/0/0
PC A permit icmp any any echo-reply permit icmp any any source-quench permit icmp any any unreachable deny icmp any any
Outbound on S0/0/0
R1(config)#access-list R1(config)#access-list R1(config)#access-list R1(config)#access-list
2009 Cisco Learning Institute.
Firewall Technologies
Role of Firewalls in Securing Networks
Types of Firewalls
Firewalls in Network Design
53
54
Overview
A firewall is a system that enforces an access control policy between network
55
Benefits of Firewalls
Prevents exposing sensitive hosts and applications to untrusted users Firewalls prevent malicious data from being sent to servers and clients.
Properly configured firewalls make security policy enforcement simple, scalable, and robust.
A firewall reduces the complexity of security management by offloading most of the network access control to a couple of points in the network.
56
Types of Firewalls
Filtering Firewalls Packet Filtering Firewall Stateful Firewall Cisco Systems Firewall Solutions
57
Stateful firewallkeeps track of the state of a connection: whether the connection is in an initiation, data transfer, or termination state
Application gateway firewall (proxy firewall) filters information at Layers 3, 4, 5, and 7. Firewall control and filtering done in software.
Address-translation firewallexpands the number of IP addresses available and hides network addressing design.
58
59
60
61
Stateful Firewall
10.1.1.1
200.3.3.3
destination port 80
62
Disadvantages
Advantages
63
Stateful failover
Local URL whitelist and blacklist support Application inspection for web and e-mail traffic
64
65
DMZ
Public-DMZ Policy
Trusted
Private-Public Policy
Internet
Untrusted
66
Network Core
Core network security: Protects against malicious software and traffic anomalies, enforces network policies, and ensures survivability Disaster recovery: Offsite storage and redundant architecture
2009 Cisco Learning Institute.
67
Remember that firewalls primarily protect from technical attacks originating from the outside.
2009 Cisco Learning Institute.
68
Design Example
Internet R
2 Cisco Router with IOS Firewall
Serial 0/0/0
F0/ 1
F0/ 5
F0/6
R 1
R 3 F0/
1 F0/ 5
S 1
F0/1 F0/1
S 3 S
F0/1 2 8
F0/1 8
PC A (RADIUS/TACA CS+)
2009 Cisco Learning Institute.
PC C
69
CBAC Operation
Configuration of CBAC Verification and Troubleshooting CBAC
70
Introduction to CBAC
Overview CBAC Capabilities
71
Overview
Provides four main functions: Filters TCP and UDP packets based on application layer protocol session information
- Traffic Filtering - Traffic Inspection - Intrusion Detection - Generation of Audits and Alerts
72
CBAC Capabilities
Monitors TCP Connection Setup
73
CBAC Operation
Overview Step-by-Step CBAC TCP and UDP Handling CBAC Example
74
Overview
75
Step-by-Step
1. Examines the fa0/0 inbound ACL to determine if telnet requests are permitted to leave the network.
Request Telnet 209.x.x.x
Fa0/0 S0/0/0
2. IOS compares packet type to inspection rules to determine if Telent should be tracked.
4. Adds a dynamic entry to the inbound ACL on s0/0/0 to allow reply packets back into the internal network.
5. Once the session is terminated by the client, the router will remove the state entry and dynamic ACL entry.
76
77
78
CBAC Example
79
Configuration of CBAC
Four Steps to Configure Step 1: Pick an Interface Step 2: Configure IP ACLs at the Interface Step 3: Define Inspection Rules
80
Two-Interface
Three-Interface
81
82
83
84
85
*note: Alerts are enabled by default and automatically display on the console line of the router. If alerts have been disabled using the ip inspect alert-off command, the no form of that command, as seen above, is required to re-enable alerts.
86
87
88
Operation
Implementing with CLI Manually Implementing with SDM Implementing with SDM Wizard Verification and Troubleshooting
89
90
Topology Example
If an additional interface is added to the private zone, the hosts connected to the new interface in the private zone can pass traffic to all hosts on the existing interface in the same zone. Additionally, hosts connected to the new interface in the private zone must adhere to all existing private policies related to that zone when passing traffic to other zones.
2009 Cisco Learning Institute.
91
Benefits
Two Zones
Zone-based policy firewall is not dependent on ACLs The router security posture is now block unless explicitly allowed C3PL makes policies easy to read and troubleshoot One policy affects any given traffic, instead of needing multiple ACLs and inspection actions.
92
93
Common Designs
LAN-to-Internet Public Servers
Redundant Firewalls
Complex Firewall
94
95
96
Actions
97
No impact of zoning/policy No policy lookup (PASS) DROP DROP DROP DROP policy actions
98
RESULT
99
4. Apply firewall policies to pairs of source and destination zones with zone-pair security
5. Assign router interfaces to zones using the zone-member security interface command
2009 Cisco Learning Institute.
100
FW(config)# zone security Inside FW(config-sec-zone)# description Inside network FW(config)# zone security Outside FW(config-sec-zone)# description Outside network
101
FW(config)# class-map type inspect FOREXAMPLE FW(config-cmap)# match access-group 101 FW(config-cmap)# match protocol tcp FW(config-cmap)# match protocol udp FW(config-cmap)# match protocol icmp FW(config-cmap)# exit FW(config)# access-list 101 permit ip 10.0.0.0 0.0.0.255 any
2009 Cisco Learning Institute.
102
FW(config)# policy-map type inspect InsideToOutside FW(config-pmap)# class type inspect FOREXAMPLE FW(config-pmap-c)# inspect
103
Step 4: Assign Policy Maps to Zone Pairs and Assign Router Interfaces to Zones
FW(config)# zone-pair security InsideToOutside source Inside destination Outside FW(config-sec-zone-pair)# description Internet Access FW(config-sec-zone-pair)# service-policy type inspect InsideToOutside FW(config-sec-zone-pair)# interface F0/0 FW(config-if)# zone-member security Inside FW(config-if)# interface S0/0/0.100 point-to-point FW(config-if)# zone-member security Outside
104
105
106
Define Zones
1. Choose Configure > Additional Tasks > Zones
2. Click Add
5. Click OK to create the zone and click OK at the Commands Delivery Status window
2009 Cisco Learning Institute.
107
2. Review, create, and edit class maps. To edit a class map, choose the class map from the list and click Edit
2009 Cisco Learning Institute.
108
2. Click Add
3. Enter a policy name and description 4. Click Add to add a new class map 6. Choose Pass, Drop, or Inspect 5. Enter the name of the class map to apply. Click the down arrow for a pop-up menu, if name unknown
7. Click OK
8. To add another class map, click Add, to modify/delete the actions of a class map, choose the class map and click Edit/Delete 9. Click OK. At the Command Delivery Status window, click OK
2009 Cisco Learning Institute.
109
3. Enter a name for the zone pair. Choose a source zone, a destination zone and a policy
110
111
2. Click the Basic Firewall option and click Launch the Selected Task button
112
Configuring a Firewall
1. Check the outside (untrusted) check box and the inside (trusted) check box to identify each interface
2. (Optional) Check box if the intent is to allow users outside of the firewall to be able to access the router using SDM. After clicking Next, a screen displays that allows the admin to specify a host IP address or network address 3. Click Next. If the Allow Secure SDM Access check box is checked, the Configuring Firewall for Remote Access window appears 4. From the Configuring Firewall choose Network address, Host Ip address or any from the Type drop-down list
2009 Cisco Learning Institute.
113
2. Click the Preview Commands Button to view the IOS commands 1. Select the security level
114
Click Finish
115
116
Reviewing Policy
1. Choose Configure > Firewall and ACL
117
118
2. Choose one of the following options: Real-time data every 10 sec 60 minutes of data polled every 1 minute 12 hours of data polled every 12 minutes
119
120
121