SIP connection tracking

Slides:



Advertisements
Similar presentations
SIP, Firewalls and NATs Oh My!. SIP Summit SIP, Firewalls and NATs, Oh My! Getting SIP Through Firewalls Firewalls Typically.
Advertisements

Fall VoN 2000 SIP Servers SIP Servers: A Buyers Guide Jonathan Rosenberg Chief Scientist.
Communication Service Identifier Requirements on SIP draft-loreto-3gpp-ics-requirements.txt
Umut Girit  One of the core members of the Internet Protocol Suite, the set of network protocols used for the Internet. With UDP, computer.
NETW-250 Troubleshooting Last Update Copyright Kenneth M. Chipps Ph.D. 1.
Voice over IP Fundamentals
NAT/Firewall Traversal April NAT revisited – “port-translating NAT”
STUN Date: Speaker: Hui-Hsiung Chung 1.
Copyright 2005 – 2009 © by Elliot Eichen. All rights reserved. NAT (NAPT/PAT), STUN, and ICE `Structure of ice II, viewed along the hexagonal c-axis. Hydrogen.
January 23-26, 2007 Ft. Lauderdale, Florida An introduction to SIP Simon Millard Professional Services Manager Aculab.
SIP Working Group Stuff Jonathan Rosenberg dynamicsoft.
SIP Testing Methodology Elie Cohen ProLab PM 17/01/2003.
H. 323 and firewalls: Problem Statement and Solution Framework Author: Melinda Shore, Nokia Presenter: Shannon McCracken.
Mobile IP Overview: Standard IP Standard IP Evolution of Mobile IP Evolution of Mobile IP How it works How it works Problems Assoc. with it Problems Assoc.
NAT (Network Address Translator) Atif Karamat In the name of God the most merciful and the most compassionate.
Session Initiation Protocol (SIP) By: Zhixin Chen.
ICE Jonathan Rosenberg dynamicsoft. Issue 1: Port Restricted Flow This case does not work well with ICE right now Race condition –Works if message 13.
SIP, NAT, Firewall SIP NAT Firewall How to Traversal NAT/Firewall for SIP.
Internet Telephony Helen J. Wang Network Reading Group, Jan 27, 99 Acknowledgement: Jimmy, Bhaskar.
1 The Design and Implementation of Mobile Session Controller.
RTP Multiplexing draft-rosenberg-rtcweb-rtpmux Jonathan + {Rosenberg, Lennox}
RTP Relay Support in Intelligent Gateway Author: Pieere Pi
NAT Traversal Speaker: Chin-Chang Chang Date:
1 Semester 2 Module 10 Intermediate TCP/IP Yuda college of business James Chen
STUN - Simple Traversal of User Datagram Protocol (UDP) Through Network Address Translators (NATs) speaker : Wenping Zhang date :
All rights reserved © 1999, Alcatel, Paris. page n° 1 SIP for Xcast SIP for the establishment of xcast-based multiparty.
 Socket  The combination of an IP address and a port number. (RFC 793 original TCP specification)  The name of the Berkeley-derived application programming.
1 © NOKIA 1999 FILENAMs.PPT/ DATE / NN SIP Service Architecture Markus Isomäki Nokia Research Center.
Chapter 6-2 the TCP/IP Layers. The four layers of the TCP/IP model are listed in Table 6-2. The layers are The four layers of the TCP/IP model are listed.
Presented By Team Netgeeks SIP Session Initiation Protocol.
1 NAT & RTP Proxy Date: 2009/7/2 Speaker: Ni-Ya Li Advisor: Quincy Wu.
SIP:Session Initiation Protocol Che-Yu Kuo Computer & Information Science Department University of Delaware May 11, 2010 CISC 856: TCP/IP and Upper Layer.
Simon Millard Professional Services Manager Aculab – booth 402 The State of SIP.
Security, NATs and Firewalls Ingate Systems. Basics of SIP Security.
VoIP Signaling Protocols A signaling protocol is a common language spoken by telephones and call-management servers, the PSTN, and legacy PBX systems as.
5 Firewalls in VoIP Selected Topics in Information Security – Bazara Barry.
Making SIP NAT Friendly Jonathan Rosenberg dynamicsoft.
Interactive Connectivity Establishment : ICE
Indication of Terminated Dialog draft-holmberg-sipping txt Christer Holmberg NomadicLab Ericsson.
4343 X2 – The Transport Layer Tanenbaum Ch.6.
1 Internet Telephony: Architecture and Protocols an IETF Perspective Authors:Henning Schulzrinne, Jonathan Rosenberg. Presenter: Sambhrama Mundkur.
SIPWG Slides for IETF 51 Jonathan Rosenberg dynamicsoft.
K. Salah1 Security Protocols in the Internet IPSec.
Socket Programming original by Joonbok Lee KAIST heavily adapted by /Jens.
Firewalls, Network Address Translators(NATs), and H.323
VoIP ALLPPT.com _ Free PowerPoint Templates, Diagrams and Charts.
Chapter 3: Packet Switching (overview)
Chapter 9: Transport Layer
IP Telephony (VoIP).
Instructor Materials Chapter 9: Transport Layer
NFD Tunnel Authentication
Session Initiation Protocol
Outline Basics of network security Definitions Sample attacks
BOOTP and DHCP Objectives
Introduction to Computers
Session Initiation Protocol (SIP)
Mobility And IP Addressing
NET323 D: Network Protocols
Client-Server Interaction
Net 431: ADVANCED COMPUTER NETWORKS
How to fix yahoo mail pop sending and receiving issues?
NET323 D: Network Protocols
Starting TCP Connection – A High Level View
IETF SIP Interim Meeting, Feb. 2001
Request for Comments(RFC) 3489
Session 20 INST 346 Technologies, Infrastructure and Architecture
Lecture 4a Mobile IP 1.
Outline Basics of network security Definitions Sample attacks
Exceptions and networking
More on Discovery and Advertisement
Presentation transcript:

SIP connection tracking SIP connection tracking/NAT and related problems Patrick McHardy <kaber@trash.net> Netfilter Workshop 2007

Overview - Used for locating endpoints and negotiation of session parameters - Conntrack/NAT helper in mainline since 2.6.18. Only supports very basic set of features, doesn't handle many cases - Large patchset queued for 2.6.25 solving many of the problems. Some hard ones remain ...

General problems - Very firewall and NAT unfriendly protocol: doesn't care about ports and address at all, responses to requests may be sent on different ports, to different IP addresses, ... Some clients seem to consider it elegant to make use of even the most absurd things allowed by the specification.

General problems - Hard to parse: continuation lines, strange whitespace rules, lots of special cases. Seems to be aimed at human readability, not parsability. - Patches fix parsing to be mostly RFC-compliant. Replies on different ports than the request not handled properly.

Registration - User-Agent sends REGISTER request to registrar containing its Contact address, where requests directed at the UA should be sent to. - Need to create expectation for Contact address before seeing response from registrar to perform NAT on the expectation and avoid clashes.

Registration - Would be preferable to wait for confirmation, allows to put trust purely in the registrar: use of inactive expectations only for reservation purposes, activated on response indicating success. - Requests may arrive from anywhere, not just the registrar. Need wildcard as source for expectation.

Registration - Expectations for incoming requests not only need to be unique among expectations, also must not clash with other conntrack entries:

Registration UA1:5061 -> Registrar:5060 REGISTER Contact: UA1:5061 UA2:5061 -> Registrar:5060 REGISTER Contact: UA2:5061 After NAT: NAT:5061 -> Registrar:5060 REGISTER Contact: NAT:5062 Expect * -> NAT:5062 NAT:5062 -> Registrar:5060 REGISTER Contact: NAT:5063 Expect * -> NAT:5063 - Requests from the Registrar to UA1's Contact address will match the existing connection from UA2 in the reply direction and go to the wrong UA.

Registration - Contact address must match the address used for registration to avoid clashes: UA1:5061 -> Registrar:5060 REGISTER Contact: UA1:5061 After NAT: NAT:5061 -> Registrar:5060 REGISTER Contact: NAT:5062 Expect: * -> NAT:5062

Registration - Incoming requests from the registrar to the SNATed contact address are DNATed to the internal host, making them look exactly like the reply of the connection used for registration => clash Registrar:5060 -> NAT:5062 INVITE <sip:user@nat:5062> DNATed to original Contact address: UA1:5061 Registrar:5060 -> UA1:5061 Clash with UA1:5061 -> Registrar:5060

Registration - In conclusion: need to make sure each UA uses the same, unique port for both communication and signaling expectations. Port must not only be unique for all connections to the registrar, but for all SIP connections because of wildcard expectations.

Registration - Helpers currently not able to remap the “helped” connection, NAT setup is completed before helper gets first packet. - Even if it were possible, choosing a unique port requires scanning entire conntrack table.

Registration - after choosing the port (must be done on first packet) and before setting up the signaling expectation (done on REGISTER request), other expectations may be created that still clash. Hard to avoid at expectation creation time because of wildcards (would require to scan entire conntrack table). Possible solution is to create an inactive expectation for reserving the tuple.

- INVITE requests are used to negotiate and establish sessions Invitations - INVITE requests are used to negotiate and establish sessions

Invitations - Invite request may also contain Contact address. Further requests may arrive at the new Contact address. Can't create expectations since the connection the INVITE arrives on may already be expected. Would allow to create deep expectation hierarchy: stack explodes at conntrack destruction time. Also no expiration time like in REGISTER requests.

Invitations - INVITE request contains address and port numbers for media streams. Media streams in both directions may not be symmetrical and may arrive from unknown third parties. Expectations must use a wildcard for the source.

Invitations - Media may arrive as soon as the media information is sent (early media), can't wait for confirmation from registrar. Allows to create full-blown expectations with wildcards using just a single UDP packet. - Maybe at least make sure the expected connection looks like valid RTP?

Invitations - When multiple endpoints sharing the same user ID are located behind the firewall, the same media information may be received multiple times on different connection. Must perform a lookup before registering the expectation to avoid clashes.

Invitations - Problem: the media expectation “belongs” to the first connection it was seen on. If that endpoint rejects the call, the expectation will get cleaned up. It is still needed for the other endpoints though.

Invitations - Media expectations should not cause signaling expectations to get evicted: helpers can define “expectation classes”, eviction prefers expectations of the same class.