-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Config option to disable dialing specific subnets entirely #1247
Comments
possible config format:{ // ...
"Swarm": {
"TrafficFilters": [
{ "0.0.0.0/0": "deny"},
{ "10.10.10.0/28": "allow"},
]
}} meanig that no config is as if:
People more experienced with traffic forming tools should comment here and tell me all the desires. we can probably implement something pretty expressive without too much more effort. |
What about if we had something like Apache's htaccess1 format?
It's expressive and short. For example, a machine only wanting connections to machines on the same LAN network could do:
|
Ah yeah that's promising! maybe we can discuss |
With
Would we maybe want to have configuration for each interface as a possibility? Maybe this is something best left to the operating system to work out? |
I'm wondering if this should be implemented in the peerstore, since thats where we handle addresses. Maybe when we ask if for addresses to dial, it can filter them by our blocklist, but when we ask it for addresses to send to other peers, it can give us all of them. (doing it this way also makes the changes to the construction process a little simpler) |
That sounds like the right place to do it. The only question is what about the |
@timgws yeah, that seems like the right thing to do, have a |
@jbenet i'm now wondering if these should be specified in some sort of multiaddr format like: |
@whyrusleeping oh interesting! that might work very well. we should probably note that it's a /filter/cidr/ip4/192.168.0.0/16
# which means
/filter
+-- /cidr/
+-- /ip4/192.168.0.0
/16 though this o/ gets clunky, because the address /filter/cidr/16/ip4/192.168.0.0/
# which means
/filter
+-- /cidr/16
+-- /ip4/192.168.0.0 but that gets farther away from the (formats are hard.) |
yeah, that could work. do we wanna make a decision on what the proper 'filter format' should be for multiaddr before i start hacking? |
let's go with either: /ipcidr/16/ip4/192.168.0.0
/ip4/192.168.0.0/ipcidr/16 |
i like the latter |
let's do it |
alright, should i call the package multiaddr-filter? multiaddr-ipmask? |
both sgtm |
See #1226
Having a config option to disable dialing local subnets entirely. maybe even allowing configurable address filters.
We need to:
p2p/net
This will make it possible to both (a) prevent dialing local subnets entirely, and (b) prevent dialing everything BUT local subnets (i.e. don't connect to WAN).
One open question about these filters is:
The text was updated successfully, but these errors were encountered: