Open jennijuju opened 2 years ago
just happened again - would be nice to have this implemented as it creates problems in properly monitored hosted environments.
we are getting frequent alerts and portscanning reports due to this. In some cases, providers maybe shutdown nodes because of this. I would suggest increasing the priority of this.
I have a few questions, just to be sure we agree on what we're doing here:
/cc @jennijuju @f8-ptrk @jleni 🤝
@placer14 I think it should go in https://github.com/filecoin-project/lotus/blob/6f316cddbbace4134c0f9e20484e40ea507181cd/node/config/def.go#L44
@magik6k @@aschmahmann could you please provide more directions?
@placer14 you're probably looking to emulate something like https://github.com/ipfs/go-ipfs/blob/master/docs/config.md#swarmaddrfilters. Probably the most common set of filters are the ones for disallowing private network connections (i.e. the server profile https://github.com/ipfs/go-ipfs-config/blob/ce20398638c38d2b3961dfc0854f2f7237c39964/profile.go#L48).
Here is how the libp2p option is instantiated in go-ipfs https://github.com/ipfs/go-ipfs/blob/91c52657166bcf86f2476926e4fe56694dc26562/core/node/libp2p/addrs.go#L13 using the structs in https://github.com/ipfs/go-ipfs/blob/956c24856d50770620eb2f8b42f478aca8049560/core/node/libp2p/filters.go basically for backwards compatibility for how we manipulate the address filters on the fly. You could probably use https://github.com/libp2p/go-libp2p/blob/7a35d0df9769c1d5b7ca0a1e83eb0fe0e67bc1f5/p2p/net/conngater/conngater.go#L46 though, or some more generic ConnectionGater.
Checklist
Ideas
.Lotus component
Improvement Suggestion
this ipfs issue is getting lotus nodes undesired connection as well, i.e from one peer:
lotus should be able to filter those connection out