Knut Omang Ifi/Oracle 16 Nov, 2015



Similar documents
How To Understand The Purpose Of A Sip Aware Firewall/Alg (Sip) With An Alg (Sip) And An Algen (S Ip) (Alg) (Siph) (Network) (Ip) (Lib

Three-Way Calling using the Conferencing-URI

VoIP LAB. 陳 懷 恩 博 士 助 理 教 授 兼 所 長 國 立 宜 蘭 大 學 資 訊 工 程 研 究 所 TEL: # 255

SIP ALG - Session Initiated Protocol Applications- Level Gateway

OSSIR, November /45

VoIP and NAT/Firewalls: Issues, Traversal Techniques, and a Real-World Solution

SIP Basics. CSG VoIP Workshop. Dennis Baron January 5, Dennis Baron, January 5, 2005 Page 1. np119

Multimedia Communication in the Internet. SIP: Advanced Topics. Dorgham Sisalem, Sven Ehlert Mobile Integrated Services FhG FOKUS

Telematics. 14th Tutorial - Proxies, Firewalls, P2P

Session Initiation Protocol and Services

SIP Essentials Training

NTP VoIP Platform: A SIP VoIP Platform and Its Services

TECHNICAL SUPPORT NOTE. 3-Way Call Conferencing with Broadsoft - TA900 Series

Session Initiation Protocol (SIP)

Voice over IP (SIP) Milan Milinković

NAT and Firewall Traversal with STUN / TURN / ICE

Voice over IP & Other Multimedia Protocols. SIP: Session Initiation Protocol. IETF service vision. Advanced Networking

Formación en Tecnologías Avanzadas

Adaptation of TURN protocol to SIP protocol

Multimedia & Protocols in the Internet - Introduction to SIP

Media Gateway Controller RTP

3.1 SESSION INITIATION PROTOCOL (SIP) OVERVIEW

AGILE SIP TRUNK IP-PBX Connection Manual (Asterisk)

TECHNICAL CHALLENGES OF VoIP BYPASS

Lecture Objectives. Lecture 6 Mobile Networks: Nomadic Services, DHCP, NAT, and VPNs. Agenda. Nomadic Services. Agenda. Nomadic Services Functions

EE4607 Session Initiation Protocol

Internet Protocol: IP packet headers. vendredi 18 octobre 13

IP Office 4.2 SIP Trunking Configuration Guide AT&T Flexible Reach and AT&T Flexible Reach with Business in a Box (SM)

Application Note. Firewall Requirements for the Onsight Mobile Collaboration System and Hosted Librestream SIP Service v5.0

Avaya IP Office 4.0 Customer Configuration Guide SIP Trunking Configuration For Use with Cbeyond s BeyondVoice with SIPconnect Service

IP Office Technical Tip

NAT and Firewall Traversal. VoIP and MultiMedia /77

Application Notes for Configuring SIP Trunking between McLeodUSA SIP Trunking Solution and an Avaya IP Office Telephony Solution 1.

Part II. Prof. Ai-Chun Pang Graduate Institute of Networking and Multimedia, Dept. of Comp. Sci. and Info. Engr., National Taiwan University

NAT and Firewall Traversal with STUN / TURN / ICE

Internet Working 15th lecture (last but one) Chair of Communication Systems Department of Applied Sciences University of Freiburg 2005

VoIP. What s Voice over IP?

Application Note. Onsight Connect Network Requirements V6.1

Protecting and controlling Virtual LANs by Linux router-firewall

Lehrstuhl für Informatik 4 Kommunikation und verteilte Systeme

Application Notes for IDT Net2Phone SIP Trunking Service with Avaya IP Office Issue 1.0

The use of IP networks, namely the LAN and WAN, to carry voice. Voice was originally carried over circuit switched networks

Basic Vulnerability Issues for SIP Security

VoIP Fraud Analysis. Simwood esms Limited Tel:

13!Signaling Protocols for Multimedia! Communication

How to make free phone calls and influence people by the grugq

SIP: NAT and FIREWALL TRAVERSAL Amit Bir Singh Department of Electrical Engineering George Washington University

Firewall. IPTables and its use in a realistic scenario. José Bateira ei10133 Pedro Cunha ei05064 Pedro Grilo ei09137 FEUP MIEIC SSIN

Denial of Services on SIP VoIP infrastructures

internet technologies and standards

SIP Trunking & Peering Operation Guide

SIP: Session Initiation Protocol. Copyright by Elliot Eichen. All rights reserved.

An outline of the security threats that face SIP based VoIP and other real-time applications

Appendix A: Configuring Firewalls for a VPN Server Running Windows Server 2003

What I am going to talk about. NAT IPSec and NAT Proxy, Reverse proxy P2P Firewall

21.4 Network Address Translation (NAT) NAT concept

NAT Traversal for VoIP

Linux firewall. Need of firewall Single connection between network Allows restricted traffic between networks Denies un authorized users

VoIP some threats, security attacks and security mechanisms. Lars Strand RiskNet Open Workshop Oslo, 24. June 2009

NAT Traversal for VoIP. Ai-Chun Pang Graduate Institute of Networking and Multimedia Dept. of Comp. Sci. and Info. Engr. National Taiwan University

Firewalls. Chien-Chung Shen

Internet Security. Internet Security Voice over IP. Introduction. ETSF10 Internet Protocols ETSF10 Internet Protocols 2011

Finding VoIP vulnerabilities while you sleep

Transparent weaknesses in VoIP

Mobicents 2.0 The Open Source Communication Platform. DERUELLE Jean JBoss, by Red Hat 138

MINIMUM NETWORK REQUIREMENTS 1. REQUIREMENTS SUMMARY... 1

Netfilter / IPtables

How To Understand A Firewall

SIP OVER NAT. Pavel Segeč. University of Žilina, Faculty of Management Science and Informatics, Slovak Republic

Chapter 7. Firewalls

SIP Introduction. Jan Janak

Lecture 17 - Network Security

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

Firewalls P+S Linux Router & Firewall 2013

Intro to Linux Kernel Firewall

IPv6 Security: How is the Client Secured?

Session Initiation Protocol (SIP) 陳 懷 恩 博 士 助 理 教 授 兼 計 算 機 中 心 資 訊 網 路 組 組 長 國 立 宜 蘭 大 學 資 工 系 TEL: # 340

NAT TCP SIP ALG Support

Security Issues of SIP

Interoperability between IPv4 and IPv6 SIP User Agents

Advanced routing scenarios POLICY BASED ROUTING: CONCEPTS AND LINUX IMPLEMENTATION

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

Digi Connect WAN Application Helper NAT, GRE, ESP and TCP/UPD Forwarding and IP Filtering

BroadCloud PBX Customer Minimum Requirements

Main functions of Linux Netfilter

Hacking Trust Relationships of SIP Gateways

Session Initiation Protocol (SIP) The Emerging System in IP Telephony

Dynamic Host Configuration Protocol (DHCP) 02 NAT and DHCP Tópicos Avançados de Redes

Enabling Security Features in Firmware DGW v2.0 June 22, 2011

Request for Comments: August 2006

Linux Firewall Wizardry. By Nemus

SIP Trunking Configuration with

Voice over IP Communications

White paper. SIP An introduction

ARCHITECTURES TO SUPPORT PSTN SIP VOIP INTERCONNECTION

Technical Communication 1201 Norphonic emergency rugged telephone on Alcatel-Lucent OmniPCX Enterprise

LifeSize Transit Deployment Guide June 2011

On-Demand VPN Service between Home Networks for NGN Users

Internet Voice, Video and Telepresence Harvard University, CSCI E-139. Lecture #5

Transcription:

RT protocols and Firewall/NAT - SIP FW/NAT support in the Linux kernel Knut Omang Ifi/Oracle 16 Nov, 2015 32 Overview Quick overview of some protocols in use for real-time multimedia SIP/SDP Other protocols that struggles with firewall/nat Details of SIP/SDP Firewall and NAT traversal examples with SIP/SDP IPv6 to the rescue? Firewall and NAT support in the Linux kernel Iptables and ebtables Routing Traffic control using tc qdiscs and filters netem 33

Some protocols that struggle with firewall/nat SIP (Session Initiation Protocol) H323 (ITU telecoms standard) Oscar (AIM, ICQ, IChat) Skype MSNP (MSN) XMPP (Jabber, GoogleTalk/libjingle) IPsec (AH/ESP/Tunnel mode) 34 Session Initiation Protocol (SIP) HTTP inspired protocol for session management: Registration/location information Establish (and take down) session Multiple channels (voice,video,ppt,chat, ) Add/remove participants Renegotiate media Forking Bridge to POTS (Plain Old Telephony Systems) Session layer running on top of different protocols (UDP,TCP, ) Increasingly used for IP telephony and video conferencing Lots of equipment available/being developed that uses SIP in some form Also embraced by telecoms by means of IMS 35

SIP and firewall/nat STUN, TURN, ICE development driven by SIP community... Still not fully solved with standards Weak ALG implementations complicate Increasing awareness in community With RealTunnel, ICE used with: STUN,TURN tunnelling protocol for cases where STUN/TURN does not provide working candidates 36 H323 and Firewall/NAT Similar problems Somewhat constrained by H323s functionality compared to SIP Deviced solution: H460.x Standards for NAT traversal Supported a.o. with RealTunnel 37

Oscar (AIM,ICQ,IChat) and Firewall/NAT Supports most types of firewalls and NATs Similar mechanisms as used for SIP Even tunnelling over https if necessary 38 Skype and firewall/nat Based on software developed for Kazaa Per-to-peer intended for file sharing Gets much for free from P2P.. Proprietary and encrypted Solves NAT traversal with similar strategies as STUN/TURN and tunnelling if necessary Relaying via (and relying on) private users Breakdown in 2007 thought to be due to diminishing number of non-fw/nat ed users 39

MSNP (MSN) and firewall/nat RealTunnel used to serve MSN community with free download Had significant user base Microsoft increasingly aware of problem Acquired Skype in 2011 for 8.5$ bn Discontinued old MSN client in 2013 Replaced with Skype.. 40 XMPP and Firewall/NAT Jabber Basis for Googletalk: Implements STUN/TURN/ICE for XMPP(++) 41

IPsec AH (Authentication Header protocol) Additional header that authenticates the information in the IP header Ensures that the IP header information is not changed by intermediates.. Does not encrypt payload but checksums it to avoid tampering.. ESP (Encapsulating Security Payload protocol) Encapsulates and encrypts a checksum of the IP payload does not checksum/verify the IP header Tunnel mode: Either or combinations of ESP/AH where the payload is a complete IP packet with its own IP header 42 IPsec and Firewall/NAT AH: Defeats the very purpose of NAT! Any NAT ed packets will be dropped.. ESP: Address modifications may pass Port modifications lead to dropped packets! The port numbers are in the transport headers (UDP/TCP..) which are inside the encrypted payload! 43

IPsec and Firewall/NAT (2) NAT-T (RFC 3947,3948) Adds an additional UDP header to ESP packets Defines port 4500 as the ipsec-nat-t port Limited: Requires one side to have destination nat ( static nat) Defines a protocol for exchanging NAT information Problem: DNAT allows a single listener What if multiple VPNs are to communicate across the same NAT devices? Approach requires firewall access not always possible 44 Firewalls and IPv6 Most of the problems remains Open/blocked ports Detecting best path for media UDP/TCP QoS problems 45

NAT and IPv6 what will happen? Pros: Avoiding renumbering: when changing Internet provider.. Facilitating multi-homing Use of multiple providers from same domain Topology hiding Preventing host counting by attackers Router scalability IPv6 already old what about host mobility? Cons: End-to-end routability All the complexity of NAT in today s lecture.. Much reconfiguration to do already DHCP, DNS dynamic update Provider independent IP blocks Good for Cisco,Juniper,Nortel (see ao. http://tools.ietf.org/html/draft-iab-ipv6nat-00) 46 NAT and IPv6 what will happen? 2011: Linux implementation of NAT for IPv6 In mainline kernel from v.3.7 (merged Oct.2012) 47

Our simple call example: (now with SIP) Registration per@realsip.com: 192.168.0.81:5060 ida@realsip.com: 192.168.20.10:4560 REGISTER sip:realsip.com REGISTER sip:realsip.com User: per User: ida 192.168.20.10 192.168.0.81 48 Our simple call example: (now with SIP) Call: INVITE sip:ida@realsip.com m=audio 42921 RTP/AVP per@realsip.com: 192.168.0.81:5060 ida@realsip.com: 192.168.20.10:5060 INVITE sip:ida@realsip.com User: per m=audio 14351 RTP/AVP User: ida 192.168.0.81:14351 192.168.0.81:42921 192.168.0.81 192.168.20.10 49

A complete SIP dialogue SIP registrar Per Ida INVITE sip:ida@realsip.com 100 Trying INVITE sip:ida@realsip.com ACK sip:ida@192.168.20.10:5060 In call Ida answers ACK sip:ida@192.168.20.10:5060... BYE sip:ida@192.168.20.10:5060 BYE sip:ida@192.168.20.10:5060 50 A SIP request with SDP INVITE sip:ida@realsip.com SIP/2.0 Via: SIP/2.0/UDP 192.168.0.81:5061;branch=z9hG4bK-32063-1-1 From: "per" <sip:per@realsip.com>;tag=1 To: <sip:ida@realsip.com> Call-ID: 1-32063@192.168.0.81 CSeq: 1 INVITE Contact: <sip:per@192.168.0.81:5061> Max-Forwards: 70 Subject: Simple Call Content-Type: application/sdp Content-Length: 186 v=0 o=- 53655765 2353687637 IN IP4 192.168.0.81 s=c=in IP4 192.168.0.81 t=0 0 m=audio 6001 RTP/AVP 8 a=rtpmap:8 PCMA/8000 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-11,16 51

A SIP request with SDP (received) INVITE sip:ida@192.168.0.81:5062 SIP/2.0 Via: SIP/2.0/UDP 192.168.0.84:5060;branch=z9hG4bK-ffdef4f8xc0a80054 Via: SIP/2.0/UDP 192.168.0.81:5061;branch=z9hG4bK-32063-1-3 From: "per" <sip:per@realsip.com>;tag=1 To: <sip:ida@realsip.com> Call-ID: 1-32063@192.168.0.81 CSeq: 2 INVITE Contact: <sip:per@192.168.0.81:5061> Max-Forwards: 69 Subject: Simple Call Content-Type: application/sdp Record-Route: <sip:192.168.0.84:5060;lr> Content-Length: 186 v=0 o=- 53655765 2353687637 IN IP4 192.168.0.81 s=c=in IP4 192.168.0.81 t=0 0 m=audio 6001 RTP/AVP 8 a=rtpmap:8 PCMA/8000 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-11,16 52 A SIP response with SDP SIP/2.0 Via: SIP/2.0/UDP 192.168.0.81:5061;branch=z9hG4bK-32063-1-3 Record-Route: <sip:192.168.0.84:5060;lr> From: "per" <sip:per@realsip.com>;tag=1 To: <sip:ida@realsip.com>;tag=1 Call-ID: 1-32063@192.168.0.81 CSeq: 2 INVITE Contact: <sip:ida@192.168.0.81:5062;transport=udp> Content-Type: application/sdp Content-Length: 131 v=0 o=- 53655765 2353687637 IN IP4 192.168.0.81 s=c=in IP4 192.168.0.81 t=0 0 m=audio 6000 RTP/AVP 0 a=rtpmap:0 PCMU/8000 53

A SIP response with SDP (received) SIP/2.0 Via: SIP/2.0/UDP 192.168.0.84:5060;branch=z9hG4bK-ffdef4f8xc0a80054 Via: SIP/2.0/UDP 192.168.0.81:5061;branch=z9hG4bK-32063-1-3 Record-Route: <sip:192.168.0.84:5060;lr> From: "per" <sip:per@realsip.com>;tag=1 To: <sip:ida@realsip.com>;tag=1 Call-ID: 1-32063@192.168.0.81 CSeq: 2 INVITE Contact: <sip:ida@192.168.0.81:5062;transport=udp> Content-Type: application/sdp Content-Length: 131 v=0 o=- 53655765 2353687637 IN IP4 192.168.0.81 s=c=in IP4 192.168.0.81 t=0 0 m=audio 6000 RTP/AVP 0 a=rtpmap:0 PCMU/8000 54 A more complex example: Registration RealTunnel servers pear.com: via 1.2.3.4:23456 gigasoft.com: via 5.6.7.8:45608 (establish RealTunnel connection) REGISTER sip:pear.com RealTunnel Enterprise proxy (establish RealTunnel connection) 1.2.3.4 5.6.7.8 User: per@pear.com 192.168.0.3 RealTunnel Enterprise proxy 192.168.20.3 User: ida@gigasoft.com 192.168.0.81 Sip registrar for gigasoft.com Sip registrar for pear.com 192.168.20.10 per@pear.com: via 192.168.20.3:5060 55

A more complex example: Registration pear.com: via 1.2.3.4:23456 gigasoft.com: via 5.6.7.8:45608 RealTunnel servers RealTunnel Enterprise proxy 1.2.3.4 RealTunnel Enterprise proxy 5.6.7.8 User: per@pear.com 192.168.0.3 REGISTER sip:gigasoft.com 192.168.20.3 User: ida@gigasoft.com 192.168.0.81 Sip registrar for gigasoft.com Sip registrar for pear.com ida@gigasoft.com: via 192.168.0.3:5060 192.168.20.10 per@pear.com: via 192.168.20.3:5060 56 A more complex example: call per@pear.com visiting gigasoft.com Enterprise proxy for gigasoft.com Sip registrar for gigasoft.com 100 Trying Enterprise proxy for pear.com Sip registrar for pear.com Realtunnel servers Ida answers ida@gigasoft.com visiting pear.com ACK sip:ida_url_code@realtunnel.com In call (puh)... 57

Skype vs SIP based VOIP? Skype: Proprietary protocol Large user base Easy to use Pushed by Microsoft SIP: Open standard (but loose ) Vendor specific implementations Both proprietary and open clients Lots of hardware and infrastructure: Telecommunication infrastructure, both fixed and mobile Dominant in backbones.. 58 Summary RT multimedia protocols demands good RT QoS - peer to peer! Particularly susceptible to firewalls and NAT Can generate very complex initiation scenarios Linux and firewall/nat Firewalls and NAT Firewalls and NAT can to some extent be characterized potential for issues and problems limited observability in the general case! Lots of protocols exhibit similar problems SIP, H323, Oscar, Skype, XMPP, IPsec No rescue in IPv6. 59

Linux packet handling toolbox Packet filtering (iptables,ebtables) Connection tracking (conntrack) Packet classification and traffic shaping/control (tc) Routing/forwarding (ip route) Test tools (netem, tcpdump, wireshark, log targets,...) 60 netfilter packet flow.. 61

iptables able to filter where packets are passed at IP protocol level 5 tables: filter, nat, mangle, raw, security filter for typical filtering of packets nat for network address translation FORWARD, INPUT and OUTPUT PREROUTING (incoming) POSTROUTING (forwarded outgoing) OUTPUT (packets coming from the host itself) mangle: modify the packets 62 ebtables similar to iptables but at link layer filter, forward, nat on ethernet addresses send upwards in stack can be used to implement special handling in virtual bridges often IP layer does not see packet at all useful in virtualization: host want's to interfere with bridged traffic from guests 63

Linux routing/forwarding [root@ukvm01 ~]# ip route show default via 192.168.167.1 dev eth0 proto static metric 100 192.168.167.0/24 dev eth0 proto kernel scope link src 192.168.167.101 metric 100 [root@ukvm01 ~]# ip route show table local broadcast 127.0.0.0 dev lo proto kernel scope link src 127.0.0.1 local 127.0.0.0/8 dev lo proto kernel scope host src 127.0.0.1 local 127.0.0.1 dev lo proto kernel scope host src 127.0.0.1 broadcast 127.255.255.255 dev lo proto kernel scope link src 127.0.0.1 broadcast 192.168.167.0 dev eth0 proto kernel scope link src 192.168.167.101 local 192.168.167.101 dev eth0 proto kernel scope host src 192.168.167.101 broadcast 192.168.167.255 dev eth0 proto kernel scope link src 192.168.167.101 64 ip route Table space defined by /etc/iproute2/rt_tables: May add own table names or just use number: [root@ukvm01 ~]# ip route add 192.168.1.0/24 dev eth0 table 23 [root@ukvm01 ~]# ip route show table 23 192.168.1.0/24 dev eth0 scope link # # reserved values # 255 local 254 main 253 default 0 unspec # # local # #1 mytable 65

Connection tracking: conntrack Built into all kernels optional user level tool to display: conntrack All connections tracked by the kernel Usable by firewall and NAT functionality Allows optimization to only inspect packets that does not belong to a connection 66 Traffic shaping and control: tc Ability to discriminate traffic Traffic classes Examples: High bandwidth, low latency Allow setup to get resources distributed among usages Prioritize traffic as needed Easy to combine with packet filtering (iptables) 67