From 83a56528c671c1ceba3ab00ff4d7f6d5a0651609 Mon Sep 17 00:00:00 2001 From: TimothyLottes Date: Wed, 9 Nov 2016 00:12:33 -0500 Subject: [PATCH] Add files via upload --- 20070708.html | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 20070708.html diff --git a/20070708.html b/20070708.html new file mode 100644 index 0000000..04bc61f --- /dev/null +++ b/20070708.html @@ -0,0 +1,36 @@ +
+

20070708 - Breaking Firewalls

+
+ + +If the world ran only on static IPs with no firewalls, doing P2P connections would be easy. +Now when was anything worthwhile easy? Connecting the rest of the world requires breaking through firewalls and dealing with dynamic IP addresses. +
+
+
  1. End point = 6 bytes.
  2. +
  3. Public end point is what server sees as ip:port for client.
  4. +
  5. Private end point is what client sees as ip:port for self.
  6. +
  7. All clients connect to server and server responds with public end point.
  8. +
  9. So all clients know their public end point.
  10. +
  11. Clients also give private end point to server.
  12. +
  13. NATs might mangle private end point in UDP packet so encript it.
+
+Here is how S (server or peer) can connect A (peer) to B (peer). This works both on local LAN and across the wide open internet with NAT and firewalls. +

+
  1. A is connected with S.
  2. +
  3. B is connected with S.
  4. +
  5. S sends private and public end points of A to B.
  6. +
  7. S sends private and public end points of B to A.
  8. +
  9. A sends packets to private and public end points of B.
  10. +
  11. B sends packets to private and public end points of A.
  12. +
  13. A locks in ip:port it sees from B.
  14. +
  15. B locks in ip:port it sees from A.
+
+Keep in mind that NAT (network address translation) might result in a different public end point on each connection attempt, +so during steps 5 and 6, they might have to IP/port scan by attempting multiple public end points seeded from the public end point sent in steps 3 and 4. + + +
+ + +