15

Did you use teamviewer? (comic question i know... Who doesn't use it?)

Do you have any idea how does teamviewer make connection even if i am behind the router, firewall, switch and my local firewall..?

I'm trying to imagine a connection that is between remote machinge and my computer. Remote machine is sending the packets (and its header (for instance, destination IP, message body)) to me but it only knows my id number(which is given by my local teamviewer application).

And this packets are reaching to my computer even if there is a juniper firewall (and also my windows firewall).

What kind a message body is recieving by computer? (of course it is not like xml, text, html, excel :)

Do you have any idea?

PS. Please share your knowledge like you are explaining to beginner level user.

uzay95
  • 14,378
  • 28
  • 105
  • 167

1 Answers1

17

The software is communicating with a central server, and has made an outbound connection. When you start TeamViewer, it will try to make a direct connection, but if both directions fail that (ie. firewall or NATting at both places), then it will fall back on communicating through a server.

This is basically the same approach most online games use. Changes at one end is sent to a central server, and is then relayed back to other connected computers.

Lasse V. Karlsen
  • 350,178
  • 94
  • 582
  • 779
  • How does it easily pass the firewalls even they are checking the contents of packets and their ports? – uzay95 May 05 '10 at 21:56
  • @uzay95: I don't understand what you mean by that comment but I'll try to clarify on the commentator's already clear answer. As TeamViewer has already made an outbound connection to the master server (firewalls allow outbound connections out-of-the-box), if the computer that is wishing to talk to you fails to connect, then it will tunnel its data through the pre-existing master server connection. Hence, you have bypassed the firewall completely (although at a potential speed loss). – Saul May 05 '10 at 22:27
  • 2
    there's also a technique called UDP Hole Punching (http://en.wikipedia.org/wiki/UDP_hole_punching) that can do that with little involvement from central server – Hubert Kario Jul 11 '11 at 12:42
  • even in normal conditions does teamviewer needs a server to initiate contact between two computers? – Muhammad Umer Sep 30 '14 at 22:20
  • 1
    Yes, TeamViewer absolutely need the server, it cannot connect using an IP address only. – Lasse V. Karlsen Oct 01 '14 at 09:07
  • TeamViewer *can* actually connect to a computer on the same network without a server. – Yay295 Jun 26 '18 at 17:10
  • It can now. As far as I remember, it couldnt in 2014. The KB article detailing how it works dates back to 2017. – Lasse V. Karlsen Jun 26 '18 at 20:06