Peer-to-Peer Networks
18 Hole Punching
Christian Schindelhauer
Technical Faculty Computer-Networks and Telematics University of Freiburg
Peer-to-Peer Networks 18 Hole Punching Christian Schindelhauer - - PowerPoint PPT Presentation
Peer-to-Peer Networks 18 Hole Punching Christian Schindelhauer Technical Faculty Computer-Networks and Telematics University of Freiburg BBQ and Swimming at Lake Tuni 2 BBQ and Swimming at Lake Tuni Tuesday 27.07.2010, 4:30 pm
Christian Schindelhauer
Technical Faculty Computer-Networks and Telematics University of Freiburg
2
pm
(Bld. 051)
Bertoldsbrunnen
3
4
network
5
6
external net
ActiveX, JavaScript from html pages
visible) hots
and attacks to secured hosts
connection
Peer connections
7
source of the request
external address all packets from will be sent through this address
external address which are delivered to the local address
new port
message inside
arriving on the internal port
to external addresses
port use this external port
sent a packet to this host if they have received a packet recently from the same internal port (to any external port)
address use the same external port
sent a packet to this host if they have received a packet recently from the same internal port to the same external port
8
9
Peer-to-Peer Communication Accross Network Address Translators Bryan Ford, Pyda Srisuresh, Dan Kegel
NATed) server to relay all UDP or TCP connections
connect to the server
all messages
10
Peer-to-Peer Communication Accross Network Address Translators Bryan Ford, Pyda Srisuresh, Dan Kegel
NAT
always starts connection
a request for connection reversal
connection requests is necessary
11
Peer-to-Peer Communication Accross Network Address Translators Bryan Ford, Pyda Srisuresh, Dan Kegel
12
Technical Report Caltech
13
14
Peer-to-Peer Communication Accross Network Address Translators Bryan Ford, Pyda Srisuresh, Dan Kegel
15
Peer-to-Peer Communication Accross Network Address Translators Bryan Ford, Pyda Srisuresh, Dan Kegel
16
Peer-to-Peer Communication Accross Network Address Translators Bryan Ford, Pyda Srisuresh, Dan Kegel
Traversal of User Datagram Protocol Through Network Address Translators (NATs), 2003
17
18
from: http://en.wikipedia.org/wiki/STUN
communicates to at least two
server
NAT types
19
20
Category UDP TCP Connection? no yes Symmetry yes no client uses „connect“, server uses „accept“ or „listen“ Acknowledgments no yes must have the correct sequence numbers
Peer-to-Peer Communication Accross Network Address Translators Bryan Ford, Pyda Srisuresh, Dan Kegel
address and port number) of A and B
and private endpoints
then the host retries after a short delay
21
22
Communication Accross Network Address Translators
Srisuresh, Dan Kegel
Peer-to-Peer Communication Accross Network Address Translators Bryan Ford, Pyda Srisuresh, Dan Kegel
contacts B using the public address
case
hole in his NAT router before A
connection
23
connection start
message
24
ACK
simultaneous successful „accept()“ and „connect()“
itself from the wire
25
26
Picture from Characterization and Measurement
through NATs and Firewalls
Saikat Guha, Paul Francis
27
Peer-to-Peer Communication Accross Network Address Translators Bryan Ford, Pyda Srisuresh, Dan Kegel
28
packets of small TTL
Sequence Number
29
packet with small TTL
not reach target
sequence number
produces a spoofed SYNACK
both clients
two outermost NATs share an interface
fatal error
number, spoofed SYNACK might be „out of window“
Eppinger, TCP Connections for P2P Apps: A Software Ap- proach to Solving the NAT Problem. Tech. Rep. CMU- ISRI-05-104, Carnegie Mellon University, Pittsburgh, PA,
30
with small TTL
not reach target
server
fatal error or
following an outbound SYN
Guha, Takeda, Francis, NUTSS: A SIP-based Approach to UDP and TCP Network Connectivity. In Proceedings of SIGCOMM’04 Workshops (Portland, OR,
31
packets
connection
Rendezvous server
packets
Biggadie, Ferullo, Wilson, Perrig, NATBLASTER: Establishing TCP connections between hosts behind NATs. In Proceedings of ACM SIGCOMM, ASIA Workshop (Beijing, China, Apr. 2005).
32
from Characterization and Measurement of TCP Traversal through NATs and Firewalls, Saikat Guha, Paul Francis
33
for incoming connections
Rendezvous (STUNT) server
predicted ports
predicted, e.g.
from Characterization and Measurement of TCP Traversal through NATs and Firewalls, Saikat Guha, Paul Francis
34
Peer VoIP System, Saikat Guha, Neil Daswani, Ravi Jain
Christian Schindelhauer
Technical Faculty Computer-Networks and Telematics University of Freiburg