Transparent Caching The art of caching network traffic without requiring user / browser side configuration.

Slides:



Advertisements
Similar presentations
Fred P. Baker CCIE, CCIP(security), CCSA, MCSE+I, MCSE(2000)
Advertisements

Access Control List (ACL)
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Addressing the Network – IPv4 Network Fundamentals – Chapter 6.
Internet Control Protocols Savera Tanwir. Internet Control Protocols ICMP ARP RARP DHCP.
Guide to Network Defense and Countermeasures Second Edition
ITIS 1210 Introduction to Web-Based Information Systems Chapter 44 How Firewalls Work How Firewalls Work.
Copyright © 2012 Certification Partners, LLC -- All Rights Reserved Lesson 4: Web Browsing.
Lesson 4: Web Browsing.
Routing Basics By Craig Lindstrom. Overview Routing Process Routing Process Default Routing Default Routing Static Routing Static Routing Dynamic Routing.
CSCI 530 Lab Firewalls. Overview Firewalls Capabilities Limitations What are we limiting with a firewall? General Network Security Strategies Packet Filtering.
Highly Available Central Services An Intelligent Router Approach Thomas Finnern Thorsten Witt DESY/IT.
Guide to Network Defense and Countermeasures Third Edition
COS 420 Day 18. Agenda Assignment 4 Posted Chap Due April 6 Group project program requirements Submitted but Needs lots of work Individual Project.
Chapter 2: Application Layer
Understanding Networks. Objectives Compare client and network operating systems Learn about local area network technologies, including Ethernet, Token.
Circuit & Application Level Gateways CS-431 Dick Steflik.
Definitions, Definitions, Definitions Lead to Understanding.
© 2009 Cisco Systems, Inc. All rights reserved. ROUTE v1.0—5-1 Implementing Path Control Assessing Path Control Network Performance Issues.
Application Layer  We will learn about protocols by examining popular application-level protocols  HTTP  FTP  SMTP / POP3 / IMAP  Focus on client-server.
Computer Network (MASQ/NAT/PROXY)
Firewall and Proxy Server Director: Dr. Mort Anvari Name: Anan Chen Date: Summer 2000.
Firewall Slides by John Rouda
Firewalls Marin Stamov. Introduction Technological barrier designed to prevent unauthorized or unwanted communications between computer networks or hosts.
IST 228\Ch3\IP Addressing1 TCP/IP and DoD Model (TCP/IP Model)
CN2668 Routers and Switches Kemtis Kunanuraksapong MSIS with Distinction MCTS, MCDST, MCP, A+
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Addressing the Network – IPv4 Network Fundamentals – Chapter 6.
Redirection and Load Balancing
Chapter 17 Networking Dave Bremer Otago Polytechnic, N.Z. ©2008, Prentice Hall Operating Systems: Internals and Design Principles, 6/E William Stallings.
Web application architecture
© 2006 Cisco Systems, Inc. All rights reserved.1 Microsoft Network Load Balancing Support Vivek V
PA3: Router Junxian (Jim) Huang EECS 489 W11 /
Common Devices Used In Computer Networks
INSTALLING MICROSOFT EXCHANGE SERVER 2003 CLUSTERS AND FRONT-END AND BACK ‑ END SERVERS Chapter 4.
1 Chapter 6: Proxy Server in Internet and Intranet Designs Designs That Include Proxy Server Essential Proxy Server Design Concepts Data Protection in.
1 IP Forwarding Relates to Lab 3. Covers the principles of end-to-end datagram delivery in IP networks.
A+ Guide to Managing and Maintaining Your PC Fifth Edition Chapter 19 PCs on the Internet.
Chapter 1: Introduction to Web Applications. This chapter gives an overview of the Internet, and where the World Wide Web fits in. It then outlines the.
ACM 511 Chapter 2. Communication Communicating the Messages The best approach is to divide the data into smaller, more manageable pieces to send over.
1 The Firewall Menu. 2 Firewall Overview The GD eSeries appliance provides multiple pre-defined firewall components/sections which you can configure uniquely.
P RESENTED B Y - Subhomita Gupta Roll no: 10 T OPICS TO BE DISCUSS ARE : Introduction to Firewalls  History Working of Firewalls Needs Advantages and.
11 SECURING YOUR NETWORK PERIMETER Chapter 10. Chapter 10: SECURING YOUR NETWORK PERIMETER2 CHAPTER OBJECTIVES  Establish secure topologies.  Secure.
The Inter-network is a big network of networks.. The five-layer networking model for the internet.
© 2006 Cisco Systems, Inc. All rights reserved. Cisco IOS Threat Defense Features.
FireProof. The Challenge Firewall - the challenge Network security devices Critical gateway to your network Constant service The Challenge.
Homework 02 NAT 、 DHCP 、 Firewall 、 Proxy. Computer Center, CS, NCTU 2 Basic Knowledge  DHCP Dynamically assigning IPs to clients  NAT Translating addresses.
Distributed System Concepts and Architectures Services
1 © 2003, Cisco Systems, Inc. All rights reserved. CCNP 1 v3.0 Module 1 Overview of Scalable Internetworks.
Operating Systems Proj.. Background A firewall is an information technology (IT) security device which is configured to permit, deny or proxy data connections.
Unit - III. Providing a Caching Proxy Server (1) A caching proxy server is software that stores (caches) frequently requested internet objects such as.
ITGS Network Architecture. ITGS Network architecture –The way computers are logically organized on a network, and the role each takes. Client/server network.
Firewalls Original slides prepared by Theo Benson.
70-293: MCSE Guide to Planning a Microsoft Windows Server 2003 Network, Enhanced Chapter 4: Planning and Configuring Routing and Switching.
Module 10: Windows Firewall and Caching Fundamentals.
1 CNLab/University of Ulsan Chapter 19 Firewalls  Packet Filtering Firewall  Application Gateway Firewall  Firewall Architecture.
Firewalls. Overview of Firewalls As the name implies, a firewall acts to provide secured access between two networks A firewall may be implemented as.
Ad Hoc – Wireless connection between two devices Backbone – The hardware used in networking Bandwidth – The speed at which the network is capable of sending.
NAT、DHCP、Firewall、FTP、Proxy
Original slides prepared by Theo Benson
Distributed Systems.
Lesson 4: Web Browsing.
Vocabulary Prototype: A preliminary sketch of an idea or model for something new. It’s the original drawing from which something real might be built or.
Vocabulary Prototype: A preliminary sketch of an idea or model for something new. It’s the original drawing from which something real might be built or.
Introducing To Networking
Chapter 6: Network Layer
The Stanford Clean Slate Program
ECEN “Internet Protocols and Modeling”
Setting Up Firewall using Netfilter and Iptables
Firewalls Routers, Switches, Hubs VPNs
CS580 Special Project: IOS Firewall Setup using CISCO 1600 router
Lesson 4: Web Browsing.
Presentation transcript:

Transparent Caching The art of caching network traffic without requiring user / browser side configuration.

Who am I?

Overview What is transparent caching, and why use it? Tools available How to set it up Common problems Alternatives

What is transparent caching? Transparently proxying / caching network traffic without requiring user configuration or knowledge. A way to simplify caching for the end user Forces all users to use the cache.

Why use transparent caching? Ease of use. No configuration required by the end user. Catching all users. No users can bypass the cache.

Reasons to not use it It is not a magical tool without problems. Technical issues –Networking issues. “Woodo magic” –Stability / Reliability –Only port 80 –FTP not supported –To be efficient modern browsers are required

Reasons to not use it (cont.) Political reasons –What is an internet connection? –Privacy No user control. Users can’t bypass the cache.

What is involved? TCP level routing Reverse NAT or related technology to hijack port 80 traffic. A proxy with some knowledge of transparent proxying A cache

Tools available TCP level Routing –Policy routing / route maps –TCP / layer 4 switches with or without NAT –Cisco WCCP Host level NAT –Linux firewall code –FreeBSD firewall code –IP-Filter

Using policy routing to redirect traffic A standard router configured to route TCP port 80 to the cache server. Router Cache Server Internet User 1 User 2 User.. User 3

Policy routing (cont.) Benefits –Can usually be deployed without extra hardware Drawbacks –Only static routing –No fault tolerance. Port 80 traffic disrupted if cache server fails. –More CPU load on the router

Running the cache on a router Small network / firewall. Host used as router. Router / Cache Server Internet User 1 User 2 User.. User 3

Caching router / firewall Benefits –Less hardware required –Well suited for small to medium sized firewalls. Drawbacks –Stability / reliability. Can disrupt all communication. –If running on a firewall: make sure the firewall protects the cache software.

Cisco Web Cache Control Protocol (WCCP) Developed by Cisco for Cisco Automated configuration. Proxy servers announce their presence to the router. Load balancing Fault recovery Commercial Licensing required. Not currently an option for free software.

TCP level / layer 4 switching The use of a smart and efficient network device to redirect traffic. Cache Server Internet Router TCP Switch User 1 User 2 User.. User 3...

TCP switch benefits –Can bypass the cache if it malfunctions –Good reliability –Can distribute the load on multiple cache servers –Can do the required NAT, allowing the use of any OS on the cache server. –Some do HTTP proxy translation, allowing the use of any proxy software.

TCP switch drawbacks –One more expensive box to purchase –Using NAT requires switch vendor support in the proxy software to support old browsers.

Request formats Proxy request TCP connection from client to proxy GET HTTP/ Server request TCP connection from client to server IP GET /path/to/file HTTP/1.0 Host: (if supported)...

Problems related to request formats A transparent proxy must reconstruct the URL of the request. Host: headers not always available. HTTP/1.1 feature or 1.0 add-on. IP address from NAT translation.

What happens at the TCP level? Normal communication / proxying –IP based routing –TCP is end-to-end –One IP address, one Host Transparent proxying –TCP based routing –TCP is no longer end-to-end –One IP address, “multiple hosts”

Problems at the TCP level TCP normally relies on two IP protocols. TCP and ICMP. Of these only TCP can be reliably redirected. ICMP is required for Path MTU discovery. TCP resets if a single packet travels another path bypassing the redirection.

Things to consider when configuring OS level NAT Try not to disturb traffic to/from the cache server host. Make sure that the proxy traffic is not redirected back to the proxy. Be prepared to do packet level traces, preferably from a separate box.

Recommended steps when building a transparent proxy Think it over. Is it really required? Build and test the proxy server Configure NAT on the proxy server Test it using a local LAN client Set up TCP level routing.

Common problems Communication hangs for some users –Most likely caused by MTU related problems. Connection reset errors –Usually misconfigured NAT or TCP routing. Bad performance –Possibly CPU bottleneck in the router.

TCP Reset errors (cont.) Error messages seen from the proxy. –TCP routing or NAT affects traffic generated by the proxy. Error messages seen by the browser (popup) –TCP routing or NAT failure, causing some client traffic to bypass the redirection.

Alternatives PAC files Blocking port 80 –Selectively or everything –Possibly with an automated message

Selectively blocking port 80 with a message A good alternative to transparent proxying Uses the same techniques as transparent proxying for hijacking port 80, but only to deliver the instructions.

Blocking port 80, benefits Forces the users to configure their proxy settings Users are automatically provided with configuration instructions when needed. Less calls to support line. Users get the information on why caching is good for them. PAC file allows easy configuration of exceptions

Blocking port 80, drawbacks Not all browsers supports proxy settings Users are required to be capable of following instructions.

Summary Transparent caching is a good tool in most configurations to ease user side configuration. It has some important limitations. Not a full replacement for standard proxying. For many automatic instructions on how to configure proxy settings achieves the same goals.

Sources for more information –Squid FAQ –Router manuals on policy routing –IP-Filter home page –Linux 2.0 ipfadm –Linux 2.2 ipchains

Questions

Example Cisco IP policy route map Policy route map, routing port 80 (www) to server ! Enable policy routing interface Ethernet0 ip policy route-map proxy-redirect ! Route to proxy server route-map proxy-redirect permit 10 match ip address 110 set ip next-hop ! Only policy route client www traffic access-list 110 deny tcp any any neq www access-list 110 deny tcp host any access-list 110 permit tcp any any

Example Linux ipfwadm NAT Linux 2.0 redirecting eth0 TCP port 80 to Squid on port 3128 –Kernel options: CONFIG_IP_FIREWALL=y CONFIG_IP_ALWAYS_DEFRAG=y –ipfwadm ruleset # Accept local traffic ipfwadm -I -a accept -W eth0 -D this.host # Redirect port 80 to Squid on 3128 ipfwadm -I -a accept -W eth0 -P tcp -D /0 80 -r 3128

Example Linux ipchains NAT Linux 2.2 redirecting eth0 TCP port 80 to Squid on port 3128 –Kernel options: CONFIG_IP_FIREWALL=y CONFIG_IP_ALWAYS_DEFRAG=y –ipchains ruleset # Accept local traffic ipchains -A input -j ACCEPT -i eth0 -d /32 # Redirect port 80 to Squid on port 3128 ipchains -A input -j REDIRECT i eth0 -p tcp -d /0 80

Example IP-Filter NAT ipnat ruleset redirecting TCP port 80 to Squid on port 3128 # Redirect direct web traffic to local web server. rdr de /32 port 80 -> port 80 tcp # Redirect everything else to squid on port 3128 rdr de /0 port 80 -> port 3128 tcp

Running Squid on Linux

What is Linux Linux is like any other UNIX POSIX standards GNU tools Best of SysV and BSD families

Filesystem performance To few performance counters for I/O to make any good measurements Asynchronous writes by default (like fastfs on Solaris) noatime mount option

Kernel performance / tuning Memory freelist tuning on smaller systems –/proc/sys/vm/freepages Filedescriptor limits –Default 256 –Later revisions of 2.2 may allow 1024 –Patches available for higher limits

Hands on transparent caching Linux configuration –Kernel configuration Firewalling & Transparent proxy support –ipfwadm configuration ipfwadm -I accept -D thishost ipfwadm -I accept -P tcp -D /0 80 -r 3128

Hands on transparent caching (cont.) Squid configuration httpd_accel_host virtual httpd_accel_uses_host_header on