-
-
Notifications
You must be signed in to change notification settings - Fork 4.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
Issue: Empty ipWhitelist array does not allow any host to access MM #950
Comments
Changed 'server.js' to allow an empty ipwhitelist to allow any and all hosts instead of none as mentioned in the documentation
To prevent some confusion during configuration (users customizing their If a user changes the default ipWhitelist (which by default only allows localhost) he/she won't be hampered by the fact that they might not have the |
Changed 'server.js' to allow an empty ipwhitelist to allow any and all hosts instead of none as mentioned in the documentation
Changed 'server.js' to allow an empty ipwhitelist to allow any and all hosts instead of none as mentioned in the documentation
From a security perspective I would opt to prevent users from accidentally opening up access to their mirror. Listening only on, or allowing access from localhost woudl be wise from that perspective. Take a look at Mirai for example. Raspberry did a major change regarding these issues, by disabling SSH by default. Therefore I would suggest to keep the default to limited access. |
I agree with you - I will try to come up with a more elegant solution, and send a PR with reference to this issue. |
There a log when is open a full ipWhitelist. |
@QNimbus, any updates? @roramirez, what do you mean? |
When you are using a full IpWhitelist, MM alert you with a warning log entry in console. |
My concern is that the default install & run will leave you with an application listening on all network devices on any IP (include IPv6). Given the increase in IoT devices being abused I think this is something to try and prevent as software developers. So I think the default install & run should at least prevent one of the two;
Edit |
Without config, listen only on looback interface. In sample config listen on any interface, but use an IP whitelist. Related to MagicMirrorOrg#950
I've done the test and the log is show it.
|
Without config, listen only on looback interface. In sample config listen on any interface, but use an IP whitelist. Related to MagicMirrorOrg#950
Fixed in next release. |
This is already not fixed! |
When you set
ipWhitelist = []
in the config file, it should allow access from everyone to the MM instance according to the documentation. Instead with an empty whitelist (express-whitelist
module) it doesn't allow any host to access the MM instance.I think this could be solved by replacing the following line in
server.js
var result = ipfilter(config.ipWhitelist, {mode: "allow", log: false})
with
var result = ipfilter(config.ipWhitelist, {mode: config.ipWhitelist.length === 0 ? "deny" : "allow", log: false})
This will result in
ipWhitelist = []
in the config file to allow any and all hosts to access the MM instance.The text was updated successfully, but these errors were encountered: