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

Add p2p-denylist flag #3536

Open
dapplion opened this issue Dec 17, 2021 · 1 comment
Open

Add p2p-denylist flag #3536

dapplion opened this issue Dec 17, 2021 · 1 comment
Labels
meta-feature-request Issues to track feature requests. prio-low This is nice to have. scope-networking All issues related to networking, gossip, and libp2p.

Comments

@dapplion
Copy link
Contributor

dapplion commented Dec 17, 2021

See ipfs/js-ipfs#3982 for context

Implementation example from Prysm https://github.com/prysmaticlabs/prysm/blob/23e39d3d6451aff2dc302f78923abdc13767237d/cmd/flags.go#L167

Potential library to use (used by libp2p in their address sorter https://github.com/libp2p/js-libp2p-utils/blob/master/src/address-sort.js) https://www.npmjs.com/package/private-ip

TODO

  • Benchmark the performance cost of private-ip
  • Ensure that libp2p only runs the address sorter once per peer
@philknows philknows added the scope-networking All issues related to networking, gossip, and libp2p. label Jan 24, 2022
@dapplion dapplion added the prio-low This is nice to have. label Feb 4, 2022
@dapplion
Copy link
Contributor Author

dapplion commented Feb 4, 2022

Setting to low since this can be tackled for now with a firewall. For reference we use

# From https://github.com/MinaProtocol/mina/issues/7053#issuecomment-749087798
# `ufw deny out from any to {{item}}`
firewall_deny_ip_ranges:
  - 10.0.0.0/8
  - 172.16.0.0/12
  - 192.168.0.0/16
  - 100.64.0.0/10
  - 198.18.0.0/15
  - 169.254.0.0/16

Longer term libp2p should include native support for this in the identify protocol

@philknows philknows added the meta-feature-request Issues to track feature requests. label Nov 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
meta-feature-request Issues to track feature requests. prio-low This is nice to have. scope-networking All issues related to networking, gossip, and libp2p.
Projects
None yet
Development

No branches or pull requests

3 participants