If I download torrents while using a VPN, how do trackers know my real IP?
Solution 1
The peers don't need to know your real IP, you are giving them a way to contact you by simply contacting them yourself.
Even if the tracker shares an unreachable IP (your VPN) and other peers fail to connect, directly at least, you make yourself reachable by contacting those peers yourself.
You may be blocking inbound requests from unknown hosts, but by contacting a peer and requesting data from it yourself you are initiating a two way data connection that they can use to not only send data, but to request it as well.
The VPN is probably doing exactly what you expect, blocking unknown host connections, but once you contact someone through it you have effectively established a two way pipe between you and a peer. Whenever your software gets an updated list of peers and contacts new peers then you will get new data flowing outwards as well as inwards.
Most home router firewalls (with UPNP disabled) will automatically block incoming connections as well which creates this same problem of peers not being able to connect to you. Once you start connecting to them (per the list supplied by your tracker) then you are effectively poking very specific holes in your firewall for communication to happen to (and from) very specific places. The VPN is essentially a remote firewall from this perspective.
Solution 2
The VPN is forwarding traffic to and from your computer - it is literally inbetween your system and the Internet.
So, assuming it is set up properly, all your outgoing Internet traffic is directed to the VPN. The VPN then forwards the traffic where it needs to go.
Routers do this all the time, an Internet-access-providing VPN is really just a router where you have an encrypted connection to it.
The VPN knows your ISP-provided IP so it knows where to send the traffic when it receives it.
Related videos on Youtube
Mark Read
Updated on September 18, 2022Comments
-
Mark Read over 1 year
From my understanding this is how trackers work:
- I want a file. My BitTorrent client tells the trackers I want that file
- Other peers who also want that file do the same thing.
- The tracker connects me to those peers and/or connects those peers to me and we all download the file together.
However, if I am using a VPN how do they connect to me? I tested the VPN I am using with https://ipleak.net/ and http://ipmagnet.services.cbcdn.com and it always shows my VPN's IP. How do the peers connect to me if they don't know my real IP?
EDIT: Downvoter, care to explain? I'm open to constructive criticism.
-
Mark Read about 7 years@Ramhound Yes, I know that all the traffic from me goes through the VPN and then goes to it's destination. I know how a VPN works. What I want to know is how someone, who isn't connected with me and thinks my IP is the VPN's IP, can possibly connect to me on my real IP. In my view, it is impossible unless the VPN uses NAT somehow, and that can only happen if I have established the connection with the peers somehow first. How that works is what I want to know.
-
TJJ about 7 yearsYour VPN IP IS your real IP. If you connect to the VPN, you have 2 IPs. One assigned from your ISP, and then one assigned from your VPN. The difference is that the VPN transfers data through a tunnel that you established using your ISP's IP.
-
TJJ about 7 yearsLet's take an example: Imagine you connect to the internet using your phone line. So, you call your provider to open a tunnel for internet traffic, and the data is passed over the phone line. If I were to transfer your question to this situation, then it would be: "How can servers from the internet send me data if they don't know my telephone number?". You see the point here?
-
Mark Read about 7 yearsYes, I know how a VPN works, what I don't understand is if a tracker knows only the VPN's IP and shares it with the peers, then when they make a new connection to the VPN, without knowing my real IP, won't they be asking the VPN for a file it doesn't have, because they think my IP is the VPN's IP? I think trackers work when this downloading/uploading all happens in one single connection, so that way the VPN can use NAT to send the inbound traffic to me without me establishing the connection first. Is this correct? If so, how does it work?
-
Mark Read about 7 yearsYou see, I know that if you were to see the VPN server as a router, it would only forward inbound traffic from already established connections (by me) and outbount traffic (by me). What I want to know if how it handles the peers' new connections to me, connections that weren't established by me, without knowing my real IP. That situation seems impossible to me, unless the BitTorrent client does it another way.
-
LawrenceC about 7 yearsA router can forward new connections too. It depends on how you set up the router. Not all routers have to do NAT. A VPN in this fashion is simply "forwarding back" everything to you and not doing NAT.
-
Mark Read about 7 yearsRight, but what if both me and the peers are using a VPN? No one would be able to connect to anyone.
-
Mark Read about 7 yearsUnless we are all really connecting to the tracker which works as a router?
-
Mokubai about 7 years@MarkRead A tracker could probably be written in such a way to allow an initial connection to be negotiated through it, exchanging enough information to allow a direct connection to be made. It wouldn't want to work as a router though as the bandwidth requirements would quickly become humongous and expensive. Most users though will be on home firewalls networks with UPNP enabled and so (nearly) direct connections will be able to be made automatically in most cases. VPNs do make things problematic though.