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

Consider refusing to store nodes/peers with local IP addresses #91

Open
feross opened this issue Jan 5, 2016 · 3 comments
Open

Consider refusing to store nodes/peers with local IP addresses #91

feross opened this issue Jan 5, 2016 · 3 comments

Comments

@feross
Copy link
Member

feross commented Jan 5, 2016

If the DHT returns nodes or peers with local IP addresses, should we store them? That means that a remote attacker can make the DHT or bittorrent peer connect to local services. Is this unsafe?

Local IP ranges:
192.168.0.0 - 192.168.255.255 (65,536 IP addresses)
172.16.0.0 - 172.31.255.255 (1,048,576 IP addresses)
10.0.0.0 - 10.255.255.255 (16,777,216 IP addresses)

Localhost:
127.0.0.1

@pfrazee
Copy link

pfrazee commented Jan 13, 2017

I think this would be a good idea

@feross
Copy link
Member Author

feross commented Jan 13, 2017

One reason that it might not be a good idea to do this is users might be using this module to create a DHT on their local network. If we just filter all these IPs out, we break their setup.

Maybe we can filter them by default, and have an option allowLocalIPs for this use case?

@pfrazee
Copy link

pfrazee commented Jan 13, 2017 via email

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

No branches or pull requests

2 participants