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

support an operation mode that doesn't dial private IP addresses #121

Open
willscott opened this issue Feb 25, 2023 · 6 comments
Open

support an operation mode that doesn't dial private IP addresses #121

willscott opened this issue Feb 25, 2023 · 6 comments

Comments

@willscott
Copy link
Contributor

There are reports from operators of Netscan detected and similar.

This is also present in IPFS nodes, and often comes from attempts to dial peers that have private-space ip addresses
(in this case the data center observed the VM attempting to dial into the 192.168.x.x and 10.x.x.x spaces)

  • there shouldn't be any multiaddrs returned from the indexer that are in these private address spaces (they are filtered out)
  • Perhaps upon connecting to peers as part of identify we learn the other addresses they claim to be listening on, and subsequent dials may attempt those?

this is likely a libp2p configuration tweak. we may want help from libp2p stewards to identify what the optimal configuration will be to limit our exposure to triggering this sort of issue.

@aschmahmann
Copy link

You can just use a go-libp2p connection gater. Here are the address ranges you probably want to filter https://github.com/ipfs/kubo/blob/4283b9d98f8438fc8751ccc840d8fc24eeae6f13/config/profile.go#L27. Here is the addressfilter connection gater used in kubo https://github.com/ipfs/kubo/blob/4283b9d98f8438fc8751ccc840d8fc24eeae6f13/core/node/libp2p/addrs.go#L13. go-libp2p might have some other builtins that you can use though, I don't recall what the latest is there

@hannahhoward
Copy link
Collaborator

Do we need further action here?

@hannahhoward
Copy link
Collaborator

essentially should we apply the setup @aschmahmann referenced above @willscott ?

@willscott
Copy link
Contributor Author

correct

@willscott
Copy link
Contributor Author

@hannahhoward is this done?

@rvagg
Copy link
Member

rvagg commented Sep 29, 2023

I don't believe this is done, shouldn't be too hard but we should only be doing this when the user doesn't give us explicit --providers because local peers are a legitimate case. Added to the board to get it done shortly.

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

4 participants