Question
In what file are banned/blacklisted IP addresses stored as created using the Blacklist Plugin?
Environment
--
SueLocke - 13 Nov 2004
Answer
As recommended in
TWikiPlugins. Also, download the Plugin and study the code.
--
PeterThoeny - 13 Nov 2004
Peter - you must get really sick of what seem like really dumb questions from what seem really dumb users. Apologies for that. I hope you can bear with me a little longer. I do feel really dumb around this and don't mind saying so.
I did install the plugin on my site and I did study the code before and after install and before putting up the question and this is where I feel really dumb - I just can't get it. Yes I did see that the white list and the black list IP addresses are stored in the actual plugins topic. Yes I could get that.
(BTW - I have deinstalled the plugin for the time being while I get this sorted out.)
But for the ban list this is all that I can see behind the scenes - it tells me that the IP addresses for ban list must be stored somewhere els:
* BANLIST: Automatically updated list of IP addresses based on BANLIST configuration
* <select name="action"> <option></option> <option value="ban_add">Add</option> <option value="ban_remove">Remove</option> </select> IP address <input type="text" name="ip" size="16" value="" /> <input type="submit" value="Submit" /> %BLACKLIST{ action="%URLPARAM{action}%" value="%URLPARAM{ip}%" }%
* Current list: %BLACKLIST{ action="ban_show" }%
</form>
Now, I must be missing something - is the Ban list the same as the Black list? If so it doesn't seem to make sense cause for example on the TWiki Black list plugin the current settings are showing as:
BLACKLIST: Comma delimited list of IP addresses; possible to use partial addresses ending in a dot
Set BLACKLIST = 203.88.152., 203.88.155., 219.65.75.
BANLIST: Automatically updated list of IP addresses based on BANLIST configuration
Add Remove IP address
Current list: 61.11.16.140, 220.110.95.238, 128.208.3.29, 66.235.58.105, 80.138.77.226, 217.83.123.13, 12.221.76.96, 68.33.51.117, 147.175.167.8, 67.173.224.209, 129.82.47.152, 201.3.63.130, 210.123.39.59, 80.13.8.19, 192.18.17.19, 198.59.128.46, 202.108.43.146, 210.245.7.26, 63.206.168.212, 62.74.128.243, 134.2.188.3, 194.139.171.77, 150.140.141.72, 206.176.113.164, 200.148.8.138, 61.16.168.131, 82.35.18.251, 38.144.36.16, 207.6.253.95, 203.101.117.154, 193.95.33.18, 81.56.186.95, 137.132.3.7, 67.174.52.84, 219.107.177.56, 209.237.238.176, 212.113.164.97, 139.91.254.18, 80.58.9.107, 24.80.110.174, 62.163.37.2, 207.37.254.250, 211.26.25.12, 62.168.10.2, 213.146.115.29, 62.163.35.136, 200.148.6.199, 192.77.198.11, 192.4.227.243, 80.58.19.44, 194.95.224.141, 150.140.141.125
AND at the top of the plugin for the description of Black list and Ban list it implies that the Black list and Ban list are 2 separate actions, viz:
Users on the BLACKLIST and BANLIST will have every page access delayed by one minute and will get an error message.
So now taking on your direction to the TWiki Plugins page that tells plugin developers where to store data about where to store data (I'm not a plugins coder so I didn't know about this page) I found this:
In case the Plugin generates data just for internal use, or data which is not specific to a topic, store it in the Plugin's attachment directory.
The Plugin's attachment directory is pubdir/Installweb/FooBarPlugin
Installweb refers to the name of the web where the Plugin is installed
The Plugin's attachment URL is https://twiki.org/p/pub/Installweb/FooBarPlugin
The filename should start with an underscore, followed by an identifier, e.g. _any_name.ext
The leading underscore avoids a nameclash with files attached to the Plugin topic
Use only alphanumeric characters, underscores and periods to avoid platform dependency issues and URL issues
Do not use subdirectories (rename and delete would fail)
...
So if you could bear with this dummy just a little longer can you confim that the place I should find a (text?) file with the ban list IP addresses is in:
- The Lib/TWiki/Plugins directory
- A (text?( file called something like _BLACKLIST.ext
If this is correct, would it be a good idea to perhaps make a note about this on the Plugin page? Its great to have the form for doing the add and removes though and perhaps that is seen as being enough. Is that indeed the case?
And perhaps my dumbness has really got in the way of my understanding anything at all about this plugin. Please don't hold back on saying so if that is the case and I'll go back to the drawing board on my TWiki learning.
--
SueLocke 14 Nov. 2004
I've reinstalled the Blacklist plugin and still found that the IP address I banned (not blacklisted) is being banned. So I've gone right back to the server to track through every possible directory for the file. And yes I have found it. This experience might be useful for others. The file was found in a directory TWiki/BlackListPlugin which actually sits underneath the www directory for my public TWiki. My TWiki leads off from a public standard website so my directory structures have a root directory which contains a number of directories including of course the cgi-bin and the data, lib, templates and logs directories (and their subdirectories including a PLugins directory) for the TWiki. It is at this level that I actually installed the plugin. So therefore it was in the Lib directory in the root folder that I was looking (and other directories just in case) with no luck.
The directory for the files for the public website is also at the root directory. It was in this latter directory with its range of TWiki and non-TWiki directories that I found directories for what seems to be the specific customisations for my TWiki. And the file was in /twiki/TWiki/BlackListPlugIn/
As I said this experience may be useful for other people working through a similar TWiki set up. I've now deleted the banlist files and am about to reinstall again the Blacklist Plugin. I'm hoping for better luck this time.
--
SueLocke 15 Nov 2004
Sorry for my terse answer. I assumed you asked because you wanted to create a Plugin that needs some of the BlackListPlugin functionality.
To
use the Plugin you do not need to be aware of where the BANLIST file is stored. IP addresses get added automagically on suspicious actions, and you can remove/add IP addresses with the form on the Plugin topic.
The BLACKLIST and WHITELIST are settings in the Plugin topic, e.g. edit the topic to modify them.
--
PeterThoeny - 16 Nov 2004
The answer did have a particular flavour to it. I should learn to not take it personally :-). Thanks for bearing with providing further feedback. No problems as I said with where the BLACKLIST and WHIELIST IP addresses are stored. My problem with the BANLIST storage is that I have limited accounts available to me for testing (we have a peer to peer network with one broadband connmection running into it, so I had to test against a live account for the BANLIST and then needed to bring it back online. Unfortunately that live account was mine - can you believe it - the places that TWiki is managed from are many and varied I bet. I kind of like testing stuff when I install the stuff so this gets me into trouble sometime. Then the problem of course that I couldn't bring my address back online through the BANLIST function on the Plugin page - cause yes- the Plugin works perfectly. I expect to be able to manage installs and deinstalls and file modification at the server level for everything at some point. As I said above my experience with what files go where in a situation where a TWiki is loaded into the same root directory as a public Internet website might then prove useful for other people if they need to work at the server level.
--
SueLocke - 16 Nov 2004