As I am curios about P2P communication in 3G/4G networks. I did little digging on BitTorrent protocol and how it works. My mobile device is behind a NAT, and a web server in running in my phone at port 6666, I tried several methods to access that web server from internet(i.e. another device not connected to a private network with my phone)
- Port Forwarding : I obtain public IP provide by my ISP, and forwarded port from 8080 to 6666, so when someone on internet will send a request on http://MY_PUBLIC_IP:8080, that request will redirect to port 6666 in which my web server is running. But NO LUCK, If I check my IP with whatismyipaddress.com it gives me a different IP then provided by my ISP public IP. I also tried doing this same thing using a VPN still NO LUCK.
- SSH Tunneling : If I used tunneling tools, like ngrok. I can access the web server from another device, but it's not a true P2P.
But when it comes to BitTorrent Clients, it easily gets connected to the peers without any hustle. So, How BitTorrent expose my phone and connect with other peers being in behind NAT?
Thank you.