Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Proxy Servers, Firewalls, NAT


Published on

  • Be the first to comment

  • Be the first to like this

Proxy Servers, Firewalls, NAT

  1. 1. Firewalls, etc. (Some of the slides in this file were adapted from Oppliger’s online slides at .)
  2. 2. Chapter 3 <ul><li>Intro </li></ul><ul><li>Various firewall technologies: </li></ul><ul><ul><li>Static Packet Filtering </li></ul></ul><ul><ul><li>Dynamic Packet Filtering (or Stateful inspection) </li></ul></ul><ul><ul><li>Circuit-level gateways </li></ul></ul><ul><ul><li>Application-level gateways (aka. Proxy servers) </li></ul></ul><ul><li>Firewall configurations </li></ul><ul><li>NAT </li></ul><ul><li>Browser configurations </li></ul>
  3. 3. Firewalls <ul><li>A firewall, in the real world, is built between buildings to prevent a fire started in one building from spreading to another </li></ul><ul><li>A digital firewall serves similar purpose, by preventing security breaches that occur in one zone from spreading to another zone </li></ul><ul><li>In a way, firewalls can be considered as delimiters that together define the perimeter of a network </li></ul><ul><li>A firewall prevents unwanted and/or unauthorized traffic from entering into or getting out of a given network (the ‘protected’ network) </li></ul><ul><li>Also called ‘secure Internet gateways’ or ‘security gateways’ </li></ul>
  4. 4. RFC2828 Internet Security Glossary  (by R. Shirey, May 2000) <ul><li>$ filtering router </li></ul><ul><li>An internetwork router that selectively prevents the passage of data packets according to a security policy. </li></ul><ul><li>A filtering router may be used as a firewall or part of a firewall. </li></ul><ul><li>A router usually receives a packet from a network and decides where to forward it on a second network. A filtering router does the same, but first decides whether the packet should be forwarded at all, according to some security policy. </li></ul><ul><li>The policy is implemented by rules (packet filters) loaded into the router. The rules mostly involve values of data packet control fields (especially IP source and destination addresses and TCP port </li></ul>
  5. 5. RFC2828 Internet Security Glossary  (by R. Shirey, May 2000) <ul><li>$ bastion host </li></ul><ul><li>A strongly protected computer that is in a network protected by a firewall (or is part of a firewall) and is the only host (or one of only a few hosts) in the network that can be directly accessed from networks on the other side of the firewall. </li></ul><ul><li>Filtering routers in a firewall typically restrict traffic from the outside network to reaching just one host, the bastion host , which usually is part of the firewall. </li></ul><ul><li>Since only this one host can be directly attacked, only this one host needs to be very strongly protected, so security can be maintained more easily and less expensively. </li></ul><ul><li>However, to allow legitimate internal and external users to access application resources through the firewall, higher layer protocols and services need to be relayed and forwarded by the bastion host . Some services (e.g., DNS and SMTP) have forwarding built in; other services (e.g., TELNET and FTP) require a proxy server on the bastion host. </li></ul>
  6. 6. Firewalls <ul><li>According to RFC2828 Internet Security Glossary  (by R. Shirey, May 2000): </li></ul><ul><ul><li>$ firewall </li></ul></ul><ul><ul><li>An internetwork gateway that restricts data communication traffic to and from one of the connected networks (the one said to be &quot;inside&quot; the firewall) and thus protects that network's system resources against threats from the other network (the one that is said to be &quot;outside&quot; the firewall). </li></ul></ul><ul><ul><li>A firewall typically protects a smaller, secure network (such as a corporate LAN, or even just one host) from a larger network (such as the Internet). The firewall is installed at the point where the networks connect, and the firewall applies security policy rules to control traffic that flows in and out of the protected network. </li></ul></ul>
  7. 7. Firewalls <ul><ul><li>A firewall is not always a single computer. For example, a firewall may consist of a pair of filtering routers and one or more proxy servers running on one or more bastion hosts , all connected to a small, dedicated LAN between the two routers. The external router blocks attacks that use IP to break security (IP address spoofing, source routing, packet fragments), while proxy servers block attacks that would exploit a vulnerability in a higher layer protocol or service. The internal router blocks traffic from leaving the protected network except through the proxy servers. </li></ul></ul><ul><ul><li>The difficult part is defining criteria by which packets are denied passage through the firewall, because a firewall not only needs to keep intruders out, but usually also needs to let authorized users in and out. </li></ul></ul>
  8. 8. Firewalls - a more precise definition <ul><li>According to Cheswick & Bellovin (1994) </li></ul><ul><li>A firewall system is a collection of components placed btwn two networks that collectively have the following 3 properties: </li></ul><ul><ul><li>All traffic (inside out, or outside in) must pass through the firewall. </li></ul></ul><ul><ul><li>Only authorized traffic (as defined by the local security policy ) are allowed to pass.  firewall policy </li></ul></ul><ul><ul><li>The firewall itself is immune to penetration. </li></ul></ul>
  9. 9. Firewalls - additional, stronger features <ul><li>A firewall is able to: </li></ul><ul><ul><li>enforce strong authentication for users who wish to establish inbound or outbound connections </li></ul></ul><ul><ul><li>associate data streams that are allowed to pass through the firewall with previously authenticated and authorized users </li></ul></ul><ul><li>Use of application gateways is needed to support these higher-level features. </li></ul>
  10. 10. Compare Various Firewall Technologies Transport layer or higher Network layer (or Internet layer in TCP/IP) OSI layers Circuit-level Application-level Static Dynamic Sub-types Application gateways Packet filters Types
  11. 12. Static Packet Filtering <ul><li>Aka ‘screening routers’ </li></ul><ul><li>Stateless , meaning that each IP packet must be examined in isolation from what has happened in the past (and what may happen in the future), forcing the filter to make a decision to permit or deny each packet individually based on the packet-filtering rules </li></ul><ul><ul><li> no concept of session </li></ul></ul><ul><ul><li> lead to problems when more than one connection is created in a protocol such as FTP </li></ul></ul>
  12. 14. Dynamic Packet Filtering <ul><li>Aka stateful inspection </li></ul><ul><li>A dynamic packet filter maintains state information about past IP packets to make more intelligent decisions about the legitimacy of present and future IP packets </li></ul><ul><li>State information are stored in an internal database </li></ul><ul><li>Subsequent packets belonging to the same association can pass quickly through the stateful inspection device </li></ul>
  13. 15. Circuit-level Gateways <ul><li>A proxy server for TCP or UDP (at the transport layer) </li></ul><ul><li>Goal: To allow a TCP/IP application to traverse (i.e., securely use) a firewall </li></ul><ul><li>Is Located and running on a firewall </li></ul><ul><li>Relays TCP connections </li></ul><ul><li>It does not interfere with the data stream.  Making it different from an application-level gateway </li></ul><ul><li>Example: SOCKS ( RFC1928 SOCKS Protocol Version 5.  By M. Leech, M. Ganis, Y. Lee, R. Kuris, D. Koblas, L. Jones. March 1996) </li></ul>
  14. 16. SOCKS <ul><li>The implementation of the SOCKS protocol typically involves the recompilation or relinking of TCP-based client applications to use the appropriate encapsulation routines in the SOCKS library.  ‘ socksified’ clients </li></ul><ul><li>Procedure for TCP-based clients </li></ul><ul><ul><li>When a TCP-based client wishes to establish a connection to an object that is reachable only via a firewall, it must open a TCP connection to the appropriate SOCKS port on the SOCKS server system. The SOCKS service is conventionally located on TCP port 1080. </li></ul></ul><ul><ul><li>If the connection request succeeds, the client enters a negotiation for the authentication method to be used, authenticates with the chosen method, then sends a relay request. </li></ul></ul><ul><ul><li>The SOCKS server evaluates the request, and either establishes the appropriate connection or denies it. </li></ul></ul>
  15. 18. Application-level Gateways <ul><li>A proxy server that allows a specific application protocol to traverse a firewall. </li></ul><ul><li>A scenario: The packet filter of a firewall blocks all inbound Telent and FTP sessions, unless the sessions are terminated by a bastion host. </li></ul><ul><ul><li>Multiple application gateways may be running on the bastion host  a proxy server for FTP, a proxy server for Telent, … </li></ul></ul><ul><ul><li>A user who wishes to connect inbound to an intranet server must have his Telnet or FTP client connect to the application gateway </li></ul></ul>
  16. 20. Application-level Gateways <ul><li>To properly authenticate the user, an application gateway must have access to authentication and authorization information, either locally or remotely: </li></ul><ul><ul><li>User-level authentication info may be stored locally on the firewall </li></ul></ul><ul><ul><li>User-level authentication info may be stored in a centralized authentication server (e.g., RADIUS, TACACS+) </li></ul></ul>
  17. 21. Trade-offs of Firewalls <ul><li>Advantages: </li></ul><ul><ul><li>Provides basic access control services for an intranet </li></ul></ul><ul><ul><li>Provides a centralized filtering/gateway function </li></ul></ul><ul><ul><li>(To some degree) Relieves individual hosts the responsibility of having a filter or firewall itself </li></ul></ul><ul><ul><li>Centralized management of filtering rules </li></ul></ul><ul><li>Limitations: next </li></ul>
  18. 22. Trade-offs of Firewalls <ul><li>Limitations: </li></ul><ul><ul><li>Cannot protect sites and corporate intranets against insider attacks  internal / intranet firewalls </li></ul></ul><ul><ul><li>Can be circumvented by tunneling unauthorized application protocols in authorized ones </li></ul></ul><ul><ul><li>Little protection against attacks embedded in the data field of a packet (e.g., virus-infected programs or data files, malicious Java applets, malicious ActiveX controls, …) </li></ul></ul><ul><ul><li>May foster a false sense of security  lax security within the firewall perimeter </li></ul></ul>
  19. 23. Dual-Homed Firewalls <ul><li>A dual-homed host is a host with two network interfaces, each of which is connected to a different network. </li></ul><ul><li>A dual-homed firewall is a dual-homed host on which IP routing and forwarding are disabled. </li></ul><ul><ul><li>IP packets can no longer be routed or forwarded between the two networks. </li></ul></ul><ul><ul><li>Data can only be transferred from one network to the other if there is an application gateway running on the firewall to do that. </li></ul></ul><ul><ul><li>See diagram next. </li></ul></ul>
  20. 24. outer screening router inner screening router
  21. 25. Dual-Homed Firewalls <ul><li>The outer screening router makes sure that </li></ul><ul><ul><li>All incoming packets have the bastion host as the destination address. </li></ul></ul><ul><ul><li>All outgoing packets have the bastion host as the source address. </li></ul></ul><ul><li>The inner screening router makes sure that </li></ul><ul><ul><li>All incoming packets have the bastion host as the source address. </li></ul></ul><ul><ul><li>All outgoing packets have the bastion host as the destination address. </li></ul></ul><ul><li>Packet filtering rules need to be configured. </li></ul>
  22. 26. Screened Subnet Firewalls <ul><li>Two separate screening routers: outer, inner (see diagram next) </li></ul><ul><li>DMZ: the subnet in between the two screening routers </li></ul><ul><li>The bastion host is part of the DMZ. </li></ul><ul><li>A packet must pass both screening routers before it reach the intranet. </li></ul><ul><li>When configured properly (e.g., using NAT), only the bastion host and other servers in the DMZ can be seen from the Internet. </li></ul>
  23. 27. outer screening router inner screening router the DMZ
  24. 28. NAT and Security <ul><li>Network Address Translation (NAT) is useful: </li></ul><ul><ul><li>Hide internal private IP addresses </li></ul></ul><ul><ul><li>Conserve routable IP addresses on the Internet </li></ul></ul><ul><li>RFC1918 Address Allocation for Private Internets. Y. Rekhter, B. Moskowitz, D. Karrenberg, G. J. de Groot, E. Lear. February 1996. </li></ul><ul><li>Reserved IP addresses for private networks in RFC 1918 addressing scheme: </li></ul><ul><ul><li>The Internet Assigned Numbers Authority (IANA) has reserved the following three blocks of the IP address space for private internets: </li></ul></ul><ul><ul><ul><li> - (10/8 prefix) </li></ul></ul></ul><ul><ul><ul><li> - (172.16/12 prefix) </li></ul></ul></ul><ul><ul><ul><li> - (192.168/16 prefix) </li></ul></ul></ul>
  25. 29. An Example - a firewall supporting NAT IP addresses: C Port numbers: c S =  21 F = f Also a router ?
  26. 30. Other Examples - the DCSL network <ul><li>Network diagram for the UHCL Distributed Computer Security Lab (D140, D158) </li></ul><ul><ul><li> </li></ul></ul>
  27. 31. Advantages of using NAT <ul><li>The obvious advantage of using private address space for the Internet at large is to conserve the globally unique address space by not using it where global uniqueness is not required. </li></ul><ul><li>Enterprises themselves also enjoy a number of benefits from their usage of private address space: They gain a lot of flexibility in network design by having more address space at their disposal than they could obtain from the globally unique pool. This enables operationally and administratively convenient addressing schemes as well as easier growth paths. </li></ul>
  28. 32. Drawbacks of using NAT <ul><li>Renumbering of IP addresses may be needed in some cases: </li></ul><ul><ul><li>Once one commits to using a private address, one is committing to renumber part or all of an enterprise, should one decide to provide IP connectivity between that part (or all of the enterprise) and the Internet. </li></ul></ul><ul><ul><li>Another drawback to the use of private address space is that it may require renumbering when merging several private internets into a single private internet. </li></ul></ul>
  29. 33. Is NAT sufficient for network security? <ul><li>No. It’s mainly a convenience measure. </li></ul><ul><ul><li>It cannot replace the functionalities of a firewall: </li></ul></ul><ul><ul><ul><li>NAT does not track packet sequence numbers, TCP handshake, and UDP progress-based timers, etc. </li></ul></ul></ul><ul><ul><li>It cannot replace a intrusion detection system: </li></ul></ul><ul><ul><ul><li>NAT does not concern itself with protecting the hosts from malicious data being sent on the NAT connections. </li></ul></ul></ul><ul><ul><li>It cannot replace an access control mechanism. </li></ul></ul>