Deploying Zone-Based Firewalls

Size: px
Start display at page:

Download "Deploying Zone-Based Firewalls"

Transcription

1 Chapter One...3 Introduction to Zone-Based Firewalls Chapter Two...12 Typical Zone-Based Firewall Designs Chapter Three...26 Configuring Zone-Based Policy Firewalls in Cisco IOS Deploying Zone-Based Firewalls Ivan Pepelnjak Chapter Four...54 Case Study: Firewall with a Perimeter Network Chapter Five...66 Advanced Zone-Based Policy Firewall Configuration Chapter Six...94 Configuring Transparent Firewalls ciscopress.com

2 [ 2 ] CHAPTER 1 Introduction About the Author Ivan Pepelnjak, CCIE No. 1354, has more than 15 years of experience in designing, installing, troubleshooting, and operating large service provider and enterprise IP-based networks and security solutions. He is currently chief technologies advisor at NIL Data Communications, where he designed NIL s Service Provider Academy program. He was one of the architects of the Cisco Systems Service Provider curriculum. He also was the lead developer of several service provider focused courses covering Multiprotocol Label Switching (MPLS), Border Gateway Protocol (BGP), and IP quality of service. Ivan has written four books for Cisco Press, covering Enhanced Interior Gateway Routing Protocol (EIGRP), MPLS, and virtual private networking (VPN) technologies. About the Technical Editor Randy Ivener, CCIE No , is a security specialist with the Cisco Systems Applied Security Intelligence team. He is a CISSP and ASQ CSQE. Randy has spent many years as a network security consultant helping companies understand and secure their networks. Before becoming immersed in information security, he spent time in software development and as a training instructor. Randy graduated from the U.S. Naval Academy and holds a master s degree in business administration.

3 CHAPTER 1 Introduction to Zone-Based Firewalls NOTE If you are not familiar with packet filters offered by the Cisco IOS, refer to the Cisco IOS Access Lists book available through Safari Books Online or to the relevant Cisco IOS documentation. CHAPTER ONE Introduction to Zone- Based Firewalls In the mid-1990s, when the large corporate networks began to be connected to less-secure public networks (for example, the early Internet), security-conscious network administrators immediately started to feel the need to secure their internal networks from potential intruders. Networking vendors immediately responded with various filtering mechanisms, most commonly implemented as packet filters (filters that could accept or deny incoming or outgoing packets based on their addresses, transport protocol, or port numbers). The initial implementations of what we call firewalls today were thus more or less a patchwork of packet filters. It soon became obvious, however, that to implement reliable security solutions, one needs a more structured and better documented approach, resulting in the early concepts of firewalls, best documented in the legendary book Firewalls and Internet Security by Cheswick and Bellovin. Initial firewall designs were still based on packet filters, but with the increasing complexity of Internet protocols and resulting firewall policies, the concept of zone-based firewall design emerged. [ 3 ] Simple Zone- Based Design...4 More Complex Zone-Based Design...5 Implementing Zone-Based Designs...7

4 [ 4 ] CHAPTER 1 Introduction to Zone-Based Firewalls Designing zone-based firewalls is a simple process using the following four steps: NOTE Within the context of this discussion, server is any host that accepts incoming connections, regardless of its actual hardware or software implementation. Step 1. Step 2. Step 3. Step 4. Internetworking infrastructure under consideration is split into well-documented separate zones with various security levels. In this step, do not consider physical implementation of the firewall (number of devices, defense depth, redundancy, and so on), just the separation of your infrastructure into zones (obviously, the public network to which your network is connected is one of them). For each pair of source-destination zones (for example, from inside network to Internet), the sessions (most commonly, TCP and UDP sessions, but also ICMP sessions such as ICMP echo) that clients in source zones are allowed to open to servers in destination zones are defined. For traffic that is not based on the concept of sessions (for example, Encapsulating Security Payload [ESP] of IPSec), define unidirectional traffic flows from source to destination and vice versa. As in the preceding step, do not contemplate the physical setup, just the traffic requirements between zones. After the zones have been identified and the traffic requirements between them documented, design your physical infrastructure, taking into account the security (dictating the number of devices between most-secure and least-secure zones) and availability requirements (for example, redundant devices). For each firewall device in the design, identify zone subsets connected to its interfaces and (multiple zones might be indirectly attached to a single interface of a firewall) merge the traffic requirements for those zones, resulting in a device-specific interzone policy. (See the section More Complex Zone-Based Design on the next page for more in-depth explanation of this rule.) Simple Zone-Based Design Consider, for example, a simple local area network (LAN) connected to the public Internet through the firewall, as shown in Figure 1-1. Clearly, there are two zones in this example: Inside network, which is trusted and should be protected Outside (including Internet), which is not trusted

5 CHAPTER 1 Introduction to Zone-Based Firewalls FIGURE 1-1 Simple firewall setup Outside [ 5 ] Internet Inside The firewall policy in this design is also simple: Clients in the internal network can open sessions to any server in the Internet. No inbound sessions are allowed from the Internet to the internal network. Assuming that the network under consideration does not have high resilience or availability requirements, a simple design with a single firewall device between the inside and outside network is sufficient. NOTE The actual interzone firewall policies for this design are described in the next chapter. More Complex Zone-Based Design A more complex set of requirements would come from a medium-sized organization with its own publicly accessible servers (for example, web server and server). Such a firewall would have three zones: Internal network Perimeter network with web and mail server Public internet

6 [ 6 ] CHAPTER 1 Introduction to Zone-Based Firewalls If the customer would request a firewall design with at least two devices between the most protected (internal) network and the public Internet, your best option would be the traditional firewall design shown in Figure 1-2. FIGURE 1-2 Traditional firewall design Web/Mail Server Public NOTE Having a design with two independent devices is more secure than using a single firewall device. If the outside firewall in Figure 1-2 is misconfigured or fails, the inside firewall still protects the internal network. Internal Inner Router Perimeter Outer Router Internet When implementing this design on actual devices, the firewall policy of each device would be based on a merge of several interzone firewall policies. For example, the inner router does not differentiate between sessions originating in the internal zone and terminating in either the perimeter or public zone. Table 1-1 documents the firewall policy that needs to be implemented on the inner router. TABLE 1-1 Firewall Policy of the Inner Router Client Zone (Hosts Server Zone (Hosts Originating the Terminating the Connections) Connections) Sessions Allowed Inside Outside Traffic from internal zone to perimeter and public zones Outside Inside Traffic from public and perimeter zones to internal zone

7 [ 7 ] CHAPTER 1 Introduction to Zone-Based Firewalls Implementing Zone-Based Designs As mentioned at the beginning of this chapter, many devices used in firewall implementations are using a concept of packet filters to filter traffic arriving or departing through an interface. For example, Cisco IOS implements packet filters with the ip access-list and ip access-group configuration commands that enable you to specify filtering conditions based on source and destination IP addresses, Layer 4 protocol (for example, TCP, UDP, or ICMP), and Layer 4 port numbers (for example, TCP port 80 for HTTP). However, implementing even a straightforward firewall policy (like the one described in the Simple Zone-Based Design section) with Cisco IOS access lists can lead to a configuration nightmare. A typical TCP session established from an inside client to an outside server is set up as follows (as illustrated in Figure 1-3): 1. The client picks a random TCP port number (usually greater than 1024) as the source TCP port number. 2. The initial packet (TCP SYN packet) is sent from that port number to the well-known destination port (for example, port 80 for HTTP requests). 3. Return traffic from the server to the client is addressed to the high-numbered TCP port that the client picked. FIGURE 1-3 TCP session establishment across a packet-filtering device From port 1030 to port 80 Internet Outside Inside From port 80 to port 1030? To allow the return traffic, the packet filters on early firewalls thus had to permit traffic from anywhere on the Internet to any high-numbered port in the internal network, resulting in an access list similar to the one in Listing 1-1. (The access list also includes an antispoofing filter and allows incoming ICMP messages needed for normal network operation and functions such as MTU path discovery.)

8 CHAPTER 1 Introduction to Zone-Based Firewalls LISTING 1-1 Sample IP Packet Filter in an Early Cisco IOS Release interface Serial0/0/0.100 point-to-point description Link to the Internet ip access-group frominternet in ip access-list extended frominternet prevent spoofing deny ip any allow minimum subset of ICMP messages permit icmp any any echo permit icmp any any echo-reply permit icmp any any time-exceeded permit icmp any any packet-too-big permit icmp any any unreachable allow traffic to high-numbered ports permit tcp any gt 1023 permit udp any gt 1023 [ 8 ] NOTE Cisco PIX, the Cisco standalone firewall appliance, was designed around the concept of conduits (old PIX terminology for traffic flows), which has from the beginning included the proper handling of return traffic. NOTE Later Cisco IOS releases added the established keyword, which matched return traffic in TCP sessions, making recognition of TCP sessions much easier (but still leaving some gaps that hackers successfully exploited with skillfully crafted IP fragments). No such mechanism is possible for UDP traffic, so UDP is usually not permitted to freely flow between internal and external networks. Permitting the inbound traffic to high-numbered ports would not represent a major security risk if some IP-based services would not listen on high-numbered ports (some of them static, some of them assigned on demand), as demonstrated by Listing 1-2, taken on a personal computer running Windows XP. If you use packet filters as previously proposed, all the highlighted services are vulnerable to an attack from the Internet.

9 CHAPTER 1 Introduction to Zone-Based Firewalls LISTING 1-2 TCP and UDP Ports Opened on a Typical IP Host Running Windows XP M:\>netstat -an Active Connections Proto Local Address Foreign Address State TCP : :0 LISTENING TCP : :0 LISTENING TCP : :0 LISTENING TCP : :0 LISTENING TCP : :0 LISTENING TCP : :0 LISTENING TCP : :0 LISTENING TCP : :0 LISTENING TCP : :0 LISTENING TCP : :0 LISTENING TCP : :0 LISTENING UDP :445 *:* UDP :500 *:* UDP :1025 *:* UDP :1026 *:* UDP :1515 *:* UDP :3456 *:* UDP :4500 *:* UDP :123 *:* UDP :1027 *:* UDP :1051 *:* UDP :1540 *:* UDP :1900 *:* UDP :62514 *:* UDP :123 *:* UDP :137 *:* UDP :138 *:* UDP :1900 *:* [ 9 ]

10 [ 10 ] CHAPTER 1 Introduction to Zone-Based Firewalls Even if the challenges of return TCP traffic are solved with smarter packet filters and the return UDP traffic is addressed with stricter filtering rules (for example, allowing only UDP on port 53 between internal and external Domain Name System [DNS] servers), another inherent problem remains: Some protocols use separate control sessions (on well-known ports) and data sessions (on randomly assigned high-numbered ports). Most commonly used protocols exhibiting this problem include File Transfer Protocol (FTP) and Voice over IP (VoIP, H.323 suite of protocols). In Cisco IOS Release 11.2P (integrated into mainstream Release 11.3) Cisco has addressed the shortcomings of packet filters implemented in Cisco IOS with Context-Based Access Control (CBAC, later renamed IOS Firewall Stateful Inspection). This is a mechanism by which a router tracks session establishment of packet flows being routed through it and adjusts the access lists in the return direction to anticipate the arrival of return packets. CBAC also implements Layer 7 packet inspection, which properly handles protocols such as FTP and H.323, resulting in a perfect firewall solution for supported protocols. NOTE CBAC support for ICMP was added in 12.2(15)T and integrated in Cisco IOS Release router-traffic is a new keyword added in Cisco IOS Release 12.3(14)T and integrated in release To deploy CBAC in the simple LAN-to-WAN (wide area network) firewall solution shown in Figure 1-1, you just replace the inbound access-list with a placeholder access-list denying all traffic and enable CBAC on the outside interface using the ip inspect command. This results in the router configuration shown in Listing 1-3. LISTING 1-3 Typical Router Configuration Using CBAC ip inspect name Internet tcp audit-trail on router-traffic ip inspect name Internet udp audit-trail on router-traffic ip inspect name Internet icmp audit-trail on router-traffic interface Serial0/0/0.100 point-to-point description Link to the Internet ip access-group frominternet in ip inspect Internet out ip access-list extended frominternet deny ip any

11 [ 11 ] CHAPTER 1 Introduction to Zone-Based Firewalls After this configuration change, every session opened from an inside host to an outside server would also create a dynamic entry (pinhole) at the bottom of the outside access list. Because the CBAC also handles outbound ICMP traffic (pings and traceroutes) and ICMP responses associated with TCP or UDP sessions traversing the router, the frominternet access list has been significantly reduced and now includes only a generic filter preventing address spoofing. The audit-trail option of the ip inspect command also generates the trail of TCP or UDP sessions in the router s log, as illustrated in Listing 1-4. LISTING 1-4 Audit Trail Generated by the Router 04:27:19: %FW-6-SESS_AUDIT_TRAIL_START: Start tcp session: initiator ( :1064) -- responder ( :80) 04:27:21: %FW-6-SESS_AUDIT_TRAIL_START: Start tcp session: initiator ( :1065) -- responder ( :80) 04:27:26: %FW-6-SESS_AUDIT_TRAIL: Stop tcp session: initiator ( :1064) sent 307 bytes -- responder ( :80) sent 2850 bytes 04:27:27: %FW-6-SESS_AUDIT_TRAIL: Stop tcp session: initiator ( :1065) sent 345 bytes -- responder ( :80) sent 771 bytes The introduction of CBAC has successfully addressed the shortcomings of packet filters, but it did not help improve the scalability of firewall implementations the packet filters still have to be configured to operate between interfaces. In scenarios with multiple zones connected to a single networking device, this results in a serious drawback: Each packet filter has to contain a mixture of multiple firewall policies. (For example, if three zones are attached to a router, a packet filter applied on any interface has to filter traffic being sent into or received from two other zones.) Zone-based policy firewall, a new configuration feature introduced in Cisco IOS Release 12.4(6)T, solves this problem, too, finally allowing the implementation team to follow the zone-based design and specify the traffic permitted between zones. Summary In the next chapter, we focus first on typical firewall design scenarios, ranging from a simple small office/home office (SOHO) LAN to a complex corporate firewall. In the subsequent chapters, a number of case studies show how you can use the zone-based policy firewall feature to implement these designs on Cisco IOS-based networking devices.

12 CHAPTER 2 Typical Zone- Based Firewall Designs NOTE Network designers who are already familiar with the zone-based firewall design principles can skip this chapter and continue to the implementation section. All other readers are highly advised to read it, because a well-thoughtout and well-documented design almost always results in superior implementation. CHAPTER TWO Typical Zone-Based Firewall Designs In the preceding chapter, you saw how the philosophy of firewall design has evolved from packet-filter-oriented designs toward zonebased designs. In this chapter, we discuss several well-known firewall designs and describe the filtering policies used in them. These designs then serve as the blueprints for the following implementation chapters, in which you ll see how you can translate a zone-based design directly into Cisco IOS configuration commands. Simple LAN-to-Internet Firewall The simplest possible design is a protected LAN connected to the public IP network (for example, the Internet) through a firewall. No publicly accessible servers reside in the protected LAN (which means, for example, that the users connected to the LAN have to download their s from somewhere else for example, from their Yahoo or Hotmail accounts). Figure 2-1 shows a simple firewall design. [ 12 ] Simple LAN-to- Internet Firewall...12 Firewall with Public Servers...15 Redundant Firewall Designs...20 Complex Firewall Designs...20 Reducing the Complexity of Advanced Firewalls...23

13 [ 13 ] CHAPTER 2 Typical Zone- Based Firewall Designs FIGURE 2-1 Simple LAN-to- Internet firewall Inside Outside Internet Two firewall policies are commonly used in such setups: NOTE All the firewall policy tables in this book assume a stateful firewall implementation, so there are no special entries for the return packets. Permissive policy (documented in Table 2-1), where the internal users can access any service on the Internet Restrictive policy (documented in Table 2-2), where the internal users can access only a restricted set of services (for example, web and mail services) TABLE 2-1 Permissive Firewall Policy Client Zone Server Zone Sessions Allowed Inside Outside All Outside Inside None When establishing a restrictive inside-to-outside policy, consider the following caveats: Internet Control Message Protocol (ICMP) echo has to be enabled to allow the internal users to use ping for connectivity troubleshooting.

14 CHAPTER 2 Typical Zone- Based Firewall Designs Domain Name Service (DNS) on UDP port 53 has to be enabled; otherwise, the internal clients will not be able to resolve the hostnames into IP addresses. NOTE Most versions of Windows use ICMP to trace the path to the destination host. UDP packets as the trace packets are used by some UNIX environments (for example, Linux) as well as Cisco IOS. NOTE TCP ports needed for FTP data sessions are identified automatically by the stateful firewall implementations. If you re not using a stateful firewall, you need to allow TCP port 20, too, and advise the clients to use passive FTP. In some environments, additional UDP traffic has to be allowed to support the traceroute program. Post Office Protocol version 3 (POP3) or Internet Message Access Protocol (IMAP) as well as Simple Mail Transfer Protocol (SMTP) to some external server (for example, the Internet service provider s servers) have to be enabled to allow users to receive and send . Web servers sometimes use nonstandard port numbers. If your users want to access those servers, you must enable access to specific ports on specific IP addresses. TABLE 2-2 Restrictive Firewall Policy Client Zone Server Zone Sessions Allowed Inside Outside DNS (UDP port 53) to ISP s name servers ICMP echo HTTP (TCP port 80) to everywhere HTTPS (TCP port 443) to everywhere FTP (TCP port 21) to everywhere POP3 (TCP port 110) to ISP s servers SMTP (TCP port 25) to ISP s servers Outside Inside None The simple LAN-to-Internet firewall design successfully addresses the needs of small home offices and small companies (SOHO environment) that do not own or web servers. If customers want to run their own publicly accessible servers, however, the firewall policies have to be changed to allow incoming sessions (for example, incoming SMTP and HTTP sessions). Because of the many times hackers have successfully exploited publicly accessible servers to penetrate private networks, it s almost a necessity to put such servers into a separate zone, as described in the next section. [ 14 ]

15 [ 15 ] CHAPTER 2 Typical Zone- Based Firewall Designs Firewall with Public Servers There are two common ways of designing a firewall with a perimeter network (also known as demilitarized zone [DMZ]) containing public servers: A simple setup in which all three zones are connected to the same networking device, as shown in Figure 2-2. A more complex setup with two firewalls and a transit perimeter network, as shown in Figure 2-3. This setup is slightly more secure because the two networking devices are configured independently, thus reducing the risk of a fatal configuration error (defense-in-depth principle). FIGURE 2-2 Simple firewall with a perimeter network Inside Outside Internet Web/Mail Server Perimeter

16 [ 16 ] CHAPTER 2 Typical Zone- Based Firewall Designs FIGURE 2-3 Transit perimeter network Inside Perimeter Web/Mail Server Outside Internet As in the preceding section, a firewall with a perimeter network can implement a permissive firewall policy, where the internal users can access any service on the public network, or a more restrictive one, as documented in Table 2-3. NOTE Please refer to Bind 9 documentation for an in-depth explanation of name server nomenclature. When designing a restrictive firewall policy, you must consider the implementation details of the DNS and services. DNS service can be implemented in the following ways: The customer does not run a DNS server. In this case, DNS requests from inside to an outside (ISP-owned) DNS server must be permitted. The customer runs a caching DNS server in the perimeter network but does not control its own domain. In this case, DNS requests flow from inside to the perimeter and from the perimeter to outside. The customer runs an authoritative DNS server for its domain in the perimeter network. This server usually acts as a caching DNS server for the inside clients. In this setup, the DNS requests to the perimeter DNS server arrive from inside and outside zones, and the perimeter DNS server (when acting on behalf of the inside clients) sends DNS requests to the outside. Table 2-3 describes this scenario. The customer runs a caching name server on the inside network and an authoritative name server on the perimeter network. DNS requests thus flow from the inside server to the outside. There is also a bidirectional flow of requests between the perimeter server and the outside.

17 [ 17 ] CHAPTER 2 Typical Zone- Based Firewall Designs service can also be implemented in several ways: Most commonly (also assumed in Table 2-3), the customer runs an internal server that uses SMTP to communicate with the outside world. In this case, bidirectional SMTP is required between the inside server and the perimeter server and between the perimeter server and any host on the outside, assuming the perimeter server is using DNS Mail Exchange (MX) records to deliver outbound mail. The customer could also decide to store all external on the perimeter server. In this scenario, bidirectional SMTP is needed between the perimeter server and outside servers. Inside clients use SMTP to send mail to the perimeter server and POP3 or IMAP to retrieve it from the perimeter server. TABLE 2-3 Restrictive Policy of a Firewall with a Perimeter Network Client Zone Server Zone Sessions Allowed Inside Outside ICMP echo, HTTP, HTTPS (Optionally) FTP Outside Inside None Inside Perimeter HTTP (to access own public web server) SMTP from inside mail server to perimeter server DNS ICMP echo FTP and SSH for server management Perimeter Inside SMTP to inside mail server (to deliver inbound ) Perimeter Outside DNS SMTP (to deliver outbound ) Outside Perimeter DNS (as the customer runs the authoritative name server for its domain) HTTP to public web server SMTP to public mail server (Optional) FTP to public FTP server (Many sites are replacing FTP with HTTP because its single-session design does not cause any firewall issues.)

18 [ 18 ] CHAPTER 2 Typical Zone- Based Firewall Designs The firewall policy just documented is extremely restrictive, allowing only the minimum number of services needed. This results in a secure network (for example, if the perimeter server is compromised, it cannot be used to launch attacks on other networks), but it could also lead to reduced robustness of the network. (For example, if the perimeter server is compromised, the inside clients cannot access the Internet because the DNS services are no longer accessible.) Some large organizations opt for an even more restraining policy with proxy servers in the perimeter network, thus eliminating any direct traffic between the internal network and the public Internet, as illustrated in Table 2-4. NOTE DNS service between the inside and the perimeter zones is no longer needed when using HTTP proxy, because the external hostnames are passed as strings in HTTP requests to the proxy server. TABLE 2-4 Policy of a Firewall with Proxy Servers in the Perimeter Network Client Zone Server Zone Sessions Allowed Inside Outside None Outside Inside None Inside Perimeter HTTP, HTTPS (to access proxy web server) ICMP echo SMTP from inside mail server to perimeter mail server FTP and SSH for server management Perimeter Inside SMTP to internal server (to deliver inbound ) Perimeter Outside DNS SMTP from perimeter mail server (to deliver outbound ) HTTP, HTTPS (proxy access to the web) (Optional) FTP ICMP echo Outside Perimeter DNS (only if the customer runs its own name server) HTTP to public web server SMTP to public mail server (Optional) FTP; see also comments in Table 2-3 The transition from the single-device design (Figure 2-2) to the design with a transit perimeter network (Figure 2-3) illustrates one of the advantages of a well-documented zone-based design: Because all the firewall policies have already been documented, they don t have to be designed from scratch. You merely split the overall firewall policy into two parts: the

19 [ 19 ] CHAPTER 2 Typical Zone- Based Firewall Designs inner firewall handles policies from inside to everywhere else, and the outer firewall handles policies from outside to everywhere else. In fact, two zones are merged into one on each of the devices (perimeter and outside zones are merged into the perimeter zone on the inner firewall, and perimeter and inside zones are merged into the perimeter zone on the outer firewall), resulting in policies shown in Table 2-5 and Table 2-6 (assuming a transit perimeter network with proxy servers). The merge is extremely simple because the previous firewall policy did not allow any direct traffic between the inside and outside zones. TABLE 2-5 Policy of the Inner Firewall Client Zone Server Zone Sessions Allowed Inside Perimeter HTTP, HTTPS (to access proxy web server) ICMP echo SMTP (to send mail) FTP and SSH for server management. Perimeter Inside SMTP to inside mail server (to deliver inbound ) TABLE 2-6 Policy of the Outer Firewall Client Zone Server Zone Sessions Allowed Perimeter Outside DNS SMTP from perimeter mail server (to deliver outbound ) HTTP, HTTPS (proxy access to the web) (Optional) FTP ICMP echo Outside Perimeter DNS (only if the customer runs its own name server) HTTP to public web server SMTP to public mail server (Optional) FTP

20 [ 20 ] CHAPTER 2 Typical Zone- Based Firewall Designs Redundant Firewall Designs As we move from simple SOHO designs to more-complex corporate designs, robustness and availability become more and more important. To reach high availability, network designers usually deploy redundant setups in which each critical device is duplicated, resulting in a design similar to the one shown in Figure 2-4. FIGURE 2-4 Redundant firewall design Inside Perimeter Web/Mail Server Outside Internet This scenario does not change the firewall policies. All the rules outlined in the preceding section are still valid (yet another benefit of a good design independent of the physical implementation). Complex Firewall Designs Firewalls deployed by large organizations usually contain several zones in addition to the ones discussed in the previous sections. Typical large-scale firewalls include zones to support the following: Network administrators Clients in this zone would have privileged access to servers in the perimeter network. For example, they could open Secure Shell (SSH) sessions to them to change their configuration and perform other maintenance duties.

21 CHAPTER 2 Typical Zone- Based Firewall Designs Remote IPsec users Individual users accessing the corporate network with IPsec-encrypted sessions over the public Internet would be in this zone. These users have limited access to the resources in the internal network; their access to the perimeter network is usually equal to access granted to the regular internal users. Remote offices This zone is similar to individual users using IPsec to access the internal network. However, because the remote offices are usually under stricter physical control (so that the risk of an intruder gaining access through a remote office is lower), users in the remote offices would have access to more internal resources than the individual users. E-commerce perimeter network Publicly accessible e-commerce servers usually execute transactions on internal database servers. They are therefore best separated from other public servers; otherwise, an intruder gaining access to any public server could penetrate the internal database. Not surprisingly, the firewall policy for such a firewall is substantial, as shown in Table 2-7. [ 21 ] NOTE This design uses a restrictive policy for inside clients with no HTTP proxy. For a lessrestrictive policy or a policy with HTTP proxies, replace individual items in Table 2-7 with entries from the previous sections. The design also assumes that the organization does not offer public FTP service. TABLE 2-7 Firewall Policy of a Complex Firewall Client Zone Server Zone Sessions Allowed Inside Perimeter ICMP echo VPN users HTTP to web servers VPN offices SMTP to mail servers DNS to name servers Inside E-commerce ICMP echo VPN users HTTPS to e-commerce servers VPN offices Inside Outside ICMP echo, HTTP, HTTPS, FTP VPN users VPN offices continues

22 [ 22 ] CHAPTER 2 Typical Zone- Based Firewall Designs TABLE 2-7 Firewall Policy of a Complex Firewall continued NOTE Missing zone pairs in the table indicate that no traffic is allowed between those zones. For example, the e-commerce servers cannot initiate sessions to the outside zone, further limiting complex exploits. Client Zone Server Zone Sessions Allowed Administrators Perimeter HTTP to web servers SMTP to mail servers DNS to name servers SSH to all servers FTP to all servers SNMP to all servers Administrators E-commerce HTTPS, SSH, FTP, and SNMP to all servers Administrators Outside All services granted to inside users Additional services if needed Administrators VPN users All (to support remote users) Administrators VPN offices All (to support remote offices) Perimeter Inside SMTP to internal server Minimum set of ICMP traffic Perimeter Outside DNS SMTP E-commerce Inside SQL transactions VPN users Inside Access to a subset of internal servers RADIUS from VPN concentrator to authentication server Outside VPN users IPsec traffic (ISAKMP + ESP) VPN offices Inside Access to a less-restricted set of internal servers RADIUS from VPN concentrator to authentication server Outside VPN offices IPsec traffic (ISAKMP + ESP)

23 [ 23 ] CHAPTER 2 Typical Zone- Based Firewall Designs FIGURE 2-5 Complex firewall design Such a complex firewall is almost always implemented with multiple devices to improve its resiliency and reduce the complexity of each individual device s configuration. Assuming a two-device nonredundant setup, you could end up with a design similar to the one in Figure 2-5. E-commerce Administrators Web/Mail Server Outside Internet Inside Perimeter VPN Users VPN Offices Reducing the Complexity of Advanced Firewalls As you saw in the preceding section, firewalls of larger organizations tend to become rather complex. Developing a good overall firewall policy in such cases can be a complicated, tedious, and error-prone task. It s therefore best to approach the complex firewalls with the millennia-old divide-and-conquer principle. In the example from the preceding section, you could split the problem into three independent smaller firewalls, as shown in Figure 2-6.

24 CHAPTER 2 Typical Zone- Based Firewall Designs FIGURE 2-6 Decomposed complex firewall E-commerce E-commerce Firewall Perimeter Outside [ 24 ] Perimeter Firewall Internet VPN Users VPN Inside Firewall and Administrators VPN Offices Encrypted NOTE The firewall design is further simplified by the intended traffic flow: Traffic from VPN users first enters the inside network and is then additionally screened by the perimeter firewall. The firewall policy of each individual smaller firewall is significantly less complex than the overall policy because it contains fewer security zones. Furthermore, the designer can now implement different physical setups for each firewall based on its resiliency and availability requirements. For example, under budget restrictions, the e-commerce firewall could be implemented as a redundant transit perimeter firewall design (see the section Redundant Firewall Designs and Figure 2-4 earlier in this chapter), the perimeter firewall could use the nonredundant setup (see the Firewall with Public Servers section), and the VPN firewall could be based on a simple LAN-to-Internet firewall design.

25 [ 25 ] CHAPTER 2 Typical Zone- Based Firewall Designs Summary In this chapter, you have seen how you can use zone-based firewall design principles to design a variety of firewall solutions, ranging from simple firewalls suitable to SOHO environments to complex redundant solutions deployed by large organizations. In the next chapters, you ll find out how you can use the zone-based policy firewall configuration feature of Cisco IOS to translate these designs into actual router configuration commands.

26 CHAPTER 3 Configuring Zone-Based Policy Firewalls in Cisco IOS FIGURE 3-1 Sample firewall with addressing CHAPTER THREE Configuring Zone-Based Policy Firewalls in Cisco IOS In the previous chapters, you ve seen how you can design your firewall using the zone-based design concepts. In this chapter, you ll find the Cisco IOS configuration commands that enable you to translate the firewall policy into a working router configuration. Throughout this chapter, we focus on the simple LAN-to-Internet firewall design described in the preceding chapter. Figure 3-1 outlines the addressing scheme used in the examples dns.isp.com smtp.isp.com [ 26 ] Initial Zone-Based Policy Firewall Configuration...30 Limiting Inside-to- Outside Traffic...37 Protecting the Router...43 Monitoring and Debugging Zone-Based Policy Firewall Configuration / / Internet Inside Outside

27 [ 27 ] CHAPTER 3 Configuring Zone-Based Policy Firewalls in Cisco IOS As you can see in the diagram, the inside LAN is using the private address space /24 that is translated using the Network Address Translation (NAT) functionality of Cisco IOS into the provider-allocated public address space /28. Because the public address space covers the needs of the inside clients, NAT overload is not used. The ISP provides mail (SMTP and POP3) services on smtp.isp.com and DNS and Web services on dns.isp.com. The client computers will also access a third-party Web server at Listing 3-1 shows the initial router configuration with basic IP addressing and NAT. NOTE The configuration in Listing 3-1 is slightly abridged. (For example, vty and console configuration has been removed.) It has also not been properly secured. (For example, Finger and HTTP are enabled, and Telnet is used rather than SSH.) LISTING 3-1 Initial Router Configuration hostname fw service finger ip dhcp pool LAN network interface Loopback1 ip address interface FastEthernet0/0 ip address ip nat inside interface Serial0/0/0 no ip address encapsulation frame-relay interface Serial0/0/0.100 point-to-point continues

28 [ 28 ] CHAPTER 3 Configuring Zone-Based Policy Firewalls in Cisco IOS NOTE nmap, a public-domain program available from is used to perform the port scans. Printouts are abridged for clarity. Do not perform port scans on external IP hosts without the owner s permission. LISTING 3-1 Initial Router Configuration continued description Link to the Internet ip address ip nat outside frame-relay interface-dlci 100 ip route Serial0/0/0.100 ip http server no ip http secure-server ip nat pool Internet prefix-length 28 ip nat source list InternalHosts pool Internet ip nat inside source list InternalHosts pool Internet ip access-list standard InternalHosts permit end The configuration seems pretty secure by itself, because NAT should be able to hide inside hosts from potential intruders. An initial port scan done from the outside (results are shown in Listing 3-2) seems to confirm this assumption, because the potential intruder can reach only one IP host (the router itself).

29 CHAPTER 3 Configuring Zone-Based Policy Firewalls in Cisco IOS LISTING 3-2 External Port Scan with No Active Host External$ nmap --system-dns /28 (The 1671 ports scanned but not shown below are in state: closed) PORT STATE SERVICE 23/tcp open telnet 79/tcp open finger 80/tcp open http [ 29 ] Nmap finished: 16 IP addresses (1 host up) scanned in seconds However, after an inside client establishes any session across the firewall router, its IP address becomes available to the outside world. Because the router offers no additional protection beyond address translation, the intruders have free access to the inside hosts, as documented in Listing 3-3. (Focus on the highlighted lines; the others are the publicly accessible router services.) LISTING 3-3 External Port Scan with Active NAT Translations External$ nmap --system-dns /28 Interesting ports on : (The 1671 ports scanned but not shown below are in state: closed) PORT STATE SERVICE 23/tcp open telnet 79/tcp open finger 80/tcp open http Interesting ports on : (The 1668 ports scanned but not shown below are in state: closed) PORT STATE SERVICE 135/tcp open msrpc continues

30 [ 30 ] CHAPTER 3 Configuring Zone-Based Policy Firewalls in Cisco IOS LISTING 3-3 External Port Scan with Active NAT Translations continued 139/tcp open netbios-ssn 445/tcp open microsoft-ds 3389/tcp open ms-term-serv 5800/tcp open vnc-http 5900/tcp open vnc Nmap finished: 16 IP addresses (2 hosts up) scanned in seconds Obviously, additional protection is needed to change the initial setup into a real firewall. Initial Zone-Based Policy Firewall Configuration The zone-based policy firewall in Cisco IOS is configured in a modular fashion through these steps: NOTE Class map definitions are mandatory unless you want to rely on the system-defined classdefault class, which matches all traffic. Step 1. Step 2. Step 3. Step 4. Step 5. Use the new zone security command to define the zones in your firewall. (Optional) Use the class-map type inspect global configuration commands to define the traffic classes based on specifications from the firewall design. A traffic class is a way of identifying a set of packets based on their content (for example, common application layer protocol). Use the policy-map type inspect global configuration command to specify the firewall policy (what happens to each interesting traffic class defined previously with class-map type inspect commands). Use the zone-pair security command to apply a predefined firewall policy to a pair of source (client) and destination (server) zones. After the firewall policy is configured, assign the router interfaces to various security zones by using the zone-member security interface configuration command.

31 [ 31 ] CHAPTER 3 Configuring Zone-Based Policy Firewalls in Cisco IOS IMPORTANT Only policy maps with type inspect can be used in the zone-pair security command. Only class maps with type inspect can be used in policy maps with type inspect. There can be no name overlap with other types of class maps or policy maps. You cannot have a quality-of-service class map (with no type keyword) and an inspect class map with the same name. A zone must be configured with the zone security global command before it can be used in the zone-member security interface configuration command. An interface cannot belong to multiple zones. To create a union of security zones, specify a new zone and appropriate policy map and zone pairs. The zone-based policy firewall feature is a replacement for the Cisco IOS Firewall Stateful Inspection (also known as Context-Based Access Control [CBAC]) feature. Remove the ip inspect interface configuration command before applying the zone-member security command. The zone-based policy firewall can coexist with Cisco IOS Firewall stateful inspection. You can still use the ip inspect command on interfaces that are not members of security zones. Traffic can never flow between an interface assigned to a zone and an interface without a zone assignment. Applying the zone-member configuration commands will therefore always result in temporary interruption of service. The default interzone policy is to drop all traffic unless specified otherwise in the zone-pair configuration command. The router never filters the traffic between interfaces in the same zone. The zone-member command does not protect the router itself (traffic to and from the router is not affected) unless you configure the zone pairs using the predefined self zone (described later in this chapter). CBAC dynamically creates entries in access lists attached to interfaces on which the ip inspect command is configured. (Cisco IOS Firewall stateful inspection entries and access list entries are or-ed together.) The zonebased policy firewall does not change the access lists. (The interzone policy is and-ed with the access list.) Review the access list usage before using the zone-member commands.

32 [ 32 ] CHAPTER 3 Configuring Zone-Based Policy Firewalls in Cisco IOS Configuring Security Zones Our example has two security zones: inside and outside. Listing 3-4 shows the configuration commands used to create them. To help network administrators understand the router configuration, you can assign a description to each zone with the description zone configuration command. LISTING 3-4 Creating Zones zone security Inside description Inside network zone security Outside description Outside network NOTE Class default is always the last class in a policy map. It thus applies only to traffic not covered by other class maps. Configuring Firewall Policy The firewall policy in our design is very simple: All traffic is allowed from the inside zone to the outside zone, so we can use the class-default (match all) traffic class in the policy-map command. Similar to other modular CLI constructs in Cisco IOS, you have to specify what to do with the traffic matching the desired traffic class. You have the following options: Pass the packets. This action is equivalent to an access-list permit statement and is thus unidirectional. There is no provision for return traffic, so you have to specify the handling of return traffic manually. This option is useful only for protocols such as IPsec-encrypted traffic. Inspect the packet. This action is equivalent to the functionality of the ip inspect command of the Cisco IOS Firewall Stateful Inspection feature. It automatically provides conduits for return traffic and potential ICMP messages. For protocols requiring multiple parallel signaling and data sessions (for example, FTP or H.323), the inspect action also handles the proper establishment of data sessions.

33 [ 33 ] CHAPTER 3 Configuring Zone-Based Policy Firewalls in Cisco IOS NOTE There is no need for an outside-to-inside zone pair because there are no inside servers that would be accessible from the outside zone. Drop the packet. Equivalent to the access-list deny statement. Similar to the access lists, you can use the log option to log the rejected packets. Police. Rate-limits the traffic of the specified class. Can be used only in conjunction with the inspect or pass command. After the firewall policy has been configured, you can apply it to traffic between a pair of zones using the zone-pair security configuration command. In this command, you specify the source zone (in which the clients reside), the destination zone (where the servers are), and the policy for handling the traffic between them. Listing 3-5 shows the InsideToOutside firewall policy and the corresponding zone-pair command used in our firewall. LISTING 3-5 Creating Firewall Policy policy-map type inspect InsideToOutside class class-default inspect zone-pair security InsideToOutside source Inside destination Outside service-policy type inspect InsideToOutside Assigning Interfaces to Security Zones After the firewall policy is complete, you can assign individual interfaces to security zones with the zone-member security configuration command, resulting in the final router configuration in Listing 3-6.

34 [ 34 ] CHAPTER 3 Configuring Zone-Based Policy Firewalls in Cisco IOS LISTING 3-6 Initial Zone-Based Policy Firewall Configuration policy-map type inspect InsideToOutside class class-default inspect zone security Inside description Inside network zone security Outside description Outside network zone-pair security InsideToOutside source Inside destination Outside service-policy type inspect InsideToOutside interface FastEthernet0/0 zone-member security Inside interface Serial0/0/0.100 point-to-point zone-member security Outside Testing the Firewall Configuration The first port scan results from an outside host are encouraging; after the firewall policy has been configured, the internal hosts are no longer visible to port scans from the outside, as shown in Listing 3-7. However, it s obvious that the router itself is still vulnerable.

35 [ 35 ] CHAPTER 3 Configuring Zone-Based Policy Firewalls in Cisco IOS LISTING 3-7 Scanning the Protected LAN from the Outside External$ nmap --system-dns /28 Starting Nmap 4.03 ( ) at :41 Interesting ports on : (The 1671 ports scanned but not shown below are in state: closed) PORT STATE SERVICE 23/tcp open telnet 79/tcp open finger 80/tcp open http Nmap finished: 16 IP addresses (1 host up) scanned in seconds Raw packets sent: 2581 ( KB) Rcvd: 1677 (77.142KB) On the other hand, a simple test (Listing 3-8) proves that the inside clients can reach any service or server on the Internet. LISTING 3-8 Scanning an External Web Server from the Inside Inside$ nmap -v --system-dns web.com Interesting ports on web.com ( ): (The 1663 ports scanned but not shown below are in state: closed) PORT STATE SERVICE 21/tcp open ftp 25/tcp open smtp 80/tcp open http 135/tcp open msrpc 139/tcp open netbios-ssn 443/tcp open https 445/tcp open microsoft-ds 1026/tcp open LSA-or-nterm continues

36 [ 36 ] CHAPTER 3 Configuring Zone-Based Policy Firewalls in Cisco IOS LISTING 3-8 Scanning an External Web Server from the Inside continued 3389/tcp open ms-term-serv 5800/tcp open vnc-http 5900/tcp open vnc Nmap finished: 1 IP address (1 host up) scanned in seconds Raw packets sent: 1958 (86.132KB) Rcvd: 1685 (77.510KB) Deploying a zone-based firewall has an additional unexpected benefit: Because all the traffic between zones is inspected, a port scan almost always triggers alerts and corresponding log messages (displayed in Listing 3-9). LISTING 3-9 Alerts Generated by the Router During Port Scan 00:42:35: %FW-4-HOST_TCP_ALERT_ON: (target:class)-(insidetooutside:class-default):max tcp half-open connections (50) exceeded for host :42:43: %FW-4-HOST_TCP_ALERT_ON: (target:class)-(insidetooutside:class-default):max tcp half-open connections (50) exceeded for host :42:48: %FW-4-HOST_TCP_ALERT_ON: (target:class)-(insidetooutside:class-default):max tcp half-open connections (50) exceeded for host :42:53: %FW-4-HOST_TCP_ALERT_ON: (target:class)-(insidetooutside:class-default):max tcp half-open connections (50) exceeded for host :42:56: %FW-4-ALERT_ON: (target:class)-(insidetooutside:class-default):getting aggressive, count (2/500) current 1-min rate: 501 Configuration Command Summary In this section, we have used the commands summarized in Table 3-1 to create an initial firewall configuration.

37 [ 37 ] CHAPTER 3 Configuring Zone-Based Policy Firewalls in Cisco IOS TABLE 3-1 Command Syntax zone security name description text Basic Zone-Based Policy Firewall Configuration Commands policy-map type inspect name class name class class-default inspect pass drop [log] police rate bps burst burst-size Description Creates a new security zone. Optionally assigns a description to the selected security zone. Creates a new policy map or starts configuration of the existing policy map. The type inspect keywords are mandatory. Within a policy map, starts configuring firewall actions for the specified traffic class. Within a policy map, starts configuring firewall actions for all unclassified traffic. The class class-default command should be the last class specification in the policy map. Within a traffic class configuration, permits traffic and requests packet inspection to establish automatic conduits for return traffic (equivalent to the ip inspect command of Cisco IOS Firewall stateful inspection). Within a traffic class configuration, permits traffic. You have to make manual provisions for return traffic handling. Drops the packets of the selected traffic class with optional logging to the router s log. Rate-limits traffic within the specified traffic class to the specified bits-per-second rate with a specified maximum burst size. Limiting Inside-to-Outside Traffic In the preceding section, we configured a simple firewall that protected the inside network while allowing the inside users to access any service on the Internet. In this section, we extend this design by limiting the services the inside users are allowed to access (the second design of the section Simple LAN-to-Internet Firewall in Chapter 2, Typical Zone- Based Firewall Designs ). To reach that goal, we first have to define the traffic classes that will later be used in the

38 [ 38 ] CHAPTER 3 Configuring Zone-Based Policy Firewalls in Cisco IOS NOTE Class maps using these parameters are known as Layer 4 class maps. Cisco IOS also supports deeper inspection of HTTP, IMAP, instant messaging (AOL, MSN, Yahoo), and peer-to-peer (edonkey, fasttrack, gnutella, kazaa) protocols. Those class maps are called Layer 7 class maps and are covered in a later section. policy-map commands to define the desired firewall policy. The traffic classes are defined with the well-known classmap command augmented with the type inspect keyword. class-map can classify traffic based on source and destination addresses and Layer 4 port numbers using extended IP access lists, or based on well-known Layer 4 (TCP, UDP, ICMP, and so on) or Layer 7 (SMTP, HTTP, FTP, and so forth) protocols. Table 3-2 shows the syntax of the class-map command and the associated match commands. TABLE 3-2 Command syntax class-map type inspect [match-all match-any] name Syntax of the class-map type inspect and Associated match Commands match access-group {ACL-number name ACL-name} match protocol {tcp udp icmp} match protocol protocol-name match class-map name match not condition Description Starts configuration of the named class map. The traffic matched by the class map has to match all the specified match conditions (match-all option, also the default behavior) or any of them (match-any option, which has to be explicitly specified). Matches traffic permitted by the specified access group. You can use numbered or named IP access lists. Matches any packet of the specified Layer 4 protocol. Matches the specified Layer 7 protocol based on its Layer 4 port number (specified as the Layer 7 protocol name in the configuration). Protocols operating on nonstandard ports or user-defined protocols can be specified with the ip port-map command, covered in Chapter 5. Matches traffic specified by a previously defined class map. This command is useful when you want to extend a previous traffic definition (use the match-any option in the class-map command) or narrow it (with the match-all option in the class-map command). This command can also be used to implement complex logical conditions that cannot be specified with a single class map. Matches all traffic not matching the specified condition.

39 [ 39 ] CHAPTER 3 Configuring Zone-Based Policy Firewalls in Cisco IOS To configure the desired firewall policy, we need to specify two traffic classes: Traffic permitted to any destination on the Internet (HTTP, HTTPS, FTP, ICMP) Traffic permitted to the Internet service provider s (ISPs) servers (SMTP, POP3, DNS). The configuration of the first traffic class is simple: Just use the class-map command with the match-any option and list all the desired protocols, as shown in Listing LISTING 3-10 Class Map Matching the Default Internet Traffic class-map type inspect match-any InternetTraffic match protocol http match protocol ftp match protocol icmp match protocol https NOTE You might be tempted to use the access list to match both IP addresses and TCP port numbers instead of using the match protocol commands. However, when a protocol uses control and data sessions (as FTP does), the match protocol command matches all relevant sessions, and the access list cannot do it. For example, match protocol ftp is not equivalent to permit tcp any any eq ftp. The definition of traffic allowed toward the ISP servers is a bit more complex because we have to specify two conditions: a list of protocols (using the match-any keyword) toward a set of IP addresses (here we need a match-all keyword). Listing 3-11 contains the minimum configuration needed to achieve these goals. LISTING 3-11 Matching Traffic Toward ISP Servers class-map type inspect match-any ISPTraffic match protocol dns match protocol smtp match protocol pop3 class-map type inspect match-all ToISP match class-map ISPTraffic match access-group name ISPServers ip access-list extended ISPServers permit ip any host permit ip any host

40 [ 40 ] CHAPTER 3 Configuring Zone-Based Policy Firewalls in Cisco IOS After defining the two traffic classes, you can specify the target firewall policy as follows: Inspect all traffic in classes ToISP and InternetTraffic. Drop and log all the other traffic. Listing 3-12 shows the final firewall configuration. LISTING 3-12 Final Simple LAN-to-Internet Firewall Configuration class-map type inspect match-any ISPTraffic match protocol dns match protocol smtp match protocol pop3 class-map type inspect match-all ToISP match class-map ISPTraffic match access-group name ISPServers class-map type inspect match-any InternetTraffic match protocol http match protocol ftp match protocol icmp match protocol https policy-map type inspect InsideToOutside class type inspect ToISP inspect class type inspect InternetTraffic inspect class class-default drop log continues

41 [ 41 ] CHAPTER 3 Configuring Zone-Based Policy Firewalls in Cisco IOS LISTING 3-12 Final Simple LAN-to-Internet Firewall Configuration continued zone security Inside description Inside network zone security Outside description Outside network zone-pair security InsideToOutside source Inside destination Outside service-policy type inspect InsideToOutside interface FastEthernet0/0 ip address ip nat inside zone-member security Inside interface Serial0/0/0.100 point-to-point description Link to the Internet ip address ip nat outside zone-member security Outside ip access-list extended ISPServers permit ip any host permit ip any host To verify the proper operation of your configuration, you can use a port-scanning program from an inside host. As Listing 3-13 shows, Internet services (FTP, HTTP) can be reached on the ISP servers together with the ISP-specific services (SMTP, POP3, DNS). On the other hand, only Internet services are available to inside clients on any other Internet host (Listing 3-14).

42 CHAPTER 3 Configuring Zone-Based Policy Firewalls in Cisco IOS LISTING 3-13 Port Scan of the ISP Servers from the Inside Inside$ nmap --system-dns /28 [ 42 ] Interesting ports on dns.isp.com ( ): (The 1669 ports scanned but not shown below are in state: filtered) PORT STATE SERVICE 21/tcp open ftp 53/tcp open domain 80/tcp open http Interesting ports on smtp.isp.com ( ): (The 1669 ports scanned but not shown below are in state: filtered) PORT STATE SERVICE 25/tcp open smtp 53/tcp open domain 110/tcp open pop3 Nmap finished: 16 IP addresses (2 hosts up) scanned in seconds LISTING 3-14 Port Scan of an External Web Server from an Inside Host Inside$ nmap --system-dns Interesting ports on web.com ( ): (The 1671 ports scanned but not shown below are in state: filtered) PORT STATE SERVICE 21/tcp open ftp 80/tcp open http 443/tcp open https Nmap finished: 1 IP address (1 host up) scanned in seconds

43 [ 43 ] CHAPTER 3 Configuring Zone-Based Policy Firewalls in Cisco IOS As expected, the port scan generates a number of router alerts, as shown in Listing LISTING 3-15 Router Alerts During the Port Scan 01:06:13: %FW-6-DROP_PKT: Dropping tcp pkt :35860 => :535 01:07:44: %FW-6-DROP_PKT: Dropping rtsp pkt :58360 => :554 01:08:14: %FW-6-DROP_PKT: Dropping tcp pkt :58360 => :895 Protecting the Router The firewall configuration in the previous section has successfully protected inside hosts from Internet attacks and limited the services the inside hosts can access on the Internet. The router itself, however, remains vulnerable because the traffic to and from the router itself is not restricted by the interzone policies (as shown in Listing 3-2 earlier in this chapter). To protect the router, you could use incoming IP access lists on all interfaces. This approach (although commonly used in the past) has a number of severe drawbacks: The access list has to include all IP addresses configured on the router. Whenever the router participates in several security zones, a different access list has to be specified for each zone. The access lists cannot restrict the traffic originating in the router. (The only way to influence outgoing traffic is through local policy routing.) The zone-based policy firewall feature does not amend the access lists the way Cisco IOS Firewall stateful inspection does. Therefore, special precautions must be taken to ensure that there are no undesired side effects from applying access lists on interfaces assigned to security zones. Zone-based policy firewall configuration in Cisco IOS offers a novel approach to this problem: The router itself can be defined as a separate security zone (with the predefined name self), and the incoming and outgoing sessions can be limited in the same way as the routed interzone traffic.

44 [ 44 ] CHAPTER 3 Configuring Zone-Based Policy Firewalls in Cisco IOS IMPORTANT When configuring the self zone, consider these facts: All IP addresses configured on the router belong to the zone self, regardless of the zone memberships of their interfaces. Unless configured otherwise, traffic to and from the self zone is unrestricted. The moment you use the self zone in a zone pair, the traffic between the self zone and the other zone in the zone pair is restricted in both directions. For example, if you define a zone pair from inside to self, the router cannot originate any sessions toward the inside zone until you define a zone pair from self to inside. Traffic between the router itself and the zones not mentioned in combination with the self zone in a zone pair is not affected. When configuring the restrictions for the inbound traffic, consider the necessary outbound traffic (including the routing and network management protocols). For example, if you restrict inbound traffic from a zone to the router itself, the routing protocols could stop working on all interfaces belonging to that zone. In early releases supporting zone-based policy firewall configuration (Cisco IOS 12.4(6)T), the match protocol command cannot be used to classify traffic to or from the self zone. Only IP access lists can be used for traffic classification purposes. NOTE A more complex router protection policy will be developed in the next chapter. A more securityconscious environment would also not allow full access from the router to the inside network. Configuring Router Protection Common router protection measures in a small LAN-to-Internet firewall might include the following: No external access, apart from ping (icmp echo) and routing protocols (if needed) No access to the Internet from the router (apart from the routing protocols, if needed) Limited internal access (for example, ping, Telnet or SSH, SNMP, HTTP, and HTTP/HTTPS Full access from the router to the inside network

45 [ 45 ] CHAPTER 3 Configuring Zone-Based Policy Firewalls in Cisco IOS To implement these protection measures, you need to configure, at minimum, the following: Two IP access lists, one for external (ping only) traffic and one for internal traffic. Two class maps and three policy maps. (The third policy map allows any traffic from the router to the inside zone.) Several zone pairs. Listing 3-16 shows the complete configuration needed to protect the router. LISTING 3-16 Protecting the Router with the Self Zone ip access-list extended ICMPEcho permit icmp any any echo class-map type inspect match-any ping match access-group name ICMPEcho policy-map type inspect OutsideToRouter class type inspect ping inspect class class-default drop log zone-pair security OutsideToRouter source Outside destination self service-policy type inspect OutsideToRouter ip access-list extended ManagementProtocols permit tcp any any eq telnet permit tcp any any eq 22 ssh continues

46 [ 46 ] CHAPTER 3 Configuring Zone-Based Policy Firewalls in Cisco IOS LISTING 3-16 Protecting the Router with the Self Zone continued permit tcp any any eq www permit tcp any any eq 443 https permit icmp any any echo class-map type inspect match-any RouterManagement match access-group name ManagementProtocols policy-map type inspect InsideToRouter class type inspect RouterManagement inspect class class-default policy-map type inspect RouterToInside class class-default inspect zone-pair security InsideToRouter source Inside destination self service-policy type inspect InsideToRouter zone-pair security RouterToInside source self destination Inside service-policy type inspect RouterToInside Quick port scans from an inside (Listing 3-17) and outside (Listing 3-18) host verify that the configuration in Listing 3-16 does protect the router. The inside host can only access the services that we have specified in the RouterManagement access list, and the outside host cannot access the router at all (although it can still be pinged as ; see the 1 host up message from nmap).

47 [ 47 ] CHAPTER 3 Configuring Zone-Based Policy Firewalls in Cisco IOS LISTING 3-17 Port Scan of a Protected Router from the Inside Inside$ nmap --system-dns Interesting ports on fw ( ): (The 1671 ports scanned but not shown below are in state: filtered) PORT STATE SERVICE 23/tcp open telnet 80/tcp open http 443/tcp closed https Nmap finished: 1 IP address (1 host up) scanned in seconds LISTING 3-18 Port Scan of a Protected Router from the Outside External$ nmap --system-dns All 1674 scanned ports on are: filtered Nmap finished: 1 IP address (1 host up) scanned in seconds Monitoring and Debugging Zone-Based Policy Firewall Configuration As with every Cisco IOS features, a number of show and debug commands are available to network administrators to monitor and troubleshoot the zone-based configurations. If you would like to see the summary of your zone configuration, the show zone security command is the one you re looking for (Listing 3-19).

48 [ 48 ] CHAPTER 3 Configuring Zone-Based Policy Firewalls in Cisco IOS LISTING 3-19 Show Zone Security Command Displays Zones and Associated Interfaces fw#show zone security zone self Description: System defined zone zone Inside Description: Inside network Member Interfaces: FastEthernet0/0 zone Outside Description: Outside network Member Interfaces: Serial0/0/0.100 If you would like to see more details about the configured traffic classes and interzone policies, the obvious commands are show class-map type inspect, show policy-map type inspect, and show zone-pair security. They display the specified class map, policy map, or zone pair so that you don t have to browse through the router configuration. More useful is the show policy-map type inspect zone-pair name command, which displays the traffic and usage statistics for a zone pair, as shown in Listing LISTING 3-20 Output of a show policy-map type inspect zone-pair Command fw#show policy-map type inspect zone-pair InsideToOutside Zone-pair: InsideToOutside Service-policy inspect : InsideToOutside Class-map: InternetTraffic (match-any) Match: protocol http 0 packets, 0 bytes continues

49 [ 49 ] CHAPTER 3 Configuring Zone-Based Policy Firewalls in Cisco IOS WARNING The per-protocol traffic counters displayed in the show policy-map type inspect zone-pair command can be misleading. For example, the counters for the FTP protocol list only the actual content packets (excluding the TCP setup packets) exchanged in the FTP control session and do not include the data transferred in the FTP data sessions. LISTING 3-20 Output of a show policy-map type inspect zone-pair Command continued 30 second rate 0 bps Match: protocol ftp 3 packets, 84 bytes 30 second rate 0 bps Match: protocol icmp 1 packets, 40 bytes 30 second rate 0 bps Match: protocol https 0 packets, 0 bytes 30 second rate 0 bps Inspect Packet inspection statistics [process switch:fast switch] tcp packets: [133:2363] icmp packets: [0:8] ftp packets: [46:0] Session creations since subsystem startup or last reset 7 Current session counts (estab/half-open/terminating) [2:0:0] Maxever session counts (estab/half-open/terminating) [2:1:1] Last session created 00:00:13 Last session created 00:00:13 Last statistic reset never Last session creation rate 1 Last half-open session total 0 printout repeated for other classes of traffic

50 [ 50 ] CHAPTER 3 Configuring Zone-Based Policy Firewalls in Cisco IOS The show policy-map type inspect zone-pair name sessions command gives an even more detailed printout. It includes all the open sessions, too (see Listing 3-21). The name parameter is optional; without it, the router displays all sessions it tracks. LISTING 3-21 Sessions Established Between a Pair of Zones fw#show policy-map type inspect zone-pair sessions Zone-pair: InsideToOutside Service-policy inspect : InsideToOutside Class-map: InternetTraffic (match-any) Match: protocol http 0 packets, 0 bytes 30 second rate 0 bps Match: protocol ftp 3 packets, 84 bytes 30 second rate 0 bps Match: protocol icmp 1 packets, 40 bytes 30 second rate 0 bps Match: protocol https 0 packets, 0 bytes 30 second rate 0 bps Inspect Established Sessions Session 478AF96C ( :20)=>( :1053) ftp-data SIS_OPEN Created 00:04:30, Last heard 00:00:00 Bytes sent (initiator:responder) [ :0] Session 478AFC24 ( :1051)=>( :21) ftp SIS_OPEN Created 00:06:04, Last heard 00:04:29 Bytes sent (initiator:responder) [98:247] rest of printout deleted

51 [ 51 ] CHAPTER 3 Configuring Zone-Based Policy Firewalls in Cisco IOS WARNING Use debug ip inspect policy only on a lightly loaded router in a controlled environment (preferably with no logging to the router console); otherwise, you might easily overload its CPU. A few debugging command also support the zone-based policy firewall feature: The debug zone security command is focused on zone security events (for example, interface assignments). The debug ip inspect policy command gives you an in-depth view of individual packet classification. Listing 3-22 shows a printout associated with a single TCP SYN packet trying to open a Finger session to the router. LISTING 3-22 Output of the debug ip inspect policy Command 00:36:29: CBAC-C3PL : Policy lookup for pak 0x C [insp_c3pl_policy_lookup] 00:36:29: CBAC-C3PL : input i/f is FastEthernet0/0, output i/f is NULL [insp_c3pl_validate_zoning] 00:36:29: CBAC-C3PL : Zone-pair and policy found [insp_c3pl_validate_zoning] 00:36:29: CBAC-C3PL : Packet L7 protocol is 59 L4 prot is 1 [insp_c3pl_classify_packet] 00:36:29: CBAC-C3PL : zeroing out prot_flag [insp_c3pl_packet_classify_class_based_common] 00:36:29: CBAC-C3PL : Checking if the packet(0x c) matches with class RouterManagement [insp_c3pl_packet_classify_class_based_common] 00:36:29: CBAC-C3PL : zeroing out prot_flag [insp_c3pl_packet_classify_class_based_common] 00:36:29: CBAC-C3PL : Checking if the packet(0x c) matches with class class-default [insp_c3pl_packet_classify_class_based_common] 00:36:29: CBAC-C3PL : Packet(0x C) matched with class class-default [insp_c3pl_packet_classify_class_based_common] 00:36:29: CBAC-C3PL : Classification returned protocol-id 0x0 classid 0 [insp_c3pl_classify_packet] 00:36:29: CBAC-C3PL : DROP action found in policy-map [insp_c3pl_process_actions_of_class] 00:36:29: CBAC-C3PL : Action processing returned code 1. [insp_c3pl_classify_packet] 00:36:29: CBAC-C3PL : classify processing returned 1 [insp_c3pl_policy_lookup] Furthermore, because the zone-based firewall policy feature is closely linked to the Context-Based Access Control (CBAC) code, many debug ip inspect commands work as expected. For example, you might debug DNS and FTP inspection, resulting in the following printout when a user opens an FTP session from the inside to the outside zone (Listing 3-23).

52 [ 52 ] CHAPTER 3 Configuring Zone-Based Policy Firewalls in Cisco IOS LISTING 3-23 Debugging FTP and DNS Sessions fw#debug ip inspect dns INSPECT DNS Inspection debugging is on fw#debug ip inspect ftp-cmd INSPECT FTP commands and responses debugging is on fw# 00:43:01: CBAC FUNC: insp_dns_sis_ext_create 00:43:01: CBAC FUNC: insp_handle_dns_control_stream 00:43:01: CBAC FUNC: insp_handle_dns_control_stream 00:43:01: CBAC FTP sis 478AFEDC FTP-Server: 220 sp IOS-FTP server (version 1.00) ready.~~ 00:43:06: CBAC FUNC: insp_dns_handle_inactivity 00:43:16: CBAC FTP sis 478AFEDC FTP-Client: USER myuser~~ 00:43:16: CBAC FTP sis 478AFEDC FTP-Server: 331 Password required for myuser.~~ 00:43:18: CBAC FTP sis 478AFEDC FTP-Client: PASS xxxxxx 00:43:18: CBAC FTP sis 478AFEDC FTP-Server: 230 Logged in.~~ 00:43:18: CBAC sis 478AFEDC User authenticated Summary In this chapter, you ve seen how you can do almost a one-to-one mapping between your zone-based firewall design and Cisco IOS configuration commands: Traffic specifications described in your design are configured with class-map type inspect commands that can match individual transport layer or application layer protocols with the match protocol command or IP addresses (or port numbers) with the match access-group command. More complex logical conditions are also possible with the right combination of match-all or match-any keywords, sometimes combined with hierarchical class-maps.

53 [ 53 ] CHAPTER 3 Configuring Zone-Based Policy Firewalls in Cisco IOS Interzone policies are expressed as policy-map type inspect commands in Cisco IOS and are assigned to specific pairs of zones with the zone-pair security command. The two configuration layers allow you to use the same policy on multiple pairs of zones, thus further simplifying the configuration. Interfaces are assigned to security zones with the zone-member security commands. All traffic entering or exiting these interfaces (apart from traffic to and from the router itself) is subject to security screening, additionally improving the security of the zone-based firewall in Cisco IOS. Traffic to and from the router is not monitored (doing so by default would probably quickly kill routing protocols and network management in most implementations). To protect the router itself, you specify the interactions of the predefined zone self with other security zones.

54 [ 54 ] CHAPTER 4 Case Study: Firewall with a Perimeter Network CHAPTER FOUR Case Study: Firewall with a Perimeter Network FIGURE 4-1 Firewall with a perimeter network In the preceding chapter, you saw the mandatory configuration commands used to configure the zone-based policy firewall feature of Cisco IOS. In this chapter, we use those commands to develop a complete configuration of a firewall with a perimeter network shown in Figure 4-1. The policy rules used by this firewall are documented in Table 2-3 (Restrictive Policy of a Firewall with a Perimeter Network) of Chapter 2, Typical Zone-Based Firewall Designs. Client Mail Server Outside Configuring the Firewall Policy...56 Protecting the Router...60 Internet Inside Perimeter

55 CHAPTER 4 Case Study: Firewall with a Perimeter Network To include the perimeter network in the existing firewall configuration (Listing 3-1) discussed in Chapter 3, Configuring Zone-Based Policy Firewalls in Cisco IOS, we need to do the following: NOTE Using VLANs to connect interfaces in public and private zones on the same physical interface of a firewall should be done only as a last resort. Any misconfiguration of the switch to which these devices are attached could cause a security breach. Configure a separate interface to which the public web server will be connected. If you re limited by the router s physical setup (for example, if it has only one Fast Ethernet interface), the best approach is to create a subinterface in a different virtual LAN (VLAN). Configure the IP subnet on the perimeter interface. We ll use subnet /24 from the private IP address range. Fix the network address translation configuration. We reduce the size of the IP address pool (to gain a public IP address for the web server) and establish a static inside-to-outside mapping for the web server. Listing 4-1 shows the corresponding router configuration. [ 55 ] NOTE You need to remove the previous NAT pool definition before redefining it. LISTING 4-1 Changes in IP Routing Configuration of the Firewall Router interface FastEthernet0/0.100 description public Web server encapsulation dot1q 100 ip address ip nat inside ip nat pool Internet prefix-length 28 ip nat inside source static

56 CHAPTER 4 Case Study: Firewall with a Perimeter Network Configuring the Firewall Policy The first step in firewall policy configuration is defining traffic classes. We start by defining class maps matching the basic protocol sets (ping, web traffic, mail delivery, and network management) encountered in this firewall (Listing 4-2). [ 56 ] NOTE Within this case study, we optimize the class definitions by grouping similar protocols in the same traffic class. When deploying applicationlevel packet inspection, each protocol has to be defined as a separate traffic class (see the next chapter for more details), increasing the complexity of the configuration. It s therefore mandatory that you understand the final firewall requirements before you start configuring the router. LISTING 4-2 Configuring Basic Protocol Sets class-map type inspect match-any ping match access-group name IcmpEcho ip access-list extended IcmpEcho permit icmp any any echo permit icmp any any echo-reply Note: Web traffic also includes ability to ping class-map type inspect match-any WebTraffic match protocol http match protocol https match class-map ping class-map type inspect FileTransfer match protocol ftp class-map type inspect match-any PublicManagement match protocol ftp match protocol ssh match protocol snmp continues

57 [ 57 ] CHAPTER 4 Case Study: Firewall with a Perimeter Network LISTING 4-2 Configuring Basic Protocol Sets continued class-map type inspect match-any SMTP match protocol smtp extended class-map type inspect match-any DNS match protocol dns Within the firewall policy, we also need refined traffic class definitions where a specific protocol (for example, SMTP) will be allowed on only a specific server (for example, the inside mail server). For convenience, we also define a broader traffic class covering all public services offered by the perimeter server: SMTP, HTTP, and DNS and ping for troubleshooting purposes. The perimeter server is the authoritative server for the organization s domain and a caching DNS server for the internal clients. Listing 4-3 shows the refined and extended traffic classes. LISTING 4-3 Additional Traffic Class Definitions class-map type inspect match-all MailDelivery match class-map SMTP match access-group name InternalServer ip access-list extended InternalServer permit ip any host class-map type inspect match-any PublicProtocols match class-map SMTP match class-map WebTraffic match class-map DNS match class-map ping continues

58 [ 58 ] CHAPTER 4 Case Study: Firewall with a Perimeter Network LISTING 4-3 Additional Traffic Class Definitions continued class-map type inspect match-all PublicTraffic match class-map PublicProtocols match access-group name PerimeterServer ip access-list extended PerimeterServer permit ip any host Next, we configure the individual zones and the policies between pairs of zones. Finally, individual interfaces are assigned to the configured security zones (Listing 4-4). NOTE The configuration of service policies and zone pairs seems highly verbose. You will see where you can benefit from this modularity when configuring morecomplex firewall policies later in this chapter. LISTING 4-4 Firewall Policies and Zone Definitions zone security Inside zone security Perimeter zone security Outside policy-map type inspect InsideToOutside class type inspect WebTraffic inspect class type inspect FileTransfer inspect policy-map type inspect InsideToPerimeter class type inspect PublicTraffic inspect class type inspect PublicManagement inspect policy-map type inspect PerimeterToOutside class type inspect DNS continues

59 [ 59 ] CHAPTER 4 Case Study: Firewall with a Perimeter Network LISTING 4-4 Firewall Policies and Zone Definitions continued inspect class type inspect SMTP inspect class type inspect ping inspect policy-map type inspect OutsideToPerimeter class type inspect PublicTraffic inspect policy-map type inspect PerimeterToInside class type inspect MailDelivery inspect zone-pair security InsideToOutside source Inside destination Outside service-policy type inspect InsideToOutside zone-pair security InsideToPerimeter source Inside destination Perimeter service-policy type inspect InsideToPerimeter zone-pair security PerimeterToInside source Perimeter destination Inside service-policy type inspect PerimeterToInside zone-pair security PerimeterToOutside source Perimeter destination Outside service-policy type inspect PerimeterToOutside zone-pair security OutsideToPerimeter source Outside destination Perimeter service-policy type inspect OutsideToPerimeter interface FastEthernet0/0 description Inside LAN zone-member security Inside continues

60 [ 60 ] CHAPTER 4 Case Study: Firewall with a Perimeter Network LISTING 4-4 Firewall Policies and Zone Definitions continued interface FastEthernet0/0.100 description Perimeter network zone-member security Perimeter interface Serial0/0/0.100 point-to-point description Link to the Internet zone-member security Outside NOTE There might be additional public services the router itself needs to access (for example, the Network Time Protocol [NTP] service). Protecting the Router We complete the firewall configuration with the router-protection measures. Obviously, the only traffic allowed from the outside or the perimeter network to the router is ICMP echo (ping). The router itself can only perform DNS queries, ping, and traceroute to external networks. To monitor potential intrusion activities, the router should log all other connectionestablishment attempts. Because you cannot match any other protocol except TCP, UDP, and H323 in class maps used in conjunction with the self zone, we need to define a completely new set of traffic classes based exclusively on extended IP access lists. Cisco IOS is using UDP packets to perform the traceroute function. The initial destination UDP port number is (unless modified with the extended traceroute command); the port number is increased in every probe to allow the router to match probes with ICMP replies. Therefore, the IP access list matching traceroute traffic defines a wide range of target UDP ports. NOTE Note that the same policy map is used twice to specify firewall policies between the router and the outside and perimeter zones. Furthermore, because the router cannot properly handle ICMP responses to the UDP packets sent with the traceroute command, we need to include special provisions for ICMP replies arriving from the public network. The configuration commands used to define firewall policy for inbound traffic from perimeter and outside networks are shown in Listing 4-5. (Class map ping is defined in Listing 4-2.) Listing 4-6 contains commands defining the outbound firewall policy. (IP access list IcmpEcho is defined in Listing 4-2.)

61 [ 61 ] CHAPTER 4 Case Study: Firewall with a Perimeter Network LISTING 4-5 Firewall Policy for Inbound Traffic from Perimeter and Outside Zones class-map type inspect match-all ICMPreply match access-group name ICMPreply ip access-list extended ICMPreply permit icmp any any host-unreachable permit icmp any any port-unreachable permit icmp any any ttl-exceeded permit icmp any any packet-too-big policy-map type inspect PublicToRouter class type inspect ping inspect class type inspect ICMPreply pass class class-default drop log zone-pair security PerimeterToRouter source Perimeter destination self service-policy type inspect PublicToRouter zone-pair security OutsideToRouter source Outside destination self service-policy type inspect PublicToRouter

62 [ 62 ] CHAPTER 4 Case Study: Firewall with a Perimeter Network LISTING 4-6 Firewall Policy for Traffic from the Router Toward the Perimeter and Outside Zones class-map type inspect match-any RouterPublicTraffic match access-group name traceroute match access-group name domainlookup match access-group name IcmpEcho ip access-list extended domainlookup permit udp any any eq domain ip access-list extended traceroute permit udp any range any range policy-map type inspect RouterToPublic class RouterPublicTraffic inspect zone-pair security RouterToPerimeter source self destination Perimeter service-policy type inspect RouterToPublic zone-pair security RouterToOutside source self destination Outside service-policy type inspect RouterToPublic The permitted traffic between the internal hosts and the firewall router shall obviously include ping and traceroute (as above) as well as network management access to the firewall. Ideally, the internal hosts would be allowed to open Telnet and SSH sessions to the router and perform router management with SNMP while the router would send syslog, TFTP, and FTP traffic to the internal server. However, because

63 CHAPTER 4 Case Study: Firewall with a Perimeter Network Cisco IOS Release 12.4 does not perform in-depth inspection of router-generated traffic, FTP or TFTP to or from the router cannot be handled properly. (The router cannot identify the data sessions.) There are three ways to resolve this problem: Full IP connectivity shall be allowed between the router and the internal server. This solution is not recommended because anyone getting access to the firewall router would have full access to the internal server. Use SSH or SCP (SSH-based Secure Copy) to download router configurations to the management station. You can also use SCP to upgrade a router s software. Use HTTPS (preferred) or HTTP to download new software to the router and store router configurations to the internal server. [ 63 ] Listing 4-7 shows the configuration commands defining the firewall policy between the firewall router and the inside network. LISTING 4-7 Securing Inside Access to the Router Define inside-to-router policy class-map type inspect RouterManagement match access-group name RouterManagement ip access-list extended RouterManagement permit tcp any any eq telnet permit tcp any any eq 22 SSH permit udp host host eq snmp Network management continues

64 [ 64 ] CHAPTER 4 Case Study: Firewall with a Perimeter Network LISTING 4-7 Securing Inside Access to the Router continued policy-map type inspect InsideToRouter class type inspect ping inspect class type inspect RouterManagement inspect class type inspect ICMPreply pass class class-default drop log zone-pair security InsideToRouter source Inside destination self service-policy type inspect InsideToRouter Define router-to-inside policy class-map type inspect RouterFileTransfer match access-group name RouterFileTransfer ip access-list extended RouterDataTransfer permit tcp host host eq 22 SSH/SCP permit tcp host host eq www Web (http) permit tcp host host eq 443 SSL (https) permit udp host host eq snmp SNMP traps permit udp host host eq syslog SYSLOG messages policy-map type inspect RouterToInside class type inspect RouterPublicTraffic inspect class type inspect RouterDataTransfer continues

65 [ 65 ] CHAPTER 4 Case Study: Firewall with a Perimeter Network LISTING 4-7 Securing Inside Access to the Router continued inspect zone-pair security RouterToInside source self destination Inside service-policy type inspect RouterToInside Summary In this chapter, you ve seen how you can use the basic configuration commands supported by the zone-based policy firewall feature of Cisco IOS to configure a firewall with public servers in a perimeter network. The configuration by itself is sufficient for smaller organizations where you would not expect heavy load on the public servers; otherwise, the router parameters have to be tuned to differentiate expected traffic load from denial-of-service attacks. In addition, this configuration does not detect applications that hide within the HTTP protocol (for example, instant messaging or peer-to-peer protocols). In the next chapter, you ll see the advanced configuration commands that address these issues.

66 CHAPTER 5 Advanced Zone- Based Policy Firewall Configuration CHAPTER FIVE Advanced Zone-Based Policy Firewall Configuration In the previous chapters, you ve seen the mandatory configuration commands used to configure the zone-based policy firewall feature of Cisco IOS and how they can be used to implement various firewall designs. In this chapter, we focus on optional and advanced topics, including the following: Tuning the stateful inspection Tuning denial-of-service protection Identifying applications masquerading as other well-known applications Configuring application layer inspection policies Configuring user-defined application protocols Throughout most of this chapter, we discuss the firewall with a perimeter network from the previous chapter and incrementally finetune its configuration. [ 66 ] Tuning the Stateful Inspection...67 Tuning Denial-of- Service Protection...70 Identifying Masquerading Applications...74 Application Layer Packet Inspection...79 HTTP Packet Inspection...86 Configuring User-Defined Protocols...90

67 [ 67 ] CHAPTER 5 Advanced Zone- Based Policy Firewall Configuration Tuning the Stateful Inspection The zone-based policy firewall shares a number of features with Cisco IOS firewall stateful inspection, one of them being the capability to generate an audit log of interesting sessions. The audit log can be enabled for an individual traffic class in a policy map with the help of a global parameter-map object that defines the inspection parameters. To configure auditing of inspected sessions, use the configuration commands in Table 5-1. TABLE 5-1 Configuring Session Auditing Command Syntax parameter-map type inspect name alert on off audit-trail on off inspect parameter-map-name Description Creates or modifies the specified parameter map. Enables or disables syslog alerts (default: on). Enables or disables a session audit trail written to the router s log (default: off). Within a policy-map class definition, attaches a predefined parameter map to the inspect action to modify its default behavior. For example, in the firewall setup from the preceding chapter, we might want to log all incoming SMTP sessions as shown in Figure 5-1.

68 [ 68 ] CHAPTER 5 Advanced Zone- Based Policy Firewall Configuration FIGURE 5-1 Audit trail of inbound SMTP sessions Client Internal Server Outside Internet Inside Syslog Alert External Mail Server Inbound SMTP Session Web/Mail Server Perimeter To configure the audit trail for the SMTP session, we need to do the following: WARNING Do not delete and recreate a policy map as you would do with an access list. Deleting a policy map silently removes all references to it, thus potentially modifying your router configuration. Configure a parameter map with the audit trail. Assign SMTP to a separate traffic class. (Currently, it s bundled with all other public protocols, and you can apply auditing only to an entire class.) Reconfigure the OutsideToPerimeter policy map to include the new traffic class. Because the new traffic class is a subset of the existing traffic class, we need to put it at the beginning of the policy map. There is no way to insert class commands in a policy map (they are always appended), so all class definitions have to be erased and reentered. Listing 5-1 includes the step-by-step configuration process.

69 [ 69 ] CHAPTER 5 Advanced Zone- Based Policy Firewall Configuration LISTING 5-1 Configuring the Audit Trail of Inbound SMTP Sessions fw#conf t Enter configuration commands, one per line. End with CNTL/Z fw(config)#class-map type inspect PublicSMTP fw(config-cmap)#match class-map SMTP fw(config-cmap)#match access-group name ExternalServer fw(config-cmap)#exit fw(config)#parameter-map type inspect audit fw(config-profile)#audit-trail on fw(config-profile)#exit fw(config)#policy-map type inspect OutsideToPerimeter fw(config-pmap)#no class type inspect PublicTraffic fw(config-pmap)#class type inspect PublicSMTP fw(config-pmap-c)#inspect audit fw(config-pmap-c)#class type inspect PublicTraffic fw(config-pmap-c)#inspect fw(config-pmap-c)#^z fw# After this configuration change, the router generates a line in the syslog for every session establishment and termination event. Sample log messages are displayed in Listing 5-2. LISTING 5-2 SMTP Session Audit Trail %FW-6-SESS_AUDIT_TRAIL_START: (target:class)-(outsidetoperimeter:publicsmtp):start smtp session: initiator ( :1044) -- responder ( :25) %FW-6-SESS_AUDIT_TRAIL: (target:class)-(outsidetoperimeter:publicsmtp) :Stop smtp session: initiator ( :1044) sent 31 bytes -- responder ( :25) sent 306 bytes

70 [ 70 ] CHAPTER 5 Advanced Zone- Based Policy Firewall Configuration NOTE Half-open TCP connections are connections where the SYN packet has been received, but the first non-syn packet hasn t been seen yet. Tuning Denial-of-Service Protection The stateful firewall inspection in Cisco IOS contains inherent denial-of-service (DoS) protection mechanisms. The router constantly monitors the number of established and half-open connections and the connection creation rate and issues warnings or alerts when they exceed configured thresholds. The router also tries to cope with a DoS attack (primarily SYN attacks in which the intruder sends a large number of TCP SYN packets, also called SYN floods) by aggressively deleting half-open sessions when their number exceeds the threshold or when the session establishment rate exceeds the threshold. WARNING The rapid deletion of half-open TCP sessions helps preserve the integrity of the network infrastructure and the existing TCP sessions (servers might simply crash or hang up under a DoS attack). It does not help preserve the service availability, because the legitimate sessions in the establishment phase also get dropped among the fake ones. TCP intercept is a much better mechanism to maintain service availability during an aggressive SYN flood. However, it has a big performance impact, which might prevent its use on a heavily loaded router. The Cisco IOS Firewall Stateful Inspection (CBAC) feature enables you to configure only the global thresholds. The zone-based policy firewall uses parameter maps that can be attached to every inspect statement in a policy map, resulting in a very granular solution that can be fine-tuned to the actual network environment and traffic patterns. The commands described in Table 5-2 are used to configure the inspect thresholds in a parameter map. (The parametermap syntax is described in Table 5-1.) Remember that all parameters apply to a single traffic class between a pair of zones.

71 [ 71 ] CHAPTER 5 Advanced Zone- Based Policy Firewall Configuration TABLE 5-2 Command Syntax alert on off audit-trail on off sessions maximum number dns-timeout seconds icmp idle-timeout seconds max-incomplete high number low number one-minute high number low number tcp max-incomplete host threshold [ block minutes ] tcp synwait-time seconds tcp finwait-time seconds tcp idle-time seconds udp idle-time seconds Configuring Inspect Thresholds Description Enables or disables syslog alerts (default: on). Enables or disables the session audit trail written to the router s log (default: off). Configures the maximum number of sessions in this traffic class. Configures the maximum time between the DNS query and response packet. Configures the maximum time between ICMP request and reply. Configures the threshold at which the Cisco IOS firewall starts the DoS protection (high parameter) and when the DoS protection stops (low parameter). While the DoS protection is active, the firewall resets one half-open connection for every new connection attempt. Configures the per-minute session establishment threshold that triggers the DoS protection. The process starts after the high threshold has been exceeded and stops when the session establishment rate drops below the low threshold. Configures the maximum number of half-open sessions from a single IP host. The offending host could be (optionally) blocked for the specified duration. Configures TCP timers the maximum time between packets in session establishment, the maximum time between packets in session termination and the session idle timer. Configures the idle timer for non-dns UDP sessions. You can display the default values of all these parameters with the show parameter-map type inspect default command, which displays the values in Listing 5-3.

72 CHAPTER 5 Advanced Zone- Based Policy Firewall Configuration LISTING 5-3 Default Stateful Packet Inspection Thresholds fw#show parameter-map type inspect default parameter-map type inspect default values audit-trail off alert on max-incomplete low 400 max-incomplete high 500 one-minute low 400 one-minute high 500 udp idle-time 30 icmp idle-time 10 dns-timeout 5 tcp idle-time 3600 tcp finwait-time 5 tcp synwait-time 30 tcp max-incomplete host 50 block-time 0 [ 72 ] You would usually need to modify the inspect thresholds in high-volume environments when the router starts issuing warning and alert messages (similar to Listing 3-9). For example, it s quite easy to get more than 500 HTTP requests per minute on a popular website. Before changing the thresholds, it might be beneficial to reduce the various timeouts (which will by itself reduce the number of half-open sessions). For example, many host DNS resolvers time out in 2 seconds. Thus, having a 5-second DNS timeout is overkill. Similarly, a 30-second synwait-time is useful only if there is a dialup connection in the outbound session establishment path; otherwise, you should use a timeout of a few seconds. The 10-second icmp idletimeout can also be reduced unless you have very slow-speed congested links.

73 [ 73 ] CHAPTER 5 Advanced Zone- Based Policy Firewall Configuration After you have adapted the timeouts to your environment, perform the following steps to fine-tune the half-open session thresholds: Step 1. Step 2. Make sure your network is not infected with a worm or a target of a DoS attack. (In both cases, tuning DoS protection will obviously not help.) Create a new parameter map that considerably increases the current thresholds (for example, by a factor of 10). Apply the new parameter map to the inspect statement in the policy map that triggers the DoS protection. (The alert message indicates the policy map and the class within it.) Step 3. After a statistically significant time period (at least a day), review the inspect counters (see Listing 5-4). LISTING 5-4 Displaying Session Inspection Parameters of a Zone Pair fw#sh policy-map type inspect zone-pair OutsideToPerimeter Zone-pair: OutsideToPerimeter Service-policy inspect : OutsideToPerimeter service policy printout deleted Inspect Session creations since subsystem startup or last reset Current session counts (estab/half-open/terminating) [6:2:0] Maxever session counts (estab/half-open/terminating) [73:7:0] Last session creation rate 37 Last half-open session total 0 rest of printout deleted

74 [ 74 ] CHAPTER 5 Advanced Zone- Based Policy Firewall Configuration NOTE Server logs are an extremely valuable resource in the tuning process. Computing oneminute session establishment rate from a web server log is a simple exercise. Step 4. Step 5. Step 6. Step 7. Set the max-incomplete low parameter to the Maxever session counts half-open value. Set the maxincomplete high parameter to a value at least 25 percent above that. Increase the parameter to an even higher value if you expect a significant increase in network traffic (for example, increased website traffic due to a marketing campaign). The Cisco IOS printout gives you no reliable information that would allow you to set the one-minute thresholds. As a starting point, set the one-minute low value to 3 times the Maxever session counts estab value and the one-minute high value to a 50 percent higher value. Repeat the process for every traffic class that needs adjusted DoS protection behavior. Perform ongoing firewall DoS protection monitoring, and log all related events to a syslog server. The logged events will help you perform additional fine-tuning of the parameters. Identifying Masquerading Applications Some applications (most notably, instant messaging and peer-to-peer applications) are extremely aggressive in their attempts to establish connections with their servers. For example, Yahoo Messenger first tries to connect to Yahoo servers using its standard port numbers (5050 for instant messaging, 5061 for voice; see Listing 5-5 for details), but if that fails, it uses any TCP port number that the firewall permits (for example, Telnet or HTTPS; see Listing 5-6 for an example). To be fair, other instant messaging (IM) applications are no better, and Yahoo even documents this behavior. LISTING 5-5 Active TCP Connections After the Yahoo Messenger Has Started Myhost $ netstat Active Connections Proto Local Address Foreign Address State TCP myhost:1938 cs31.msg.dcn.yahoo.com:5050 ESTABLISHED TCP myhost:1957 sip34.voice.re2.yahoo.com:5061 ESTABLISHED

75 [ 75 ] CHAPTER 5 Advanced Zone- Based Policy Firewall Configuration LISTING 5-6 Yahoo Messenger Port Usage After Ports 5050 and 5061 Were Disabled on the Firewall Myhost $ netstat Active Connections Proto Local Address Foreign Address State TCP myhost:1988 cs31.msg.dcn.yahoo.com:telnet ESTABLISHED TCP myhost:2005 sip38.voice.re2.yahoo.com:https ESTABLISHED The applications that can adapt their TCP or UDP port usage or use well-known ports reserved for other applications as a disguise are effectively trying to bypass firewall policies. For example, in the sample firewall designed in Chapter 4, Case Study: Firewall with a Perimeter Network, the internal clients were only allowed to browse the web and use FTP for file transfer. However, they could still use IM applications, because the inside clients have unlimited access to outside web servers, giving the IM applications a TCP port they can use, as shown in Figure 5-2. FIGURE 5-2 Yahoo Messenger bypassing the firewall policy Client Unknown application, dropped scs.msg.yahoo.com:5050 STOP Outside scs.msg.yahoo.com:80 Yahoo Server Inside Looks like web browsing, passed Perimeter

76 [ 76 ] CHAPTER 5 Advanced Zone- Based Policy Firewall Configuration The masquerading applications fall into two categories: They use any TCP port permitted by the firewall, but only toward a well-known range of servers. For example, all IM applications have to connect to well-known servers as they exchange the chat traffic through them. Some peer-to-peer applications use any TCP port (or a fixed range of ports, such as web only) toward a wide range of IP addresses. The only means of identifying these applications is by looking for their specific signatures in the data stream (similar to the way virus scanners identify new viruses). Cisco IOS can identify both types of applications starting in Release 12.4(9)T. Identifying Peer-to-Peer Applications To identify the peer-to-peer applications by their signature, use the signature option in the match command of a class map. For example, to match all peer-to-peer applications in our sample firewall, you could use the traffic class definition in Listing 5-7. LISTING 5-7 Matching Peer-to-Peer Applications by Their Signature class-map type inspect match-any peer2peer match protocol gnutella signature match protocol edonkey signature match protocol kazaa2 signature match protocol fasttrack signature The signature-based classification bypasses the order of classes in a policy map, so the peer-to-peer sessions misusing ports from other applications are detected regardless of the order of class maps in a policy map.

77 [ 77 ] CHAPTER 5 Advanced Zone- Based Policy Firewall Configuration NOTE Domain name resolution must be enabled in the router with the ip domain lookup command and an external DNS server configured with the ip name-server command before you can use the server name name command. Identifying Instant Messaging Applications Instant messaging applications (and other applications that use unspecified ports to connect to their server) are identified with the help of the protocol-info parameter-map using the syntax in Table 5-3. TABLE 5-3 Configuring a Protocol Information Parameter Map Command Syntax parameter-map type protocol-info name server {name name ip address} server ip range start end Description Creates or modifies the specified parameter map Specifies a single server by its name or IP address Specifies a range of servers between start and end IP addresses The name of the protocol-info parameter-map can then be appended to the match command in a class map definition. For example, to identify Yahoo Messenger, you could use the parameter map and class map configuration in Listing 5-8. NOTE The router allows you to attach a protocol-info parameter-map to any match protocol statement in a class map (with the exception of peer-topeer applications, where the signature keyword follows the protocol name), but it only works correctly for instant messaging applications in Cisco IOS Release 12.4(9)T. LISTING 5-8 Identifying a Yahoo Messenger Application parameter-map type protocol-info YMServers server name scs.msg.yahoo.com server name insider.msg.yahoo.com server name sip.yahoo.com class-map type inspect match-all YahooMessenger match protocol ymsgr YMServers When you use protocol-info-based traffic classification in a policy map, you don t have to worry about the order of the class commands. The destination IP address match with the parameter map is done before the sequential scan of the policy map, so the IM applications are correctly identified regardless of their position in the policy map.

78 [ 78 ] CHAPTER 5 Advanced Zone- Based Policy Firewall Configuration If you want to disable access to Yahoo Messenger in our sample firewall from Chapter 4, you have to augment the InsideToOutside policy map with the commands from Listing 5-9. LISTING 5-9 Disable Yahoo Messenger in the Sample Firewall policy-map type inspect InsideToOutside class type inspect YahooMessenger drop You can monitor the protocol-info parameter maps with two show commands (both printouts are included in Listing 5-10): show parameter-map type protocol-info {name} displays the definition of the parameter map (so you don t have to browse the router configuration). show parameter-map type protocol-info dns-cache zone-pair name displays the IP addresses used in traffic classification in the specified zone pair; all parameter-maps used in the policy map attached to the zone pair with IP addresses to which the hostnames specified in them resolve to. LISTING 5-10 protocol-info-related show Commands fw#show parameter-map type protocol-info parameter-map type protocol-info YMServers server name scs.msg.yahoo.com server name insider.msg.yahoo.com server name sip.yahoo.com fw#show parameter-map type protocol-info dns-cache zone-pair InsideToOutside Application im-yahoo. Server DNS Name: scs.msg.yahoo.com. Updates: 0 failed, 328 succeeded, next after secs Number of IP Addresses: (0D:00H:00M) (0D:00H:00M) (0D:00H:00M) (0D:00H:00M) (0D:00H:00M) (0D:00H:00M) (0D:00H:00M) (0D:00H:00M) Application im-yahoo. Server DNS Name: insider.msg.yahoo.com. Updates: 0 failed, 17 succeeded, next after secs Number of IP Addresses: 2 continues

79 [ 79 ] CHAPTER 5 Advanced Zone- Based Policy Firewall Configuration LISTING 5-10 protocol-info-related show Commands continued , (0D:00H:00M) Application im-yahoo. Server DNS Name: sip.yahoo.com. Updates: 0 failed, 2 succeeded, next after secs Number of IP Addresses: (0D:00H:00M) (0D:00H:00M) (0D:00H:00M) (0D:00H:00M) (0D:00H:00M) (0D:00H:00M) (0D:00H:00M) (0D:00H:00M) Application Layer Packet Inspection In addition to the transport layer stateful inspection (which, for protocols with separate control and data sessions such as FTP and H.323, includes some processing of an application data stream), the zone-based policy firewall feature supports application layer inspection (also called deep packet inspection [DPI]) of several popular protocols, including the following: Internet Mail Access Protocol (IMAP) and Post Office Protocol (POP). You can check whether the users are trying to use cleartext authorization. Simple Mail Transfer Protocol (SMTP). You can check maximum message length. Sun Remote Procedure Call (SUNRPC). You can block access to specific programs over the RPC mechanism. Peer-to-peer applications (edonkey, FastTrack, Gnutella, and Kazaa). You can match and block transfer of files matching the specified regular expression. Instant messaging (AOL, MSN, Yahoo). You can block the entire messaging service or just the text chat within it. Hypertext Transport Protocol (HTTP). You can match on a large number of parameters, including web address (Universal Resource Locator [URL]), content type, or any other component of the HTTP request or response header. You can also identify applications misusing HTTP for tunneling, instant messaging, or peer-to-peer applications.

80 [ 80 ] CHAPTER 5 Advanced Zone- Based Policy Firewall Configuration All application layer inspections are configured using application-specific class maps and policy maps that are then attached with the service-policy command as children of Layer 4 policy maps. Application-specific class maps are configured with the class-map type inspect protocol name configuration command. The list of protocols supported is displayed in Listing LISTING 5-11 Application Layer Protocol Inspection in Cisco IOS Release 12.4(9)T NOTE The match commands available in the class map configuration are protocol-specific; you can find a detailed list in the Cisco IOS documentation. The extensive set of HTTP match commands is described in the next section. fw(config)#class-map type inspect? WORD class-map name aol Configure CBAC class-map for IM-AOL protocol edonkey edonkey fasttrack FastTrack Traffic - KaZaA, Morpheus, Grokster... gnutella Gnutella Version2 Traffic - BearShare, Shareeza, Morpheus... http Configure CBAC class-map for HTTP protocol imap Configure CBAC class-map for IMAP protocol kazaa2 Kazaa Version 2 match-all Logical-AND all matching statements under this classmap match-any Logical-OR all matching statements under this classmap msnmsgr Configure CBAC class-map for IM-MSN protocol pop3 Configure CBAC class-map for POP3 protocol smtp Configure CBAC class-map for SMTP protocol sunrpc Configure CBAC class-map for RPC protocol ymsgr Configure CBAC class-map for IM-YAHOO protocol Within each class map definition, you can use the match commands to match supported features of the protocol. After the class maps have been defined, you can configure the application-specific policy maps with the policy-map type inspect application name command. The set of applications is a bit shorter (see Listing 5-12) because you can use any instant-messaging class-map (aol, msnmsgr, and ymsgr) in im policy-map and similarly any peer-to-peer class map (edonkey, fasttrack, gnutella) in p2p policy-map. For all other protocols, the type of the class-map has to match the type of the policy map within which it s used.

81 [ 81 ] CHAPTER 5 Advanced Zone- Based Policy Firewall Configuration NOTE Not all the actions are available in all policy maps. The allow action is not available in IMAP and POP3 policy maps, and the reset action is not available in the SUNRPC policy map (because you cannot reset a UDP connection). LISTING 5-12 Configuring the Application Layer Policy Map fw(config)#policy-map type inspect? WORD policy-map name http Configure CBAC policy-map for HTTP protocol im Configure CBAC policy-map for IM protocol imap Configure CBAC policy-map for IMAP protocol p2p Configure CBAC policy-map for P2P protocols pop3 Configure CBAC policy-map for POP3 protocol smtp Configure CBAC policy-map for SMTP protocol sunrpc Configure CBAC policy-map for RPC protocol Within application layer policy maps, you can use the following actions: log Logs the session allow Allows the traffic matching the class map reset Resets the connection After the application layer policy maps are configured, you can attach them as a service policy to existing traffic classes in the Layer 4 policy maps. IMPORTANT You can only attach a service policy to a class with the inspect action. Application layer policies thus require stateful inspection at the parent level. Application layer policies can be used only inside Layer 4 policies, not in zone pair definitions. A single application layer policy map can be attached to a class in a Layer 4 policy map. This restriction might force you to implement more granular Layer 4 classes. The class to which a service policy is attached can match only protocols handled by the service policy. For example, you cannot attach a POP3 service policy to a class matching both POP3 and IMAP protocols.

82 [ 82 ] CHAPTER 5 Advanced Zone- Based Policy Firewall Configuration NOTE Some of these issues could be solved with other mechanisms. For example, peer-to-peer services could be prohibited, and secure POP3 and IMAP could be deployed instead of forcing the users to use non-clear-text authentication on regular POP3/IMAP sessions. FIGURE 5-3 Simple LAN-to- Internet firewall Packets not matched by any class in a Layer 4 policy map are handled by class-default. If no action is specified in class-default, these packets are dropped. Packets not matched by an application layer policy map are not dropped but are handled according to the specifications of the parent policy map. Application Layer Packet Inspection Example Let s illustrate these concepts with an example. We ll use the very simple LAN-to-Internet firewall from Chapter 3, Configuring Zone-Based Policy Firewalls in Cisco IOS, where there were no restrictions on traffic from inside clients to outside server. To control the Internet access link utilization, the IT manager would like to prevent download of MP3 files with peer-to-peer services and limit the size of s the users can send. Furthermore, because the is hosted on external servers, the users shall be forced to use non-clear-text authentication methods to prevent a potential intruder or an external wiretap from collecting the passwords (Figure 5-3). Client No cleartext POP3 authentication POP3 USER command POP3 APOP command STOP Outside pp3.isp.com Inside / Internet To implement these requirements, a large number of class maps and policy maps must be configured: A class map and a policy map have to be configured for POP3, IMAP, and SMTP DPI (Listing 5-13). Four class maps must be configured to cover all four supported peer-to-peer services together with a P2P policy map (Listing 5-14).

83 [ 83 ] CHAPTER 5 Advanced Zone- Based Policy Firewall Configuration Inspect class maps have to be configured to match individual protocols for which we want to perform DPI (Listing 5-15). Finally, a policy map (InsideToOutside) is configured tying together all the previously configured objects (Listing 5-16). From there onward, use the remainder of the configuration from the beginning of Chapter 3. LISTING 5-13 Application-Level Inspection of Related Protocols class-map type inspect imap match-any imapmail match invalid-command match login clear-text policy-map type inspect imap imappolicy class type inspect imap imapmail log reset class-map type inspect pop3 match-any pop3mail match invalid-command match login clear-text policy-map type inspect pop3 pop3policy class type inspect pop3 pop3mail reset log class-map type inspect smtp match-any smtpmail match data-length gt continues

84 [ 84 ] CHAPTER 5 Advanced Zone- Based Policy Firewall Configuration LISTING 5-13 Application-Level Inspection of Related Protocols continued policy-map type inspect smtp smtppolicy class type inspect smtp smtpmail reset LISTING 5-14 Application-Level Inspection of Peer-to-Peer Traffic class-map type inspect gnutella match-any nomp3gnutella match file-transfer mp3 class-map type inspect fasttrack match-any nomp3fasttrack match file-transfer mp3 class-map type inspect edonkey match-any nomp3edonkey match file-transfer mp3 match search-file-name mp3 class-map type inspect kazaa2 match-any nomp3kazaa match file-transfer mp3 policy-map type inspect p2p nomp3transfer class type inspect edonkey nomp3edonkey log reset class type inspect fasttrack nomp3fasttrack log reset class type inspect gnutella nomp3gnutella log reset continues

85 [ 85 ] CHAPTER 5 Advanced Zone- Based Policy Firewall Configuration LISTING 5-14 Application-Level Inspection of Peer-to-Peer Traffic continued class type inspect kazaa2 nomp3kazaa log reset LISTING 5-15 Class Maps Matching Individual Deeply Inspected Application Protocols class-map type inspect match-any getmail match protocol pop3 class-map type inspect match-any sendmail match protocol smtp extended class-map type inspect match-any readmail match protocol imap class-map type inspect match-any peer2peer match protocol gnutella signature match protocol edonkey signature match protocol kazaa2 signature match protocol fasttrack signature LISTING 5-16 Inside-to-Outside Firewall Policy policy-map type inspect InsideToOutside class type inspect peer2peer inspect service-policy p2p nomp3transfer class type inspect getmail inspect service-policy pop3 pop3policy class type inspect readmail continues

86 CHAPTER 5 Advanced Zone- Based Policy Firewall Configuration LISTING 5-16 Inside-to-Outside Firewall Policy continued inspect service-policy imap imappolicy class type inspect sendmail inspect service-policy smtp smtppolicy class class-default inspect [ 86 ] NOTE HTTP packet inspection works only on nonencrypted HTTP sessions. If the data exchange takes place over Secure Sockets Layer (SSL, also known as HTTPS), the firewall cannot inspect the packet content. HTTP Packet Inspection Cisco IOS Firewall software offers only rudimentary packet-matching features for most protocols for which deep packet inspection is supported. Hypertext Transfer Protocol (HTTP), the protocol used to exchange content between the web server and its clients, is a notable exception. You can use a number of different match conditions (introduced in Cisco IOS Release 12.3(14)T with the HTTP Application Inspection Engine) to classify the web traffic, from extremely helpful ones (identifying HTTP misuse for unauthorized traffic) to arcane ones (for example, the number of header fields in the request or response header). HTTP packet inspection is configured using the same configuration syntax as any other DPI: The class-map type inspect http name command is used to define traffic classes. The policy-map type inspect http name command defines the HTTP inspection policy. You can use allow, reset, and log action commands within it. The HTTP inspection policy is attached to a class within a type inspect policy map with the service-policy http name command. The class within which service-policy http is configured can match only the HTTP packets (and it has to match them with the match protocol http command).

87 [ 87 ] CHAPTER 5 Advanced Zone- Based Policy Firewall Configuration The match commands that you can use in the class-map type inspect http command follow these rules: You can match on a condition in the HTTP request only (match request ), in the HTTP reply only (match reply ), or in request or reply (match req-resp ). You can match the fields in the HTTP request or response header (match header) or body (match body). You can match header or body length (match length gt size or match length lt size) or inspect its contents and match it with a regular expression (match regex parameter-name). You can also test individual fields in the request or response header, comparing them with a regular expression (match header fieldname regex parameter-name), checking whether the response values match the request values, or checking for potential protocol violations. Finally, several generic match commands are listed in Table 5-4. TABLE 5-4 Matching HTTP Requests and Responses Command Syntax Description match request uri regex name Matches the web address (URI) with a regular expression match request arg regex name Matches the HTTP request arguments with a regular expression match request method Matches the HTTP method in the request (GET, POST ) http-method-name match request port-misuse Identifies potential misuses of HTTP by tunneling, peer-to-peer, or instantim p2p tunneling any messaging applications match response status-line Matches the status of the HTTP response (for example, 200 = OK, 403 = forbidden, regex name 404 = not found) Contrary to many other Cisco IOS features where you just enter the regular expression you need, the HTTP-specific match commands use a new object named regex parameter-map, which is configured with the commands in Table 5-5.

88 [ 88 ] CHAPTER 5 Advanced Zone- Based Policy Firewall Configuration TABLE 5-5 Command Syntax Configuring Regular Expression Parameter Maps parameter-map type regex name pattern regex Description Creates a new regular expression parameter map. Specifies the pattern to match. Multiple patterns can be specified in the same parameter-map. The extensive set of match commands would let you believe that you can easily match almost any web-related condition on the firewall. The reality is a bit different due to very limited syntax of the class-map and policy-map commands: Hierarchical HTTP-specific class maps are not supported. You can thus only match on all conditions (match-all) or any of them (match-any). There is no mechanism to build more complex logical expressions with the class maps. Negation in a class map is not supported. It s thus impossible to identify an HTTP request not matching a condition. You cannot attach an action to the class-default of the HTTP-specific policy map. You are thus forced to define a bogus match-all class to be able to attach an action to it. Effectively, the configuration syntax only allows you to specify a logical condition that is an OR of multiple conditions, each of those being an OR or an AND of the various match conditions. Configuring Simple HTTP Inspection Consider, for example, the simple LAN-to-Internet firewall with no traffic restrictions (from Chapter 3) that was improved in the previous section (Figure 5-3). Now the IT manager would like to implement a simple HTTP inspection policy: HTTP misuses and uncommon HTTP commands (anything but GET, POST, and HEAD) shall be denied. To configure this requirement, you have to perform the following configuration steps (final configuration is in Listing 5-17): class-map validhttpcommands is defined to match all allowed HTTP request methods. class-map httpportmisuse is defined to match any misuses of TCP port 80.

89 [ 89 ] CHAPTER 5 Advanced Zone- Based Policy Firewall Configuration class-map anyotherhttp matches all HTTP traffic, effectively replacing the class-default. policy-map validhttp defines the HTTP inspection policy. The TCP session is reset when a port misuse is detected or when the HTTP request method does not match one of the allowed methods. A new inspect class-map is defined to match the HTTP traffic and is appended at the end of the existing InsideToOutside policy map (just in front of the class-default line). NOTE Adding an unrelated condition (for example, allowing only the three request methods and only the content types text/* and image/*) would result in a large set of class maps and a complex policy map, because you would have to match each combination of method and content type individually with a separate match-all class map and then list all of them in the policy map. LISTING 5-17 Implementing Simple HTTP Inspection class-map type inspect http match-any validhttpcommands match request method get match request method post match request method head class-map type inspect http match-any httpportmisuse match request port-misuse any class-map type inspect http match-any anyotherhttp policy-map type inspect http validhttp class type inspect http httpportmisuse reset log class type inspect http validhttpcommands allow class type inspect http anyotherhttp reset class-map type inspect match-any httptraffic match protocol http continues

90 CHAPTER 5 Advanced Zone- Based Policy Firewall Configuration LISTING 5-17 Implementing Simple HTTP Inspection continued policy-map type inspect InsideToOutside class type inspect httptraffic inspect service-policy http validhttp [ 90 ] Configuring User-Defined Protocols In many firewall scenarios, you have to identify nonstandard protocols (or protocols not yet recognized by Cisco IOS) or standard protocols operating on nonstandard port numbers. A common requirement is the support for HTTP proxy servers, which usually operate on TCP port For example, to implement a firewall with proxy server in the perimeter network, the firewall policy configuration shall allow TCP sessions to port 8080 of the proxy server (Figure 5-4). FIGURE 5-4 Proxy access to external web server Client Outside Internet Request on port 8080 Inside Request on port 80 External Web Server Proxy Web Server Perimeter

91 [ 91 ] CHAPTER 5 Advanced Zone- Based Policy Firewall Configuration You could solve this challenge with existing configuration commands by defining an extended IP access list and a class map based on the access list (similar to how we ve recognized ICMP echo packets in previous configurations), or you could define a user-defined protocol with the ip port-map command (see the syntax in Table 5-6). TABLE 5-6 Defining Nonstandard TCP or UDP Port Use Command Syntax Description ip port-map user-protocol-name Specifies port usage for a user-defined protocol. The protocol name must start with the userport {tcp udp} port-number prefix to ensure there is no overlap with future protocol additions to Cisco IOS. ip port-map protocol port Specifies a nonstandard TCP or UDP port for a protocol recognized by Cisco IOS. {tcp udp} port-number In the sample firewall, you could define your own protocol on TCP port 8080 and use it in a class map in a configuration similar to the one in Listing LISTING 5-18 Configuring a User-Defined Protocol ip port-map user-proxyhttp port tcp 8080 class-map type inspect match-all proxyhttp match protocol user-proxyhttp policy-map type inspect InsideToPerimeter class type inspect proxyhttp matches TCP port 8080 inspect cannot use HTTP service policy class type inspect ping inspect

92 [ 92 ] CHAPTER 5 Advanced Zone- Based Policy Firewall Configuration NOTE Adding TCP or UDP ports to standard protocols with the ip portmap command affects other Cisco IOS features that use the port map functionality (for example, Network-Based Application Recognition [NBAR]). When you define your own protocol, you cannot use extended features Cisco IOS supports for standard protocols. For example, if you configure FTP on a nonstandard port as a user-defined protocol, Cisco IOS will not recognize its data sessions. You also cannot use DPI for a user-defined protocol. In both cases, specifying additional port numbers for standard protocols is preferred. So, if you want to use DPI of requests made from inside clients to the proxy server, you should define an additional port for the HTTP protocol (Listing 5-19). LISTING 5-19 Configuring Additional Port Numbers for a Standard Protocol ip port-map http port tcp 8080 class-map type inspect match-all web match protocol http policy-map type inspect InsideToPerimeter class type inspect web matches TCP port 80 and port 8080 inspect can use HTTP service policy class type inspect ping inspect After you define additional port numbers for standard protocols, any match protocol command will match these port numbers as well. If you want to limit a traffic class to the standard port number (for example, when matching inbound traffic for the public web server), you have to combine the match protocol command with an access list (Listing 5-20). LISTING 5-20 Defining the WebTraffic Class class-map type inspect WebTraffic match protocol http match access-group name WebPort80 ip access-list extended WebPort80 permit tcp any any eq www

93 [ 93 ] CHAPTER 5 Advanced Zone- Based Policy Firewall Configuration Summary In this chapter, you ve seen how you can use advanced configuration commands of the zone-based policy firewall configuration to do the following: Generate an audit log of inspected sessions with a parameter-map type inspect containing the audit on parameter. Configure DoS-prevention parameters with a parameter map. Identify peer-to-peer and instant-messaging applications even when they use port numbers reserved for other applications. Configure firewall policies for POP3, IMAP, SMTP, HTTP, peer-to-peer, and instant-messaging applications. Configure user-defined protocols or add nonstandard TCP or UDP port numbers to protocols already recognized by Cisco IOS with the ip port-map command.

94 CHAPTER 6 Configuring Transparent Firewalls FIGURE 6-1 Physical firewall structure CHAPTER SIX Configuring Transparent Firewalls Cisco IOS Release 12.3(7)T introduced the transparent firewall feature: the ability to filter IP traffic between a pair of bridged interfaces. This feature is fully supported by the new zone-based configuration commands, making transparent firewall configuration extremely simple. Before configuring this interesting feature (which introduces no additional configuration commands), you have to understand its underlying mechanisms and design rules, which we cover in depth in this chapter. Throughout most of the examples, we focus on a slightly modified version of the firewall with a perimeter network introduced in Chapter 4, Case Study: Firewall with a Perimeter Network (Figure 6-1). Client Inside VLAN 516 Perimeter VLAN 518 Web/Mail Server Outside Internet [ 94 ] Protecting Internal Servers: Alternate Design Case Study: Migrating a Server to the Perimeter Network Server Inside VLAN 517 VLAN trunk

95 [ 95 ] CHAPTER 6 Configuring Transparent Firewalls NOTE It s a bad idea to connect inside and perimeter or outside devices to the same switch because they might end up being directly connected if the switch loses its configuration. However, if your router has a single physical LAN interface, that might be the only solution. Our organization has built a switched LAN network with all clients and servers residing in one IP subnet. It has successfully implemented the external firewall and wants to increase the security of its internal LAN by isolating servers from the end users and giving only the network administrators privileged access to the servers. Traditionally, to implement this requirement, you would split the network into three subnets (requiring at least partial renumbering of the network) and install a firewall in the middle. In not-so-well-managed LAN environments, where the DNS and DHCP services are intermingled with static IP address and hostnames entered in hosts files, renumbering might not be a viable option. In the new firewall design, the inside clients and servers have been split into two separate VLANs, and the perimeter network is connected to a third VLAN, all three of them being connected to the firewall router with a VLAN trunk. (VLAN configuration on the router is included in Listing 6-1.) The client and the server host are in the same IP subnet, so the traffic between them has to be bridged. The firewall should thus perform interzone checks both on routed and bridged IP traffic. LISTING 6-1 VLAN Configuration on the Firewall Router interface FastEthernet0/0 description Trunk to the LAN switch interface FastEthernet0/0.1 encapsulation dot1q 516 description Client VLAN interface FastEthernet0/0.5 encapsulation dot1q 517 description Server VLAN interface FastEthernet0/0.100 encapsulation dot1q 518 description Perimeter VLAN

96 [ 96 ] CHAPTER 6 Configuring Transparent Firewalls NOTE For the remainder of the router configuration, including Network Address Translation (NAT) configuration, see Chapter 4. The Cisco IOS transparent firewall relies on the integrated routing and bridging (IRB) infrastructure, where a group of bridged ports is treated as a logical IP interface. To configure IRB, perform the following steps: Step 1. Step 2. Step 3. Step 4. Step 5. Enable integrated routing and bridging with the bridge irb command. Create a bridge group and specify its spanning tree protocol with the bridge number protocol protocol command. Assign all bridged interfaces into the bridge group with the bridge-group number command. Configure IP routing for the bridge group with the bridge number route ip command. Configure a virtual IP interface representing the router s attachment to the bridge group with the interface bvi number command. Listing 6-2 shows the IRB configuration of the firewall router. After these configuration commands, the router performs two distinct logical functions: It bridges between two interfaces and routes between BVI1, FastEthernet0/0.100, and the serial interface (see Figure 6-2). LISTING 6-2 IRB and IP Configuration of the Firewall Router bridge irb interface FastEthernet0/0.1 bridge-group 1 interface FastEthernet0/0.5 bridge-group 1 interface FastEthernet0/0.100 ip address ip nat inside continues

97 CHAPTER 6 Configuring Transparent Firewalls LISTING 6-2 IRB and IP Configuration of the Firewall Router continued interface BVI1 ip address ip nat inside bridge 1 protocol ieee bridge 1 route ip [ 97 ] FIGURE 6-2 Logical structure of the firewall router FastEthernet 0/ /24 BVI /24 VLAN 516 FastEthernet 0/0.100 VLAN 517 Serial 0/0.100 Firewall Router /30 FastEthernet 0/0.5 The packets traversing the router thus take one of the following paths: If the packet arrives through one of the bridged interfaces and the destination MAC address is not the router s own MAC address, it s bridged according to the entries in the bridge forwarding database (displayed with the show bridge number command).

98 CHAPTER 6 Configuring Transparent Firewalls If the packet arrives through one of the bridge interfaces with the router s MAC address as the destination MAC address, it s routed as if it were received through the BVI interface. The physical interface through which the packet has been received is mostly ignored in the routing process. NOTE BVI interface configuration is considered when routing these packets. For example, if you configure ip access-group in on the physical interface and the BVI interface, only the one on the BVI interface is applied. If the packet arrives through any other interface and is routed to the BVI interface, the outbound configuration of the BVI interface is applied (for example, the IP access list is checked, NAT translation is performed, and so on), and then the packet is bridged into the bridge group (which might involve flooding the packet if the ARP cache entry is still valid, but the destination MAC address is not available in the bridge forwarding database). The transparent firewall feature of Cisco IOS can now be applied to the bridged interfaces by assigning them to security zones. For example, you can create two new zones (clients and servers) and assign VLAN 516 to the clients zone and VLAN 517 to the servers zone (Listing 6-3). The BVI1 interface is obviously assigned to the inside zone. [ 98 ] LISTING 6-3 Zone Assignments of the Inside Physical and Logical Interfaces zone security Inside zone security Clients zone security Servers class-map type inspect match-any Exchange match protocol msrpc match protocol imap match protocol imaps match protocol pop3 match protocol pop3s match protocol smtp match protocol ldap match protocol ldaps class-map type inspect match-any Netbios continues

99 CHAPTER 6 Configuring Transparent Firewalls LISTING 6-3 Zone Assignments of the Inside Physical and Logical Interfaces continued match protocol netbios-ns match protocol netbios-ssn match protocol netbios-dgm class-map type inspect match-any SQLServer match protocol ms-sql policy-map type inspect ServerTraffic class type inspect SQLServer inspect class type inspect Netbios inspect class type inspect Exchange inspect class class-default drop zone-pair security ClientsToServers source Clients destination Servers service-policy type inspect ServerTraffic interface FastEthernet0/0.1 zone-member security Clients interface FastEthernet0/0.5 zone-member security Servers interface BVI1 zone-member security Inside [ 99 ]

100 [ 100 ] CHAPTER 6 Configuring Transparent Firewalls FIGURE 6-3 Resulting firewall structure When defining the interzone policies, you have to define rules for traffic crossing from the clients zone to the servers zone (in our example, we allowed NetBIOS, SQL Server, and Outlook traffic from clients to the server) and vice versa (in our example, no sessions are allowed to be established from the servers toward the clients), but not between clients (or servers) and outside (or perimeter). This is a bit startling at first glance, but not if you consider the switching path a packet takes in the router: When a packet is bridged between the Fast Ethernet interfaces, it s considered to be crossing between the clients and servers zones. When a packet arrives through the bridged interfaces and is routed to another subnet, it s considered to be arriving through the BVI1 interface (thus from the inside zone). It looks like a router would be split in two separate firewalls, one operating on the bridged level, and another one on the routed level (see Figure 6-3). Clients VLAN 516 BVI 1 Perimeter /24 FastEthernet 0/0.100 Inside /24 Serial 0/0.100 Servers VLAN 517 Outside /30 Using the transparent firewall feature in our sample firewall, you can filter the communication between the clients and the servers residing in separate VLANs, but you cannot use the clients and servers zones to limit traffic that these two groups of hosts are allowed to send to or receive from the perimeter or outside zones. If these hosts send the traffic to another

101 [ 101 ] CHAPTER 6 Configuring Transparent Firewalls routed zone, it appears as if the traffic is coming from the inside zone, so the only way to differentiate between clients and servers when routing IP traffic is to define traffic classes used in the inside zone based on their IP addresses. In our example, we would have to extend the configuration from Chapter 4 by defining new traffic classes covering traffic toward the server or originating from the server and inserting them at the beginning of corresponding policy maps: Class map AllServerTraffic covers all routed traffic to and from the server. This class is used as a catchall class that drops all sessions that are not explicitly allowed. Class map MailFromInside covers SMTP traffic from inside server to perimeter server. There is no need for new classes covering traffic from outside or perimeter zones into the inside zone; no sessions are allowed from outside to inside anyway and the existing configuration of PerimeterToInside policy map (Listing 4-4) already filters traffic based on the server s IP address. The new classes are inserted at the beginning of the existing InsideToPerimeter policy map. (See Listing 4-4 for the complete configuration.) The InsideToOutside policy map is also modified to prevent session establishment from the server to the outside zone. The modified firewall policy is included in Listing 6-4. As you can see, mixing IP hosts with different security requirements in the same security zone (which is obviously against the rules we established in Chapter 2, Typical Zone-Based Firewall Designs, but is necessary because our design requirements and implementation details of the transparent firewall) degrades the concept of security zones to the complexity of building firewalls with IP access lists (most obvious in the InsideToPerimeter policy map).

102 CHAPTER 6 Configuring Transparent Firewalls LISTING 6-4 Modified Firewall Policy for the Inside-to-Perimeter Zone Pair class-map type inspect match-all MailFromInside match protocol smtp match access-group name ServerAccess class-map type inspect match-all AllServerTraffic match access-group name ServerAccess ip access-list extended ServerAccess permit ip any host permit ip host any policy-map type inspect InsideToOutside class type inspect AllServerTraffic drop class type inspect WebTraffic defined in Chapter 4 inspect class type inspect FileTransfer inspect policy-map type inspect InsideToPerimeter class type inspect MailFromInside inspect class type inspect AllServerTraffic drop class type inspect PublicTraffic defined in Chapter 4 inspect class type inspect PublicManagement inspect [ 102 ]

103 [ 103 ] CHAPTER 6 Configuring Transparent Firewalls NOTE Adding a second firewall in the inside network also slightly increases the security of the solution (defense-in-depth principle); if an intruder gains access to the outside firewall or breaks through its defenses, the internal firewall still protects the servers. Protecting Internal Servers: Alternate Design The previous discussion of the transparent firewall behavior might have led you to believe that it has only marginal usability for our case study. This is the completely wrong impression; it s counterintuitive only when used in a combined routed/bridged environment. As an alternative, cleaner design, you could deploy the second physical firewall between the servers and the clients, operating it in bridged-only mode. To illustrate the dilemmas arising in a mixed bridged/routed environment, we will also add the administrators zone (VLAN 515) that has privileged access to the servers (Figure 6-4). In the modified design, we still have three VLANs (servers, administrators, and clients) in the same IP subnet, so IRB is still needed to connect them. Ideally, both the inside and outside firewall would connect to all relevant VLANs (inside firewall to all three of them, outside firewall to clients and servers). However, with the introduction of the inter-vlan bridge in the inside firewall, IRB can no longer be used on the outside firewall, because the attachment of two inter- VLAN bridges to the same VLANs would create a bridging loop, and at least one subinterface on the inside or outside firewall would be disabled, resulting in suboptimal traffic flow (Figure 6-5). FIGURE 6-4 Second firewall added to the LAN network physical connectivity diagram Administrators Outside Internet Servers Inside Clients Perimeter Web/Mail Server

104 [ 104 ] CHAPTER 6 Configuring Transparent Firewalls FIGURE 6-5 Bridging loop in the redesigned network VLAN 515 Administrators Inside Router VLAN 516 Clients Firewall Router The easiest way out of this problem is to give administrators VLAN access to the firewall router through the clients VLAN, resulting in the logical firewall structure in Figure 6-6. (The switch physically connecting end devices to VLANs has been removed from the diagram for clarity.) The outside firewall router can then use the unmodified configuration from Chapter 4, and the inside firewall performs interzone traffic control on bridged traffic between internal VLANs. FIGURE 6-6 Final firewall structure logical connectivity diagram Administrators Outside Internet Servers Inside Clients Perimeter Web/Mail Server

105 [ 105 ] CHAPTER 6 Configuring Transparent Firewalls NOTE When configuring firewall policies, do not forget that the administrators have to pass through the clients zone to get to the Internet. The inside firewall does not need IP routing at all, so it can be disabled if desired. IRB should be configured to give the device a single IP address reachable through all interfaces. The firewall zones can then be configured and attached to subinterfaces (Listing 6-5). After the initial configuration, you would create traffic classes, define firewall policies, and apply them to zone pairs as explained in the previous chapters. LISTING 6-5 Initial Configuration of the Inside Firewall no ip routing bridge irb zone security Administrators zone security Servers zone security Clients interface FastEthernet0/0.1 encapsulation dot1q 516 description Client VLAN bridge-group 1 zone-member security Clients interface FastEthernet0/0.1 encapsulation dot1q 515 description Administrators VLAN bridge-group 1 zone-member security Administrators interface FastEthernet0/0.5 encapsulation dot1q 517 description Server VLAN continues

106 [ 106 ] CHAPTER 6 Configuring Transparent Firewalls LISTING 6-5 Initial Configuration of the Inside Firewall continued bridge-group 1 zone-member security Servers interface BVI1 ip address bridge 1 protocol ieee bridge 1 route ip Case Study: Migrating a Server to the Perimeter Network In this case study, you ll see how you can use IP routing tricks to work around the limitations of the transparent firewall. Consider the network in Figure 6-7, where the public server is attached to the same LAN as the internal clients. Obviously, this is a large security risk (an intruder gaining access to the public server could immediately explore the internal LAN), so the administrator would like to move the server to the perimeter network. Assuming that IP renumbering is not possible, a transparent firewall would be an ideal solution. However, because of its limitations, it would be impossible to apply a clean three-zone design from Chapter 4 to this scenario.

107 [ 107 ] CHAPTER 6 Configuring Transparent Firewalls FIGURE 6-7 Initial network design Public Server Outside dns.isp.com smtp.isp.com / / Internet Inside The best solution in this case study is to use three IP subnets on the firewall as in Chapter 4 and rely on the local area mobility feature introduced in Cisco IOS Release 11.0 to insert a host route toward the public server in the perimeter network (see the Local Area Mobility White Paper and Cisco IOS documentation for more details), as illustrated in Figure 6-8. FIGURE 6-8 Firewall design using local area mobility Client Outside Internet Inside /24 Public Server Perimeter / /24 Host route to public server

108 [ 108 ] CHAPTER 6 Configuring Transparent Firewalls The local area mobility feature is configured with the ip mobile arp command. Apart from that command, the IP routing configuration of the firewall is similar to the one from Chapter 4 (Listing 6-6). NOTE You could also use a static route pointing to the perimeter interface (ip route FastEthernet0/0.5) rather than local area mobility. Local area mobility might not work on all router platforms. LISTING 6-6 Configuration of Inside Interfaces on the Firewall Router hostname fw interface Loopback1 ip address interface FastEthernet0/0 description Inside network ip address ip nat inside interface FastEthernet0/0.5 description Public Web server (Perimeter network) encapsulation dot1q 100 ip address ip nat inside ip mobile arp access-group PublicServerAddresses interface Serial0/0/0 no ip address encapsulation frame-relay interface Serial0/0/0.100 point-to-point description Link to the Internet ip address continues

109 [ 109 ] CHAPTER 6 Configuring Transparent Firewalls LISTING 6-6 Configuration of Inside Interfaces on the Firewall Router continued ip nat outside frame-relay interface-dlci 100 ip route Serial0/0/0.100 ip nat pool Internet prefix-length 28 ip nat inside source static ip nat source list InternalHosts pool Internet ip nat inside source list InternalHosts pool Internet list all IP addresses of the public servers in the following access-list ip access-list standard PublicServerAddresses permit host ip access-list standard InternalHosts permit After you ve configured the local area mobility, you can check the proper insertion of the host routes with the show ip route mobile command and debug its operation with debug arp and debug ip mobile local-area (Listing 6-7). LISTING 6-7 Debugging and Monitoring Local Area Mobility fw#debug arp ARP packet debugging is on fw#debug ip mobile local-area IP local-area mobility debugging is on fw# continues

110 [ 110 ] CHAPTER 6 Configuring Transparent Firewalls LISTING 6-7 Debugging and Monitoring Local Area Mobility continued 04:02:45: Local MobileIP: FastEthernet0/0.5 add accepted 04:02:45: IP ARP: rcvd req src f50, dst FastEthernet0/0.5 04:02:45: Local MobileIP: FastEthernet0/0.5 add accepted 04:02:45: Local MobileIP: route added 04:02:45: IP ARP: sent rep src c58, dst f50 FastEthernet0/0.5 fw#show ip route mobile is variably subnetted, 3 subnets, 2 masks M [3/1] via , 00:36:24, FastEthernet0/0.5 After you ve successfully configured and tested local area mobility, you have a working firewall with three routed interfaces. You can complete the configuration using zones, traffic classes, and policies similar to those in Chapter 4. Summary In this chapter, you ve seen how you can configure the Cisco IOS transparent firewall using the zone-based configuration commands. When designing the zone-based transparent firewall, keep in mind these guidelines: Only a single zone pair is checked for every packet traversing the router. If a packet is bridged through the router, the router checks the zone pair policy configured between the physical interface zones. If a packet is routed, the router checks the zone pair policy between the zones of the BVI interface and the outbound IP interface. If a packet is sent to the router itself, the router checks the zone pair policy between the zone of the BVI interface and the self zone.

111 CHAPTER 6 Configuring Transparent Firewalls Configuring a zone pair between a bridged and a routed zone makes no sense (because it will never be used). Although you could, do not apply the same zone on bridged and routed interfaces; that will only lead to confusion. [ 111 ]

112 [ 112 ] Deploying Zone-Based Firewalls Ivan Pepelnjak Copyright 2007 Cisco Published by: Cisco Press 800 East 96th Street Indianapolis, IN USA All rights reserved. No part of this digital short cut may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or by any information storage and retrieval system, without written permission from the publisher, except for the inclusion of brief quotations in a review. Printed in the United States of America First Printing October 2006 ISBN: Feedback Information At Cisco Press, our goal is to create in-depth technical books of the highest quality and value. Each book is crafted with care and precision, undergoing rigorous development that involves the unique expertise of members from the professional technical community. Readers feedback is a natural continuation of this process. If you have any comments regarding how we could improve the quality of this digital short cut or otherwise alter it to better suit your needs, you can contact us through at [email protected]. Please make sure to include the digital short cut title and ISBN in your message. We greatly appreciate your assistance. Corporate and Government Sales Cisco Press offers excellent discounts on this digital short cut when ordered in quantity for bulk purchases or special sales. For more information please contact: U.S. Corporate and Government Sales [email protected] For sales outside the U.S. please contact: International Sales [email protected] Warning and Disclaimer This digital short cut is designed to provide information about network security. Every effort has been made to make this digital short cut as complete and as accurate as possible, but no warranty or fitness is implied. The information is provided on an as is basis. The author, Cisco Press, and Cisco shall have neither liability nor responsibility to any person or entity with respect to any loss or damages arising from the information contained in this digital short cut. The opinions expressed in this digital short cut belong to the author and are not necessarily those of Cisco. Trademark Acknowledgments All terms mentioned in this digital short cut that are known to be trademarks or service marks have been appropriately capitalized. Cisco Press or Cisco cannot attest to the accuracy of this information. Use of a term in this digital short cut should not be regarded as affecting the validity of any trademark or service mark.

shortcut Tap into learning NOW! Visit www.informit.com/shortcuts for a complete list of Short Cuts. Your Short Cut to Knowledge

shortcut Tap into learning NOW! Visit www.informit.com/shortcuts for a complete list of Short Cuts. Your Short Cut to Knowledge shortcut Your Short Cut to Knowledge The following is an excerpt from a Short Cut published by one of the Pearson Education imprints. Short Cuts are short, concise, PDF documents designed specifically

More information

Internetwork Expert s CCNA Security Bootcamp. IOS Firewall Feature Set. Firewall Design Overview

Internetwork Expert s CCNA Security Bootcamp. IOS Firewall Feature Set. Firewall Design Overview Internetwork Expert s CCNA Security Bootcamp IOS Firewall Feature Set http:// Firewall Design Overview Firewall defines traffic interaction between zones or trust levels e.g. ASA security-level Common

More information

A host-based firewall can be used in addition to a network-based firewall to provide multiple layers of protection.

A host-based firewall can be used in addition to a network-based firewall to provide multiple layers of protection. A firewall is a software- or hardware-based network security system that allows or denies network traffic according to a set of rules. Firewalls can be categorized by their location on the network: A network-based

More information

Firewalls. Chapter 3

Firewalls. Chapter 3 Firewalls Chapter 3 1 Border Firewall Passed Packet (Ingress) Passed Packet (Egress) Attack Packet Hardened Client PC Internet (Not Trusted) Hardened Server Dropped Packet (Ingress) Log File Internet Border

More information

Firewall Technologies. Access Lists Firewalls

Firewall Technologies. Access Lists Firewalls Firewall Technologies Access Lists Firewalls ACLs Standard Extended Numbered Named Stateful Tables to track real-time state of end-end sessions Session oriented nature of network traffic TCP established

More information

IOS Zone Based Firewall Step-by-Step Basic Configuration

IOS Zone Based Firewall Step-by-Step Basic Configuration IOS Zone Based Firewall Step-by-Step Basic Configuration Introduction The Cisco IOS Zone Based Firewall is one of the most advanced form of Stateful firewall used in the Cisco IOS devices. The zone based

More information

Basic Network Configuration

Basic Network Configuration Basic Network Configuration 2 Table of Contents Basic Network Configuration... 25 LAN (local area network) vs WAN (wide area network)... 25 Local Area Network... 25 Wide Area Network... 26 Accessing the

More information

The Cisco IOS Firewall feature set is supported on the following platforms: Cisco 2600 series Cisco 3600 series

The Cisco IOS Firewall feature set is supported on the following platforms: Cisco 2600 series Cisco 3600 series Cisco IOS Firewall Feature Set Feature Summary The Cisco IOS Firewall feature set is available in Cisco IOS Release 12.0. This document includes information that is new in Cisco IOS Release 12.0(1)T, including

More information

Proxy Server, Network Address Translator, Firewall. Proxy Server

Proxy Server, Network Address Translator, Firewall. Proxy Server Proxy Server, Network Address Translator, Firewall 1 Proxy Server 2 1 Introduction What is a proxy server? Acts on behalf of other clients, and presents requests from other clients to a server. Acts as

More information

Securizarea Calculatoarelor și a Rețelelor 13. Implementarea tehnologiei firewall CBAC pentru protejarea rețelei

Securizarea Calculatoarelor și a Rețelelor 13. Implementarea tehnologiei firewall CBAC pentru protejarea rețelei Platformă de e-learning și curriculă e-content pentru învățământul superior tehnic Securizarea Calculatoarelor și a Rețelelor 13. Implementarea tehnologiei firewall CBAC pentru protejarea rețelei Firewall

More information

FIREWALLS & CBAC. [email protected]

FIREWALLS & CBAC. philip.heimer@hh.se FIREWALLS & CBAC [email protected] Implementing a Firewall Personal software firewall a software that is installed on a single PC to protect only that PC All-in-one firewall can be a single device that

More information

CMPT 471 Networking II

CMPT 471 Networking II CMPT 471 Networking II Firewalls Janice Regan, 2006-2013 1 Security When is a computer secure When the data and software on the computer are available on demand only to those people who should have access

More information

Computer Security CS 426 Lecture 36. CS426 Fall 2010/Lecture 36 1

Computer Security CS 426 Lecture 36. CS426 Fall 2010/Lecture 36 1 Computer Security CS 426 Lecture 36 Perimeter Defense and Firewalls CS426 Fall 2010/Lecture 36 1 Announcements There will be a quiz on Wed There will be a guest lecture on Friday, by Prof. Chris Clifton

More information

Firewall Introduction Several Types of Firewall. Cisco PIX Firewall

Firewall Introduction Several Types of Firewall. Cisco PIX Firewall Firewall Introduction Several Types of Firewall. Cisco PIX Firewall What is a Firewall? Non-computer industries: a wall that controls the spreading of a fire. Networks: a designed device that controls

More information

Classic IOS Firewall using CBACs. 2012 Cisco and/or its affiliates. All rights reserved. 1

Classic IOS Firewall using CBACs. 2012 Cisco and/or its affiliates. All rights reserved. 1 Classic IOS Firewall using CBACs 2012 Cisco and/or its affiliates. All rights reserved. 1 Although CBAC serves as a good foundation for understanding the revolutionary path toward modern zone based firewalls,

More information

Firewall Stateful Inspection of ICMP

Firewall Stateful Inspection of ICMP The feature categorizes Internet Control Management Protocol Version 4 (ICMPv4) messages as either malicious or benign. The firewall uses stateful inspection to trust benign ICMPv4 messages that are generated

More information

642 523 Securing Networks with PIX and ASA

642 523 Securing Networks with PIX and ASA 642 523 Securing Networks with PIX and ASA Course Number: 642 523 Length: 1 Day(s) Course Overview This course is part of the training for the Cisco Certified Security Professional and the Cisco Firewall

More information

We will give some overview of firewalls. Figure 1 explains the position of a firewall. Figure 1: A Firewall

We will give some overview of firewalls. Figure 1 explains the position of a firewall. Figure 1: A Firewall Chapter 10 Firewall Firewalls are devices used to protect a local network from network based security threats while at the same time affording access to the wide area network and the internet. Basically,

More information

Security Technology: Firewalls and VPNs

Security Technology: Firewalls and VPNs Security Technology: Firewalls and VPNs 1 Learning Objectives Understand firewall technology and the various approaches to firewall implementation Identify the various approaches to remote and dial-up

More information

Chapter 12 Supporting Network Address Translation (NAT)

Chapter 12 Supporting Network Address Translation (NAT) [Previous] [Next] Chapter 12 Supporting Network Address Translation (NAT) About This Chapter Network address translation (NAT) is a protocol that allows a network with private addresses to access information

More information

Firewall Stateful Inspection of ICMP

Firewall Stateful Inspection of ICMP The feature addresses the limitation of qualifying Internet Control Management Protocol (ICMP) messages into either a malicious or benign category by allowing the Cisco IOS firewall to use stateful inspection

More information

Virtual private network. Network security protocols VPN VPN. Instead of a dedicated data link Packets securely sent over a shared network Internet VPN

Virtual private network. Network security protocols VPN VPN. Instead of a dedicated data link Packets securely sent over a shared network Internet VPN Virtual private network Network security protocols COMP347 2006 Len Hamey Instead of a dedicated data link Packets securely sent over a shared network Internet VPN Public internet Security protocol encrypts

More information

Firewalls. Ingress Filtering. Ingress Filtering. Network Security. Firewalls. Access lists Ingress filtering. Egress filtering NAT

Firewalls. Ingress Filtering. Ingress Filtering. Network Security. Firewalls. Access lists Ingress filtering. Egress filtering NAT Network Security s Access lists Ingress filtering s Egress filtering NAT 2 Drivers of Performance RequirementsTraffic Volume and Complexity of Static IP Packet Filter Corporate Network The Complexity of

More information

Troubleshooting the Firewall Services Module

Troubleshooting the Firewall Services Module 25 CHAPTER This chapter describes how to troubleshoot the FWSM, and includes the following sections: Testing Your Configuration, page 25-1 Reloading the FWSM, page 25-6 Performing Password Recovery, page

More information

Firewalls and VPNs. Principles of Information Security, 5th Edition 1

Firewalls and VPNs. Principles of Information Security, 5th Edition 1 Firewalls and VPNs Principles of Information Security, 5th Edition 1 Learning Objectives Upon completion of this material, you should be able to: Understand firewall technology and the various approaches

More information

8. Firewall Design & Implementation

8. Firewall Design & Implementation DMZ Networks The most common firewall environment implementation is known as a DMZ, or DeMilitarized Zone network. A DMZ network is created out of a network connecting two firewalls; i.e., when two or

More information

Lab 3.8.3 Configure Cisco IOS Firewall CBAC on a Cisco Router

Lab 3.8.3 Configure Cisco IOS Firewall CBAC on a Cisco Router Lab 3.8.3 Configure Cisco IOS Firewall CBAC on a Cisco Router Objective Scenario Topology Estimated Time: 35 minutes Number of Team Members: Two teams with four students per team In this lab exercise,

More information

Smart Tips. Enabling WAN Load Balancing. Key Features. Network Diagram. Overview. Featured Products. WAN Failover. Enabling WAN Load Balancing Page 1

Smart Tips. Enabling WAN Load Balancing. Key Features. Network Diagram. Overview. Featured Products. WAN Failover. Enabling WAN Load Balancing Page 1 Smart Tips Enabling WAN Load Balancing Overview Many small businesses today use broadband links such as DSL or Cable, favoring them over the traditional link such as T1/E1 or leased lines because of the

More information

Chapter 5. Figure 5-1: Border Firewall. Firewalls. Figure 5-1: Border Firewall. Figure 5-1: Border Firewall. Figure 5-1: Border Firewall

Chapter 5. Figure 5-1: Border Firewall. Firewalls. Figure 5-1: Border Firewall. Figure 5-1: Border Firewall. Figure 5-1: Border Firewall Figure 5-1: Border s Chapter 5 Revised March 2004 Panko, Corporate Computer and Network Security Copyright 2004 Prentice-Hall Border 1. (Not Trusted) Attacker 1 1. Corporate Network (Trusted) 2 Figure

More information

INTRODUCTION TO FIREWALL SECURITY

INTRODUCTION TO FIREWALL SECURITY INTRODUCTION TO FIREWALL SECURITY SESSION 1 Agenda Introduction to Firewalls Types of Firewalls Modes and Deployments Key Features in a Firewall Emerging Trends 2 Printed in USA. What Is a Firewall DMZ

More information

What is a Firewall? Computer Security. Firewalls. What is a Firewall? What is a Firewall?

What is a Firewall? Computer Security. Firewalls. What is a Firewall? What is a Firewall? What is a Firewall? Computer Security Firewalls fire wall 1 : a wall constructed to prevent the spread of fire 2 usually firewall : a computer or computer software that prevents unauthorized access to

More information

Proxies. Chapter 4. Network & Security Gildas Avoine

Proxies. Chapter 4. Network & Security Gildas Avoine Proxies Chapter 4 Network & Security Gildas Avoine SUMMARY OF CHAPTER 4 Generalities Forward Proxies Reverse Proxies Open Proxies Conclusion GENERALITIES Generalities Forward Proxies Reverse Proxies Open

More information

IMPLEMENTATION OF INTELLIGENT FIREWALL TO CHECK INTERNET HACKERS THREAT

IMPLEMENTATION OF INTELLIGENT FIREWALL TO CHECK INTERNET HACKERS THREAT IMPLEMENTATION OF INTELLIGENT FIREWALL TO CHECK INTERNET HACKERS THREAT Roopa K. Panduranga Rao MV Dept of CS and Engg., Dept of IS and Engg., J.N.N College of Engineering, J.N.N College of Engineering,

More information

How Cisco IT Uses Firewalls to Protect Cisco Internet Access Locations

How Cisco IT Uses Firewalls to Protect Cisco Internet Access Locations How Cisco IT Uses Firewalls to Protect Cisco Internet Access Locations Cisco PIX Security Appliance provides stateful firewall protection at smaller Internet gateways. Cisco IT Case Study / Security and

More information

Network Defense Tools

Network Defense Tools Network Defense Tools Prepared by Vanjara Ravikant Thakkarbhai Engineering College, Godhra-Tuwa +91-94291-77234 www.cebirds.in, www.facebook.com/cebirds [email protected] What is Firewall? A firewall

More information

Lab 8.3.13 Configure Cisco IOS Firewall CBAC

Lab 8.3.13 Configure Cisco IOS Firewall CBAC Lab 8.3.13 Configure Cisco IOS Firewall CBAC Objective Scenario Topology In this lab, the students will complete the following tasks: Configure a simple firewall including CBAC using the Security Device

More information

How To Set Up An Ip Firewall On Linux With Iptables (For Ubuntu) And Iptable (For Windows)

How To Set Up An Ip Firewall On Linux With Iptables (For Ubuntu) And Iptable (For Windows) Security principles Firewalls and NAT These materials are licensed under the Creative Commons Attribution-Noncommercial 3.0 Unported license (http://creativecommons.org/licenses/by-nc/3.0/) Host vs Network

More information

Firewalls. Network Security. Firewalls Defined. Firewalls

Firewalls. Network Security. Firewalls Defined. Firewalls Network Security Firewalls Firewalls Types of Firewalls Screening router firewalls Computer-based firewalls Firewall appliances Host firewalls (firewalls on clients and servers) Inspection Methods Firewall

More information

Lecture slides by Lawrie Brown for Cryptography and Network Security, 5/e, by William Stallings, Chapter 22 Firewalls.

Lecture slides by Lawrie Brown for Cryptography and Network Security, 5/e, by William Stallings, Chapter 22 Firewalls. Lecture slides by Lawrie Brown for Cryptography and Network Security, 5/e, by William Stallings, Chapter 22 Firewalls. 1 Information systems in corporations,government agencies,and other organizations

More information

Cisco Secure PIX Firewall with Two Routers Configuration Example

Cisco Secure PIX Firewall with Two Routers Configuration Example Cisco Secure PIX Firewall with Two Routers Configuration Example Document ID: 15244 Interactive: This document offers customized analysis of your Cisco device. Contents Introduction Prerequisites Requirements

More information

Lab Exercise Configure the PIX Firewall and a Cisco Router

Lab Exercise Configure the PIX Firewall and a Cisco Router Lab Exercise Configure the PIX Firewall and a Cisco Router Scenario Having worked at Isis Network Consulting for two years now as an entry-level analyst, it has been your hope to move up the corporate

More information

About Firewall Protection

About Firewall Protection 1. This guide describes how to configure basic firewall rules in the UTM to protect your network. The firewall then can provide secure, encrypted communications between your local network and a remote

More information

Cisco Configuring Commonly Used IP ACLs

Cisco Configuring Commonly Used IP ACLs Table of Contents Configuring Commonly Used IP ACLs...1 Introduction...1 Prerequisites...2 Hardware and Software Versions...3 Configuration Examples...3 Allow a Select Host to Access the Network...3 Allow

More information

Implementing Secure Converged Wide Area Networks (ISCW)

Implementing Secure Converged Wide Area Networks (ISCW) Implementing Secure Converged Wide Area Networks (ISCW) 1 Mitigating Threats and Attacks with Access Lists Lesson 7 Module 5 Cisco Device Hardening 2 Module Introduction The open nature of the Internet

More information

Firewalls. Securing Networks. Chapter 3 Part 1 of 4 CA M S Mehta, FCA

Firewalls. Securing Networks. Chapter 3 Part 1 of 4 CA M S Mehta, FCA Firewalls Securing Networks Chapter 3 Part 1 of 4 CA M S Mehta, FCA 1 Firewalls Learning Objectives Task Statements 1.3 Recognise function of Telecommunications and Network security including firewalls,..

More information

A Model Design of Network Security for Private and Public Data Transmission

A Model Design of Network Security for Private and Public Data Transmission 2011, TextRoad Publication ISSN 2090-424X Journal of Basic and Applied Scientific Research www.textroad.com A Model Design of Network Security for Private and Public Data Transmission Farhan Pervez, Ali

More information

Firewalls. Ahmad Almulhem March 10, 2012

Firewalls. Ahmad Almulhem March 10, 2012 Firewalls Ahmad Almulhem March 10, 2012 1 Outline Firewalls The Need for Firewalls Firewall Characteristics Types of Firewalls Firewall Basing Firewall Configurations Firewall Policies and Anomalies 2

More information

Firewall Firewall August, 2003

Firewall Firewall August, 2003 Firewall August, 2003 1 Firewall and Access Control This product also serves as an Internet firewall, not only does it provide a natural firewall function (Network Address Translation, NAT), but it also

More information

Firewalls (IPTABLES)

Firewalls (IPTABLES) Firewalls (IPTABLES) Objectives Understand the technical essentials of firewalls. Realize the limitations and capabilities of firewalls. To be familiar with iptables firewall. Introduction: In the context

More information

10 Configuring Packet Filtering and Routing Rules

10 Configuring Packet Filtering and Routing Rules Blind Folio 10:1 10 Configuring Packet Filtering and Routing Rules CERTIFICATION OBJECTIVES 10.01 Understanding Packet Filtering and Routing 10.02 Creating and Managing Packet Filtering 10.03 Configuring

More information

- Introduction to Firewalls -

- Introduction to Firewalls - 1 Firewall Basics - Introduction to Firewalls - Traditionally, a firewall is defined as any device (or software) used to filter or control the flow of traffic. Firewalls are typically implemented on the

More information

Polycom. RealPresence Ready Firewall Traversal Tips

Polycom. RealPresence Ready Firewall Traversal Tips Polycom RealPresence Ready Firewall Traversal Tips Firewall Traversal Summary In order for your system to communicate with end points in other sites or with your customers the network firewall in all you

More information

Table of Contents. Cisco Using the Cisco IOS Firewall to Allow Java Applets From Known Sites while Denying Others

Table of Contents. Cisco Using the Cisco IOS Firewall to Allow Java Applets From Known Sites while Denying Others Cisco IOS Firewall to Allow Java Applets From Known Sites w Table of Contents Using the Cisco IOS Firewall to Allow Java Applets From Known Sites while Denying Others...1 Introduction...1 To Deny Java

More information

Troubleshooting the Firewall Services Module

Troubleshooting the Firewall Services Module CHAPTER 25 This chapter describes how to troubleshoot the FWSM, and includes the following sections: Testing Your Configuration, page 25-1 Reloading the FWSM, page 25-6 Performing Password Recovery, page

More information

CSCE 465 Computer & Network Security

CSCE 465 Computer & Network Security CSCE 465 Computer & Network Security Instructor: Dr. Guofei Gu http://courses.cse.tamu.edu/guofei/csce465/ Firewall 1 Basic firewall concept Roadmap Filtering firewall Proxy firewall Network Address Translation

More information

ACADEMIA LOCAL CISCO UCV-MARACAY CONTENIDO DE CURSO CURRICULUM CCNA. SEGURIDAD SEGURIDAD EN REDES. NIVEL I. VERSION 2.0

ACADEMIA LOCAL CISCO UCV-MARACAY CONTENIDO DE CURSO CURRICULUM CCNA. SEGURIDAD SEGURIDAD EN REDES. NIVEL I. VERSION 2.0 ACADEMIA LOCAL CISCO UCV-MARACAY CONTENIDO DE CURSO CURRICULUM CCNA. SEGURIDAD SEGURIDAD EN REDES. NIVEL I. VERSION 2.0 Module 1: Vulnerabilities, Threats, and Attacks 1.1 Introduction to Network Security

More information

CSE331: Introduction to Networks and Security. Lecture 12 Fall 2006

CSE331: Introduction to Networks and Security. Lecture 12 Fall 2006 CSE331: Introduction to Networks and Security Lecture 12 Fall 2006 Announcements Midterm I will be held Friday, Oct. 6th. True/False Multiple Choice Calculation Short answer Short essay Project 2 is on

More information

NEFSIS DEDICATED SERVER

NEFSIS DEDICATED SERVER NEFSIS TRAINING SERIES Nefsis Dedicated Server version 5.2.0.XXX (DRAFT Document) Requirements and Implementation Guide (Rev5-113009) REQUIREMENTS AND INSTALLATION OF THE NEFSIS DEDICATED SERVER Nefsis

More information

Firewalls. Test your Firewall knowledge. Test your Firewall knowledge (cont) (March 4, 2015)

Firewalls. Test your Firewall knowledge. Test your Firewall knowledge (cont) (March 4, 2015) s (March 4, 2015) Abdou Illia Spring 2015 Test your knowledge Which of the following is true about firewalls? a) A firewall is a hardware device b) A firewall is a software program c) s could be hardware

More information

83-10-41 Types of Firewalls E. Eugene Schultz Payoff

83-10-41 Types of Firewalls E. Eugene Schultz Payoff 83-10-41 Types of Firewalls E. Eugene Schultz Payoff Firewalls are an excellent security mechanism to protect networks from intruders, and they can establish a relatively secure barrier between a system

More information

Internet Firewall CSIS 3230. Internet Firewall. Spring 2012 CSIS 4222. net13 1. Firewalls. Stateless Packet Filtering

Internet Firewall CSIS 3230. Internet Firewall. Spring 2012 CSIS 4222. net13 1. Firewalls. Stateless Packet Filtering Internet Firewall CSIS 3230 A combination of hardware and software that isolates an organization s internal network from the Internet at large Ch 8.8: Packet filtering, firewalls, intrusion detection Ch

More information

Application Note - Using Tenor behind a Firewall/NAT

Application Note - Using Tenor behind a Firewall/NAT Application Note - Using Tenor behind a Firewall/NAT Introduction This document has been created to assist Quintum Technology customers who wish to install equipment behind a firewall and NAT (Network

More information

Introduction of Intrusion Detection Systems

Introduction of Intrusion Detection Systems Introduction of Intrusion Detection Systems Why IDS? Inspects all inbound and outbound network activity and identifies a network or system attack from someone attempting to compromise a system. Detection:

More information

Building Your Firewall Rulebase Lance Spitzner Last Modified: January 26, 2000

Building Your Firewall Rulebase Lance Spitzner Last Modified: January 26, 2000 Building Your Firewall Rulebase Lance Spitzner Last Modified: January 26, 2000 Building a solid rulebase is a critical, if not the most critical, step in implementing a successful and secure firewall.

More information

TECHNICAL NOTE 01/02 PROTECTING YOUR COMPUTER NETWORK

TECHNICAL NOTE 01/02 PROTECTING YOUR COMPUTER NETWORK TECHNICAL NOTE 01/02 PROTECTING YOUR COMPUTER NETWORK 2002 This paper was previously published by the National Infrastructure Security Co-ordination Centre (NISCC) a predecessor organisation to the Centre

More information

Firewalls. Pehr Söderman KTH-CSC [email protected]

Firewalls. Pehr Söderman KTH-CSC Pehrs@kth.se Firewalls Pehr Söderman KTH-CSC [email protected] 1 Definition A firewall is a network device that separates two parts of a network, enforcing a policy for all traversing traffic. 2 Fundamental requirements

More information

Chapter 4 Firewall Protection and Content Filtering

Chapter 4 Firewall Protection and Content Filtering Chapter 4 Firewall Protection and Content Filtering The ProSafe VPN Firewall 50 provides you with Web content filtering options such as Block Sites and Keyword Blocking. Parents and network administrators

More information

Firewall implementation and testing

Firewall implementation and testing Firewall implementation and testing Patrik Ragnarsson, Niclas Gustafsson E-mail: [email protected], [email protected] Supervisor: David Byers, [email protected] Project Report for Information

More information

Considerations In Developing Firewall Selection Criteria. Adeptech Systems, Inc.

Considerations In Developing Firewall Selection Criteria. Adeptech Systems, Inc. Considerations In Developing Firewall Selection Criteria Adeptech Systems, Inc. Table of Contents Introduction... 1 Firewall s Function...1 Firewall Selection Considerations... 1 Firewall Types... 2 Packet

More information

Firewalls. CEN 448 Security and Internet Protocols Chapter 20 Firewalls

Firewalls. CEN 448 Security and Internet Protocols Chapter 20 Firewalls CEN 448 Security and Internet Protocols Chapter 20 Firewalls Dr. Mostafa Hassan Dahshan Computer Engineering Department College of Computer and Information Sciences King Saud University [email protected]

More information

Chapter 4 Firewall Protection and Content Filtering

Chapter 4 Firewall Protection and Content Filtering Chapter 4 Firewall Protection and Content Filtering This chapter describes how to use the content filtering features of the ProSafe Dual WAN Gigabit Firewall with SSL & IPsec VPN to protect your network.

More information

Cisco Certified Security Professional (CCSP)

Cisco Certified Security Professional (CCSP) 529 Hahn Ave. Suite 101 Glendale CA 91203-1052 Tel 818.550.0770 Fax 818.550.8293 www.brandcollege.edu Cisco Certified Security Professional (CCSP) Program Summary This instructor- led program with a combination

More information

A1.1.1.11.1.1.2 1.1.1.3S B

A1.1.1.11.1.1.2 1.1.1.3S B CS Computer 640: Network AdityaAkella Lecture Introduction Networks Security 25 to Security DoS Firewalls and The D-DoS Vulnerabilities Road Ahead Security Attacks Protocol IP ICMP Routing TCP Security

More information

CSCI 7000-001 Firewalls and Packet Filtering

CSCI 7000-001 Firewalls and Packet Filtering CSCI 7000-001 Firewalls and Packet Filtering November 1, 2001 Firewalls are the wrong approach. They don t solve the general problem, and they make it very difficult or impossible to do many things. On

More information

Internet Protocol: IP packet headers. vendredi 18 octobre 13

Internet Protocol: IP packet headers. vendredi 18 octobre 13 Internet Protocol: IP packet headers 1 IPv4 header V L TOS Total Length Identification F Frag TTL Proto Checksum Options Source address Destination address Data (payload) Padding V: Version (IPv4 ; IPv6)

More information

Configuring SSL VPN on the Cisco ISA500 Security Appliance

Configuring SSL VPN on the Cisco ISA500 Security Appliance Application Note Configuring SSL VPN on the Cisco ISA500 Security Appliance This application note describes how to configure SSL VPN on the Cisco ISA500 security appliance. This document includes these

More information

FIREWALLS & NETWORK SECURITY with Intrusion Detection and VPNs, 2 nd ed. Chapter 5 Firewall Planning and Design

FIREWALLS & NETWORK SECURITY with Intrusion Detection and VPNs, 2 nd ed. Chapter 5 Firewall Planning and Design FIREWALLS & NETWORK SECURITY with Intrusion Detection and VPNs, 2 nd ed. Chapter 5 Firewall Planning and Design Learning Objectives Identify common misconceptions about firewalls Explain why a firewall

More information

Security+ Guide to Network Security Fundamentals, Fourth Edition. Chapter 6 Network Security

Security+ Guide to Network Security Fundamentals, Fourth Edition. Chapter 6 Network Security Security+ Guide to Network Security Fundamentals, Fourth Edition Chapter 6 Network Security Objectives List the different types of network security devices and explain how they can be used Define network

More information

Chapter 1 Personal Computer Hardware------------------------------------------------ 7 hours

Chapter 1 Personal Computer Hardware------------------------------------------------ 7 hours Essential Curriculum Networking Essentials Total Hours: 244 Cisco Discovery 1: Networking for Home and Small Businesses 81.5 hours teaching time Chapter 1 Personal Computer Hardware------------------------------------------------

More information

Configuring PA Firewalls for a Layer 3 Deployment

Configuring PA Firewalls for a Layer 3 Deployment Configuring PA Firewalls for a Layer 3 Deployment Configuring PAN Firewalls for a Layer 3 Deployment Configuration Guide January 2009 Introduction The following document provides detailed step-by-step

More information

Architecture. The DMZ is a portion of a network that separates a purely internal network from an external network.

Architecture. The DMZ is a portion of a network that separates a purely internal network from an external network. Architecture The policy discussed suggests that the network be partitioned into several parts with guards between the various parts to prevent information from leaking from one part to another. One part

More information

Högskolan i Halmstad Sektionen för Informationsvetenskap, Data- Och Elektroteknik (IDÉ) Ola Lundh. Name (in block letters) :

Högskolan i Halmstad Sektionen för Informationsvetenskap, Data- Och Elektroteknik (IDÉ) Ola Lundh. Name (in block letters) : Högskolan i Halmstad Sektionen för Informationsvetenskap, Data- Och Elektroteknik (IDÉ) Ola Lundh Written Exam in Network Security ANSWERS May 28, 2009. Allowed aid: Writing material. Name (in block letters)

More information

Network Agent Quick Start

Network Agent Quick Start Network Agent Quick Start Topic 50500 Network Agent Quick Start Updated 17-Sep-2013 Applies To: Web Filter, Web Security, Web Security Gateway, and Web Security Gateway Anywhere, v7.7 and 7.8 Websense

More information

Cisco Firewall Technology

Cisco Firewall Technology Section 1 Firewall...3 Section 2...19 Section 3 Advancements in the ASA...44 Technology Andrew Mason ciscopress.com [ 19 ] Section 2 Technology by Andrew Mason Products Currently, Cisco offers four products

More information

UIP1868P User Interface Guide

UIP1868P User Interface Guide UIP1868P User Interface Guide (Firmware version 0.13.4 and later) V1.1 Monday, July 8, 2005 Table of Contents Opening the UIP1868P's Configuration Utility... 3 Connecting to Your Broadband Modem... 4 Setting

More information

Implementing Network Address Translation and Port Redirection in epipe

Implementing Network Address Translation and Port Redirection in epipe Implementing Network Address Translation and Port Redirection in epipe Contents 1 Introduction... 2 2 Network Address Translation... 2 2.1 What is NAT?... 2 2.2 NAT Redirection... 3 2.3 Bimap... 4 2.4

More information

Enabling Remote Access to the ACE

Enabling Remote Access to the ACE CHAPTER 2 This chapter describes how to configure remote access to the Cisco Application Control Engine (ACE) module by establishing a remote connection by using the Secure Shell (SSH) or Telnet protocols.

More information

WAN Failover Scenarios Using Digi Wireless WAN Routers

WAN Failover Scenarios Using Digi Wireless WAN Routers WAN Failover Scenarios Using Digi Wireless WAN Routers This document discusses several methods for using a Digi wireless WAN gateway to provide WAN failover for IP connections in conjunction with another

More information

Cisco ASA, PIX, and FWSM Firewall Handbook

Cisco ASA, PIX, and FWSM Firewall Handbook Cisco ASA, PIX, and FWSM Firewall Handbook David Hucaby, CCIE No. 4594 Cisco Press Cisco Press 800 East 96th Street Indianapolis, Indiana 46240 USA Contents Foreword Introduction xxii xxiii Chapter 1 Firewall

More information

athenahealth Interface Connectivity SSH Implementation Guide

athenahealth Interface Connectivity SSH Implementation Guide athenahealth Interface Connectivity SSH Implementation Guide 1. OVERVIEW... 2 2. INTERFACE LOGICAL SCHEMATIC... 3 3. INTERFACE PHYSICAL SCHEMATIC... 4 4. SECURE SHELL... 5 5. NETWORK CONFIGURATION... 6

More information

PAVING THE PATH TO THE ELIMINATION OF THE TRADITIONAL DMZ

PAVING THE PATH TO THE ELIMINATION OF THE TRADITIONAL DMZ PAVING THE PATH TO THE ELIMINATION A RSACCESS WHITE PAPER 1 The Traditional Role of DMZ 2 The Challenges of today s DMZ deployments 2.1 Ensuring the Security of Application and Data Located in the DMZ

More information

Output Interpreter. SHOW RUNNING-CONFIG SECURITY Analysis SHOW RUNNING-CONFIG - FW Analysis. Back to top

Output Interpreter. SHOW RUNNING-CONFIG SECURITY Analysis SHOW RUNNING-CONFIG - FW Analysis. Back to top Output Interpreter You have chosen to display errors warnings general information, and helpful references. Headings are displayed for all supported commands that you submitted. SHOW RUNNING-CONFIG SECURITY

More information

Firewall VPN Router. Quick Installation Guide M73-APO09-380

Firewall VPN Router. Quick Installation Guide M73-APO09-380 Firewall VPN Router Quick Installation Guide M73-APO09-380 Firewall VPN Router Overview The Firewall VPN Router provides three 10/100Mbit Ethernet network interface ports which are the Internal/LAN, External/WAN,

More information

Lab 6.1 Configuring a Cisco IOS Firewall Using SDM

Lab 6.1 Configuring a Cisco IOS Firewall Using SDM Lab 6.1 Configuring a Cisco IOS Firewall Using SDM Learning Objectives Use SDM to configure a router as a firewall Understand basic firewall operation Configure basic routing through a firewall Verify

More information

Overview. Firewall Security. Perimeter Security Devices. Routers

Overview. Firewall Security. Perimeter Security Devices. Routers Overview Firewall Security Chapter 8 Perimeter Security Devices H/W vs. S/W Packet Filtering vs. Stateful Inspection Firewall Topologies Firewall Rulebases Lecturer: Pei-yih Ting 1 2 Perimeter Security

More information