본문 바로가기
카테고리 없음

RDP IPBAN 자동설치 (파워쉘)

by 학수씨 2022. 2. 13.
mkdir C:\script\IPBan



[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Invoke-WebRequest ('https://github.com/DigitalRuby/IPBan/releases/download/1.6.0/IPBan-Windows-x64_1_6_0.zip') -OutFile ('C:\script\IPBan\IPBan-Windows-x64_1_6_0.zip')

cd C:\script\IPBan
Expand-Archive .\IPBan-Windows-x64_1_6_0.zip

auditpol.exe /set /category:"{69979849-797A-11D9-BED3-505054503030}" /success:enable /failure:enable
auditpol.exe /set /category:"{69979850-797A-11D9-BED3-505054503030}" /success:enable /failure:enable


sc.exe create IPBAN type= own start= delayed-auto binPath= C:\script\IPBan\IPBan-Windows-x64_1_6_0\DigitalRuby.IPBan.exe DisplayName= IPBAN

sc.exe description IPBAN "Automatically builds firewall rules for abusive login attempts: https://github.com/DigitalRuby/IPBan"

sc.exe failure IPBAN reset= 9999 actions= "restart/60000/restart/60000/restart/60000"

sc.exe start IPBAN

pause

 

 

출처 : https://yuttong.tistory.com/35

댓글