Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Analysis on the usage of NAT's #4657

Closed
dsluijk opened this issue Jul 4, 2019 · 13 comments
Closed

Analysis on the usage of NAT's #4657

dsluijk opened this issue Jul 4, 2019 · 13 comments

Comments

@dsluijk
Copy link

dsluijk commented Jul 4, 2019

There was a request for an analysis of the usage of the different types of NAT's. This issue will track the attempt for doing so.

How

As it's to my knowledge not possible to detect a NAT on a IP-address passively, it has to be an active system. The easiest way to achieve this is trough a website. Using WebRTC we can find out if the user has a private IP (thus behind a NAT), and by using the flowchart below we can even know which type.

The goal is to build a simple website which can be shared with as many people as possible. If the user lands on this website it start the flow. The result of that will be stored on the server for further analysis.

STUN algorithm

@dsluijk dsluijk changed the title Analysis of the usage of NAT's Analysis on the usage of NAT's Jul 4, 2019
@qstokkink qstokkink added this to the Backlog milestone Jul 5, 2019
@ichorid
Copy link
Contributor

ichorid commented Jul 5, 2019

It would be interesting to get some kind of stats on the correlation between types of internet providers and types of NATs they use(e.g. 4G is ipv6, etc.). I guess there should be some prior works on these like the Internet Census .

@dsluijk
Copy link
Author

dsluijk commented Jul 5, 2019

That would be one of the goals of the analysis. I intend to store a few key points of data:

  • NAT type
  • Public IP
  • Private IP
  • Geolocation
  • User agent
  • Date
  • Firewall type?
  • ISP
  • Network type, if available

Any combinations of that data can be used in analysis. I think I'll store it inside an ELK stack, so data analysis would be really easy.

@dsluijk
Copy link
Author

dsluijk commented Jul 5, 2019

This can be used to find the private IP address: https://github.com/diafygi/webrtc-ips

@ichorid
Copy link
Contributor

ichorid commented Jul 5, 2019

How are you going to gather the data? From Tribler clients?

@dsluijk
Copy link
Author

dsluijk commented Jul 5, 2019

I don't think this will be repasentitive of the general usage. Tribler has a bias towards the more tech savvy, and more importantly only supports desktop computers. This would almost entirely eliminate the mobile networks from the analysis, which is exactly the most interesting group.

The best way is to create a website which will run the test automatically. This means it can be run on almost all relevant devices, with a low bar of entry as you'd just have to click on a link. One problem is that you'd have to convince people to click on a sketchy looking link. Another possibility is so include the script on other sites like a traditional tracker.

The best method would be one like the internet census you linked, but I don't think anyone would be happy by using a 0-day like that.

@ichorid
Copy link
Contributor

ichorid commented Jul 5, 2019

Maybe we don't need to do it by ourselves? I'm sure there should be some pretty recent information on the distribution of NAT types.

@dsluijk
Copy link
Author

dsluijk commented Jul 5, 2019

That would be ideal, but I couldn't find any. This could be because I don't really know where to look. Both Google and Google Scholar did not turn up anything relevant. If you could tell me where to look I'd be happy to look further.

@synctext
Copy link
Member

synctext commented Jul 6, 2019

Dupe of: #2754

@devos50
Copy link
Contributor

devos50 commented Jul 6, 2019

Our lab already has some prior publications on this topic:

For more recent work, I usually go to semantic scholar, fire my query with some relevant keywords and sort the results on 'recent'. One of the top results points to this privacy-preserving NAT detection mechanism in IoT. I used this query.

@dsluijk
Copy link
Author

dsluijk commented Jul 6, 2019

Then I don't really see a point of doing this. I was under the impression there was a request for this kind of census. Closing it for now.

@dsluijk dsluijk closed this as completed Jul 6, 2019
@devos50
Copy link
Contributor

devos50 commented Jul 6, 2019

Well, what would be nice is a way to check in Tribler whether a specific user is connectable or not. For example, a user needs to be connectable in order to start trading in the decentralized market (see #2559).

@ichorid
Copy link
Contributor

ichorid commented Jul 6, 2019

@dsluijk , so can you now answer the question that was the reason to start this issue: what percent of our users will become connectible if you implement Kademlia-like packet routing in Tribler to circumvent NATs?

@synctext
Copy link
Member

synctext commented Jul 7, 2019

Ahhh. Now I possibly understand you. Nat puncturing for smartphone. See our prior work on that: https://github.com/Tribler/app-to-app-communicator/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

5 participants