-
Notifications
You must be signed in to change notification settings - Fork 195
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[Real world security] Http blacklist or similar #170
Comments
Hmm... This post makes sense. We have a http whitelist. It would make sense to have a blacklist that can be set by server owner too if they wanted to protect some addresses while letting rest of internet be free. Unless there is some magic way to blacklist one (or few) addresses using current implementation of whitelist. |
We also need to be wary of mDNS too. So things with |
I think that RFC 1918 addresses should be blacklisted by default so that unexperienced users don't get hacked by computercraft computers on local servers or downloaded maps. It should be possible to disable it so that contraptions like this one with a raspberry pi are still possible https://youtu.be/86Zj_59P52c |
I rather like the way CCTweaks and "The computer mod which Must Not Be Named" handle this: you can specify a blacklist and whitelist composed of host names and IP address, which can be in in the CIDR format. (so
|
I totally agree with this. That's really awesome. But yes, in the general use case it would be good to keep server owners safe from having their players hack their network. |
CC should also resolve hostnames before checking against the black/whitelist, otherwise you may still be able to access local devices if the server is running avahi or similar. |
I agree, but the blacklist/whitelist needs to check the hostnames AND the resolved address, the admin could have declared the whitelist/blacklist with either. Also, there needs to be a discussion about priority. What takes priority? The whitelist or the blacklist? |
I think we should proritize the most specific filter, for example if i blacklist |
I would personally do something like:
You could potentially leave out the last step, but I'd consider it useful - as @paolobarbolini says, it can be used to allow a limited number of local ips, while still blocking the rest. |
Looks like the if (InetAddress.getByName(url.getHost()).isSiteLocalAddress()) {
// Do something
} |
@JLLeitschuh It is worth noting that From a configuration point of view, I'd rather the user can specify a whole list of IP addresses/ranges to block, rather than just using |
I'm not sure what you mean by "run on a separate thread and wait for an event". |
If this is implemented, please just keep in mind that routers can also be on |
@Restioson that would be covered by |
@apemanzilla ah OK. I'm not really familiar with that syntax. I'll look it up. Sorry! |
The flows should be like this:
With this one can blacklist entire ranges and just enable just one specific IP. This is how Pihole does it anyway (without the boolean flag). It would be really clear to the user editing the config since the flow is fixed, and not based on empty/filled lists as @SquidDev suggests. |
If someone wants to write a PR for this, I suggest the following:
Make the filtering logic work as follows: |
@dan200 other private subnets ( I'd suggest that we allow both I can start working on a PR for this. |
Adding those ranges makes sense. Maybe add 127.0.0.1 as well?
…On 7 May 2017 at 18:56, apemanzilla ***@***.***> wrote:
@dan200 <https://github.com/dan200> other private subnets (10.0.0.0/24
and 172.16.0.0/20) should also be blacklisted by default, they're often
used in enterprise networks.
I'd suggest that we allow both 192.168.*.* and 192.168.0.0/16 formats to
be used, so you can use the more precise CIDR format or the simpler
wildcard format.
I can start working on a PR for this.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#170 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AB3bbGSLh7eM_Nwt3dNpStNpJUYXU1Z0ks5r3gXdgaJpZM4NNjCD>
.
|
|
Yeah, if supporting both is easy, do it. |
Alright, I'll start on this in a bit. |
There are certain things you may not want your server users able to poke around with. For example, most routers are running on
192.168.1.1
. I really don't want people on my server able to poke around and access my router's admin console (I have a password but let's be honest here, how many people actually change the default password).Many people running servers probably aren't using a hosting service and having the computer craft http module enabled currently gives players full access to the server's internal network.
Example:
This will dump the HTML of most server's router web interfaces.
It's a simple bit of code to go from here to tinkering with the server hosters router.
The text was updated successfully, but these errors were encountered: