Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Add a way to block outgoing connections to some IPs #3496

Closed
tomaka opened this issue Aug 27, 2019 · 1 comment
Closed

Add a way to block outgoing connections to some IPs #3496

tomaka opened this issue Aug 27, 2019 · 1 comment
Labels
I4-annoyance The client behaves within expectations, however this “expected behaviour” itself is at issue.

Comments

@tomaka
Copy link
Contributor

tomaka commented Aug 27, 2019

Some hosting company thinks we're attacking them. Substrate should provide some way of blocking outgoing connection attempts to certain subnets that are passed through the CLI.

This needs to be done at the libp2p level, so that for example even Kademlia queries don't get performed. In other words, this is not at the PSM level.

I think the best way to do that is to wrap around the Behaviour struct and tweak the addresses_of_peer method, and filter out multiaddresses that match the subnets we're blocking. addresses_of_peer is only ever used to establish outbound connections.

@tomaka tomaka added the I4-annoyance The client behaves within expectations, however this “expected behaviour” itself is at issue. label Aug 27, 2019
@tomaka
Copy link
Contributor Author

tomaka commented Jan 28, 2020

This has been implemented in #4042

@tomaka tomaka closed this as completed Jan 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
I4-annoyance The client behaves within expectations, however this “expected behaviour” itself is at issue.
Projects
None yet
Development

No branches or pull requests

1 participant