Middleboxes Jennifer Rexford COS 461: Computer Networks

Slides:



Advertisements
Similar presentations
CPSC Network Layer4-1 IP addresses: how to get one? Q: How does a host get IP address? r hard-coded by system admin in a file m Windows: control-panel->network->configuration-
Advertisements

CS 457 – Lecture 16 Global Internet - BGP Spring 2012.
CS 4700 / CS 5700 Network Fundamentals Lecture 13: Middleboxes and NAT (Duct tape for IPv4) Revised 3/9/2013.
Firewalls and Intrusion Detection Systems
K. Salah 1 Chapter 31 Security in the Internet. K. Salah 2 Figure 31.5 Position of TLS Transport Layer Security (TLS) was designed to provide security.
Middleboxes and Tunneling Reading: Sect 8.5, 9.4.1, 4.5 COS 461: Computer Networks Spring 2011 Mike Freedman
1 Network Address Translation (NAT) Relates to Lab 7. Module about private networks and NAT.
NAT: Network Address Translation local network (e.g., home network) /24 rest of Internet Datagrams.
Middleboxes Reading: Section 8.4 COS 461: Computer Networks Spring 2009 (MW 1:30-2:50 in COS 105) Michael Freedman Teaching Assistants: Wyatt Lloyd and.
UNDERLAYS and MIDDLEBOXES READING: SECTION 8. COS 461: Computer Networks Spring 2010 (MW 3:00-4:20 in COS 105) Mike Freedman
FIREWALLS & NETWORK SECURITY with Intrusion Detection and VPNs, 2 nd ed. 6 Packet Filtering By Whitman, Mattord, & Austin© 2008 Course Technology.
EEC-484/584 Computer Networks Lecture 11 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
12 – NAT, ICMP, IPv6 Network Layer4-1. Network Layer4-2 Chapter 4 Network Layer Computer Networking: A Top Down Approach Featuring the Internet, 3 rd.
FIREWALL TECHNOLOGIES Tahani al jehani. Firewall benefits  A firewall functions as a choke point – all traffic in and out must pass through this single.
Middleboxes & Network Appliances EE122 TAs Past and Present.
Support Protocols and Technologies. Topics Filling in the gaps we need to make for IP forwarding work in practice – Getting IP addresses (DHCP) – Mapping.
Network Layer4-1 NAT: Network Address Translation local network (e.g., home network) /24 rest of.
Packet Filtering. 2 Objectives Describe packets and packet filtering Explain the approaches to packet filtering Recommend specific filtering rules.
8: Network Security8-1 Security in the layers. 8: Network Security8-2 Secure sockets layer (SSL) r Transport layer security to any TCP- based app using.
FIREWALL Mạng máy tính nâng cao-V1.
CS 5565 Network Architecture and Protocols
Middleboxes and Tunneling Mike Freedman COS 461: Computer Networks Lectures: MW 10-10:50am in Architecture N101
CS 3214 Computer Systems Godmar Back Lecture 24 Supplementary Material.
Chapter 6: Packet Filtering
© MMII JW RyderCS 428 Computer Networking1 Private Network Interconnection  VPN - Virtual Private Networks  NAT - Network Address Translation  Describe.
1 NAT Network Address Translation Motivation for NAT To solve the insufficient problem of IP addresses IPv6 –All software and hardware need to be updated.
Chapter 13 – Network Security
Firewall and Internet Access Mechanism that control (1)Internet access, (2)Handle the problem of screening a particular network or an organization from.
CS 540 Computer Networks II Sandy Wang
Network Layer4-1 DHCP: Dynamic Host Configuration Protocol Goal: allow host to dynamically obtain its IP address from network server when it joins network.
Transport Layer 3-1 Chapter 4 Network Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012  CPSC.
CIS 3360: Internet: Network Layer Introduction Cliff Zou Spring 2012.
Network Layer4-1 Chapter 4: Network Layer r 4. 1 Introduction r 4.2 Virtual circuit and datagram networks r 4.3 What’s inside a router r 4.4 IP: Internet.
TCP/IP Protocols Contains Five Layers
Transport Layer3-1 Chapter 4: Network Layer r 4. 1 Introduction r 4.2 Virtual circuit and datagram networks r 4.3 What’s inside a router r 4.4 IP: Internet.
Chapter 8 Network Security Thanks and enjoy! JFK/KWR All material copyright J.F Kurose and K.W. Ross, All Rights Reserved Computer Networking:
Middleboxes Reading: Section 8.4 COS 461: Computer Networks Spring 2006 (MW 1:30-2:50 in Friend 109) Jennifer Rexford Teaching Assistant: Mike Wawrzoniak.
CS 5565 Network Architecture and Protocols Godmar Back Lecture 14.
K. Salah1 Security Protocols in the Internet IPSec.
Polytechnic University Firewall and Trusted Systems Presented by, Lekshmi. V. S cos
Defining Network Infrastructure and Network Security Lesson 8.
CS 3700 Networks and Distributed Systems
CS 4700 / CS 5700 Network Fundamentals
Supplementary Material
Network Address Translation
Original slides prepared by Theo Benson
Supplementary Material
Network Address Translation (NAT)
Network Address Translation
CS 4700 / CS 5700 Network Fundamentals
CS 3700 Networks and Distributed Systems
Network Address Translation (NAT)
Introducing To Networking
NET323 D: Network Protocols
6.6 Firewalls Packet Filter (=filtering router)
* Essential Network Security Book Slides.
EEC-484/584 Computer Networks
I. Basic Network Concepts
CS 3700 Networks and Distributed Systems
NET323 D: Network Protocols
Firewalls Routers, Switches, Hubs VPNs
EEC-484/584 Computer Networks
DHCP and NAT.
AbbottLink™ - IP Address Overview
CS4470 Computer Networking Protocols
Network Address Translation (NAT)
DHCP: Dynamic Host Configuration Protocol
Session 20 INST 346 Technologies, Infrastructure and Architecture
Computer Networks Protocols
Chapter 4: outline 4.1 Overview of Network layer data plane
Presentation transcript:

Middleboxes Jennifer Rexford COS 461: Computer Networks Lectures: MW 10-10:50am in Architecture N101 http://www.cs.princeton.edu/courses/archive/spr12/cos461/

Internet Ideal: Simple Network Model Globally unique identifiers Each node has a unique, fixed IP address … reachable from everyone and everywhere Simple packet forwarding Network nodes simply forward packets … rather than modifying or filtering them source destination IP network

Internet Reality Host mobility IP address depletion Security concerns Host changing address as it moves IP address depletion Multiple hosts using the same address Security concerns Detecting and blocking unwanted traffic Replicated services Load balancing over server replicas Performance concerns Allocating bandwidth, caching content, … Incremental deployment New technology deployed in stages

Middleboxes Middleboxes are intermediaries Myriad uses Interposed between communicating hosts Often without knowledge of one or both parties Myriad uses Address translators Firewalls Traffic shapers Intrusion detection Transparent proxies Application accelerators “An abomination!” Violation of layering Hard to reason about Responsible for subtle bugs “A practical necessity!” Solve real/pressing problems Needs not likely to go away

Firewalls

Should arriving packet be allowed in? Departing packet let out? Firewalls Should arriving packet be allowed in? Departing packet let out? administered network public Internet firewall Firewall filters packet-by-packet, based on: Source and destination IP addresses and port numbers TCP SYN and ACK bits; ICMP message type Deep packet inspection on packet contents (DPI)

Packet Filtering Examples Block all packets with IP protocol field = 17 and with either source or dest port = 23. All incoming and outgoing UDP flows blocked All Telnet connections are blocked Block inbound TCP packets with SYN but no ACK Prevents external clients from making TCP connections with internal clients But allows internal clients to connect to outside Block all packets with TCP port of Quake

Firewall Configuration Firewall applies a set of rules to each packet To decide whether to permit or deny the packet Each rule is a test on the packet Comparing IP and TCP/UDP header fields … and deciding whether to permit or deny Order matters Once packet matches a rule, the decision is done

Firewall Configuration Example Alice runs a network in 222.22.0.0/16 Wants to let Bob’s school access certain hosts Bob is on 111.11.0.0/16 Alice’s special hosts on 222.22.22.0/24 Alice doesn’t trust Trudy, inside Bob’s network Trudy is on 111.11.11.0/24 Alice doesn’t want any other Internet traffic

Firewall Configuration Rules #1: Don’t let Trudy’s machines in Deny (src = 111.11.11.0/24, dst = 222.22.0.0/16) #2: Let rest of Bob’s network in to special dsts Permit (src=111.11.0.0/16, dst = 222.22.22.0/24) #3: Block the rest of the world Deny (src = 0.0.0.0/0, dst = 0.0.0.0/0)

Stateful Firewall Stateless firewall: Stateful firewall Treats each packet independently Stateful firewall Remembers connection-level information E.g., client initiating connection with a server … allows the server to send return traffic SYN SYN SYN-ACK SYN-ACK

A Variation: Traffic Management Permit vs. deny is too binary a decision Classify the traffic based on rules … and handle each class differently Traffic shaping (rate limiting) Limit the amount of bandwidth for certain traffic Separate queues Use rules to group related packets And then do weighted fair scheduling across groups

Clever Users Subvert Firewalls Example: filtering dorm access to a server Firewall rule based on IP addresses of dorms … and the server IP address and port number Problem: users may log in to another machine Example: filtering P2P based on port #s Firewall rule based on TCP/UDP port numbers E.g., allow only port 80 (e.g., Web) traffic Problem: software using non-traditional ports E.g., write P2P client to use port 80 instead

Network Address Translation

History of NATs IP address space depletion In the meantime… Clear in early 90s that 232 addresses not enough Work began on a successor to IPv4 In the meantime… Share addresses among numerous devices … without requiring changes to existing hosts Meant as a short-term remedy Now: NAT is widely deployed, much more than IPv6

Network Address Translation Outbound: Rewrite the src IP addr Inbound: Rewrite the dest IP addr 138.76.29.7 10.0.0.1 Problem: Local address not globally addressable outside NAT NAT rewrites the IP addresses Make “inside” look like single IP addr Change header checksums accordingly inside 10.0.0.2

Port-Translating NAT Two hosts communicate with same destination Destination needs to differentiate the two Map outgoing packets Change source address and source port Maintain a translation table Map of (src addr, port #) to (NAT addr, new port #) Map incoming packets Map the destination address/port to the local host

Network Address Translation Example NAT translation table WAN side addr LAN side addr 138.76.29.7, 5001 10.0.0.1, 3345 …… S: 10.0.0.1, 3345 D: 128.119.40.186, 80 1 10.0.0.1 S: 128.119.40.186, 80 D: 10.0.0.1, 3345 4 S: 138.76.29.7, 5001 D: 128.119.40.186, 80 2 10.0.0.2 138.76.29.7 S: 128.119.40.186, 80 D: 138.76.29.7, 5001 3 10.0.0.3

Maintaining the Mapping Table Create an entry upon seeing an outgoing packet Packet with new (source addr, source port) pair Eventually, need to delete entries to free up #’s When? If no packets arrive before a timeout (At risk of disrupting a temporarily idle connection) Yet another example of “soft state” I.e., removing state if not refreshed for a while

Where is NAT Implemented? Home router (e.g., Linksys box) Integrates router, DHCP server, NAT, etc. Use single IP address from the service provider Campus or corporate network NAT at the connection to the Internet Share a collection of public IP addresses Avoid complexity of renumbering hosts/routers when changing ISP (w/ provider-allocated IP prefix)

Practical Objections Against NAT Port #s are meant to identify sockets Yet, NAT uses them to identify end hosts Makes it hard to run a server behind a NAT 138.76.29.7 Requests to 138.76.29.7 on port 80 10.0.0.1 NAT Which host should get the request??? Explicit config at NAT for incoming conn’s 10.0.0.2

Principled Objections Against NAT Routers are not supposed to look at port #s Network layer should care only about IP header … and not be looking at the port numbers at all NAT violates the end-to-end argument Network nodes should not modify the packets IPv6 is a cleaner solution Better to migrate than to limp along with a hack That’s what happens when network puts power in hands of end users!

Load Balancers

Replicated Servers One site, many servers www.youtube.com

Dedicated IP addresses Load Balancer Dedicated IP addresses Splits load over server replicas At the connection level Apply load balancing policies 10.0.0.1 Virtual IP address 12.1.11.3 10.0.0.2 10.0.0.3

Wide-Area Accelerators

At Connection Point to the Internet Appliance Internet Appliance Improve end-to-end performance Through buffering, compression, caching, … Incrementally deployable No changes to end hosts or the rest of the Internet

Example: Improve TCP Throughput ACK Appliance Internet Appliance Appliance with a lot of local memory Sends ACK packets quickly to the sender Overwrites receive window with a large value Or, even run a new and improved version of TCP

Example: Compression Compress the packet Send the compressed packet Appliance Internet Appliance Compress the packet Send the compressed packet Uncompress at the other end Maybe compress across successive packets

Example: Caching Cache copies of the outgoing packets Appliance Internet Appliance Cache copies of the outgoing packets Check for sequences of bytes that match past data Just send a pointer to the past data And have the receiving appliance reconstruct

Example: Encryption Two sites share keys for encrypting traffic Appliance Internet Appliance Two sites share keys for encrypting traffic Sending appliance encrypts the data Receiving appliance decrypts the data Protects the sites from snoopers on the Internet

Tunneling

IP Tunneling IP tunnel is a virtual point-to-point link Illusion of a direct link between two nodes Encapsulation of the packet inside IP datagram Node B sends a packet to node E … containing another packet as the payload A B E F Logical view: tunnel A B E F Physical view:

6Bone: Deploying IPv6 over IP4 A B E F tunnel Logical view: IPv6 IPv6 IPv6 IPv6 A B C D E F Physical view: IPv6 IPv6 IPv4 IPv4 IPv6 IPv6 Flow: X Src: A Dest: F data Flow: X Src: A Dest: F data Src:B Dest: E Flow: X Src: A Dest: F data Src:B Dest: E Flow: X Src: A Dest: F data A-to-B: IPv6 E-to-F: IPv6 B-to-C: IPv6 inside IPv4 B-to-C: IPv6 inside IPv4

Remote Access Virtual Private Network VPN server 12.1.1.73 Internet 12.1.1.0/24 12.1.1.1 1.2.3.4 Tunnel from user machine to VPN server A “link” across the Internet to the local network Encapsulates packets to/from the user Packet from 12.1.1.73 to 12.1.1.100 Inside a packet from 1.2.3.4 to 12.1.1.1

Conclusions Middleboxes address important problems Getting by with fewer IP addresses Blocking unwanted traffic Making fair use of network resources Improving end-to-end performance Middleboxes cause problems of their own No longer globally unique IP addresses Cannot assume network simply delivers packets

Midterm Exam 10:00-10:50am Wednesday March 14 In Frist 302 (not the lecture room!) Open books, notes, slides, etc. E-readers okay, but tablets/laptops are not Covers first five weeks of the course Lectures, precepts, readings, and assignments No precept on Friday Enjoy your spring break!