 |
|
 |
I've made a minor revamp of the FTPSecurity Windows service available here. Adds some more instrumentation and uses a configuration file instead. Couple of other tidbits too. Feel free to try it out. Code is also available.
-=Deriven
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Hi, installed as explained on other website. set deleted to 0 (problem with date/timestamp) logparser is installed .net2 but unfortunatly nothing happens.
Is it possible to get latest code ? (preferably whole project, I can "read" and tamper with existing project, but little more than that
Thanks Dirk (from Belgium)
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
I used your source while working with my own app. The part I used is the SetBlockList sub, and pass my own array to it.
The problem I'm having is that the first IP address it adds drops the first digit. For instance, if IPList(0) = "11.22.33.44, 255.255.255.255", then the first IP address added to IPDeny is 1.22.33.44.
I stepped through the code, and it seems to take place here:
Dim newIPDenyList As Object() = New Object(IPList.Substring(1).Split(";").Length - 1) {} Dim i As Integer For i = 0 To IPList.Substring(1).Split(";").Length - 1 newIPDenyList(i) = IPList.Substring(1).Split(";")(i) Next
Any ideas as to why?
-- modified at 17:10 Tuesday 9th January, 2007
If I set IPList = "11.22.33.44, 255.255.255.255" it also loses the first digit. I also set IPList = "11.22.33.44, 255.255.255.255;12.34.56.78, 255.255.255.255" and it dropped off the first digit of the first address as well.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
In all instances of IPList.Substring(1).Split(";"), change it to IPList.Split(";"). I add the Substring(1) because my strings all have a leading ";" which I need to remove.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Thanks!
I got it working. It pulls the current IPDeny list, queries todays log, compares the two, and adds the new ip addresses, along with anything that was already on the list.
Your service was good, but if I added a specific IP address to the deny list, it would go away, and parsing all logs can be slow.
Now to clean it up and make it look 'purdy'
|
| Sign In·View Thread·PermaLink | 2.00/5 |
|
|
|
 |
|
 |
Hey,
I installed the .msi and then ran the registry file. I then updated the "LogDir" to point to correct directory. The service now starts but I still get an error message in my Application log in Event Viewer. Here it is:
---------------------------- Source: FTPSecurity Category: None Event ID: 0 Description: Error in SetBlockList: startIndex cannot be larger than length of string. Parameter name: startIndex ----------------------------
And here an export of the 'FTPSecurity' registry key:
---------------------------- [HKEY_LOCAL_MACHINE\SOFTWARE\Insight On-Site\FTPSecurity] "LogDir"="C:\\WINDOWS\\system32\\LogFiles\\MSFTPSVC1" "Service"="IIS://localhost/MSFTPSVC/1" "InstantBlock"="Administrator;Guest" "BlockOnAttempts"="10" "DeleteLogsDays"="7" ----------------------------
Any ideas?
Thanks!
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
|
 |
|
 |
I get the following error in the event log when FTPSecurty starts up. It is running in a Server 2003 box. Any suggestions?
Service cannot be started. System.ArgumentException: The path is not of a legal form. at System.IO.Path.NormalizePathFast(String path, Boolean fullCheck) at System.IO.Path.GetFullPathInternal(String path) at System.IO.DirectoryInfo..ctor(String path) at FTPSecurity.FTPSecurity.DeleteLogFiles() at FTPSecurity.FTPSecurity.OnStart(String[] args) at System.ServiceProcess.ServiceBase.ServiceQueuedMainCallback(Object state)
Bill
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
The completed project with MSI download has a .reg file which holds the registry entries needed for the program to work. Did you download and run it? If so, and you're still having the problem, are the registry values correct for your server?
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Blushing, er no I didn't run it, thought it was part of the installation process. I ran it an the path (in the registry) was wrong for my server, corrected that and it works.
I'll go back and read the source code again to see if I should have figured it out for myself.
Thanks for both the program and the quick response.
Bill
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |