Skip to content

Commit 5c4c421

Browse files
committed
Remove event log depends
Startup type of delayed automatic means this service will run after event log service
1 parent 6c5bbf2 commit 5c4c421

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

CreatePackage.ps1

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ param([Parameter(Mandatory=$true)] [String]$version)
33
Remove-Item ./package -Recurse -ErrorAction Ignore
44
mkdir ./package
55
& "c:/program files/dotnet/dotnet.exe" publish IPBan.csproj -f netcoreapp2.2 -o package/linux-x64 -c Release -r linux-x64
6-
& "c:/program files (x86)/dotnet/dotnet.exe" publish IPBan.csproj -f netcoreapp2.2 -o package/win-x86 -c Release -r win-x86
76
& "c:/program files/dotnet/dotnet.exe" publish IPBan.csproj -f netcoreapp2.2 -o package/win-x64 -c Release -r win-x64
7+
& "c:/program files (x86)/dotnet/dotnet.exe" publish IPBan.csproj -f netcoreapp2.2 -o package/win-x86 -c Release -r win-x86
88
Compress-Archive -Path ./package/linux-x64/* -DestinationPath ./package/IPBan-Linux-x64.zip
9-
Compress-Archive -Path ./package/win-x86/* -DestinationPath ./package/IPBan-Windows-x86.zip
109
Compress-Archive -Path ./package/win-x64/* -DestinationPath ./package/IPBan-Windows-x64.zip
10+
Compress-Archive -Path ./package/win-x86/* -DestinationPath ./package/IPBan-Windows-x86.zip
1111
Compress-Archive -Path ./package/IPBan-Linux-x64.zip,./package/IPBan-Windows-x86.zip,./package/IPBan-Windows-x64.zip -DestinationPath ./package/IPBan_$version.zip -CompressionLevel NoCompression

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,13 @@ auditpol /set /category:"Account Logon" /success:enable /failure:enable
4747
- For Windows Server 2008 or equivalent, you should disable NTLM logins and only allow NTLM2 logins. On Windows Server 2008, there is no way to get the ip address of NTLM logins. Use secpol -> local policies -> security options -> network security restrict ntlm incoming ntlm traffic -> deny all accounts.
4848
- To install as a Windows service use the [sc command](https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/sc-create) and run the following in an elevated command window:
4949
```
50-
sc create IPBAN type= own start= delayed-auto binPath= c:\path\to\service\DigitalRuby.IPBan.exe DisplayName= IPBAN depend= EventLog
50+
sc create IPBAN type= own start= delayed-auto binPath= c:\path\to\service\DigitalRuby.IPBan.exe DisplayName= IPBAN
5151
sc description IPBAN "Automatically builds firewall rules for abusive login attempts: https://github.com/DigitalRuby/IPBan"
5252
sc start IPBAN
5353
```
5454
or with Powershell use the command [New-Service](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.management/new-service) and run the following in an elevated powershell window:
5555
```powershell
56-
New-Service -Name "IPBAN" -BinaryPathName "c:\path\to\service\DigitalRuby.IPBan.exe" -StartupType automatic -DisplayName "IPBAN" -Description "Automatically builds firewall rules for abusive login attempts: https://github.com/DigitalRuby/IPBan" -DependsOn EventLog
56+
New-Service -Name "IPBAN" -BinaryPathName "c:\path\to\service\DigitalRuby.IPBan.exe" -StartupType automatic -DisplayName "IPBAN" -Description "Automatically builds firewall rules for abusive login attempts: https://github.com/DigitalRuby/IPBan"
5757
Get-WmiObject win32_service -Filter "name='IPBAN'"
5858
Start-Service IPBAN
5959
sc.exe config IPBAN start= delayed-auto

Windows/Scripts/install.cmd

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
sc.exe create IPBAN type= own start= delayed-auto binPath= %~dp0DigitalRuby.IPBan.exe DisplayName= "IPBan Service" depend= EventLog
1+
sc.exe create IPBAN type= own start= delayed-auto binPath= %~dp0DigitalRuby.IPBan.exe DisplayName= "IPBan Service"
22
sc.exe description IPBAN "Automatically builds firewall rules for abusive login attempts: https://github.com/DigitalRuby/IPBan"

0 commit comments

Comments
 (0)