-
Notifications
You must be signed in to change notification settings - Fork 8
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
IP Whitelist? #4
Comments
There is already a plugin for that. Check the YOURLS website for information. |
Thanks for the reply! I have looked through the plugin list carefully. Maybe I missed it? Maybe it has been removed? I see a plugin that will allow certain domains to be whitelisted for shortcuts but not one that allows only certain IPs to access the admin page. |
I'm trying to work-around a whitelist by blacklisting ranges and let alone just one IP. But the plugin changes what I write in the list, inverts the values. Maybe I'm doing someting wrong. Example: suppose you want to whitelist 168.15.16.17. Then I tried the following blacklists: 1.0.0.1-167.255.255.254 If I finish here, the plugin works fine, but it whitelist all 168.0.0.0 IPs. Now when I try to close the range by blacklisting: 168.0.0.1-168.15.16.16 This first part of the range works. But the last part, don't work: 168.15.16.18-168.255.255.254 (it breaks) This range, when I save, becomes: 168.255.255.254-168.15.16.18 And blocks all IPs. Any suggestion on how to make this workaround: block all IPs except a single one. Thanks |
Hello, Ruben, |
Checking my code, I guess the mistake might come from function ludo_blacklist_ip_Analyze_IP, line 17, but I don't remember how my comparison is (or not) working. |
This was my first attempt. The first part works, but not the second. |
Just a wild guess: maybe you are comparing strings, not numbers, and then "11" and "110" comes first than "12" and "120"? (as I said, it is just a guess) |
The idea of blacklisting IPs is great and for public YOURLS sites I'm sure very useful. For private sites though an IP whitelist would be super useful. Is this something that would be difficult to add?
The text was updated successfully, but these errors were encountered: