Filter p2p listen by peerid

I’ve asked something similar recently but I wanted to specifically check if anyone knows any way to filter p2p listen connections by peerId? It would be really nice if you could tell that command to only accept connections from certain peerIds like ipfs p2p listen -f myPeerId myOtherPeerId

Right now as far as I can tell you need to allow it to be dialable from the entire world. I’m poking around but trying to see if there’s a way of injecting the peerId into iptables so you could do the filtering there with would probably be even better.

@zacharywhitley Don’t know if this’d be of any help but p2p listen offers an -r option to report the originating peerIDs. You can get creative and set up a socat proxy that allows traffic from only your whitelisted peerIDs to pass.

Boom! Just what I was looking for. Thanks.