IISFrontGuard.Module
2025.12.30.8
See the version list below for details.
dotnet add package IISFrontGuard.Module --version 2025.12.30.8
NuGet\Install-Package IISFrontGuard.Module -Version 2025.12.30.8
<PackageReference Include="IISFrontGuard.Module" Version="2025.12.30.8" />
<PackageVersion Include="IISFrontGuard.Module" Version="2025.12.30.8" />
<PackageReference Include="IISFrontGuard.Module" />
paket add IISFrontGuard.Module --version 2025.12.30.8
#r "nuget: IISFrontGuard.Module, 2025.12.30.8"
#:package IISFrontGuard.Module@2025.12.30.8
#addin nuget:?package=IISFrontGuard.Module&version=2025.12.30.8
#tool nuget:?package=IISFrontGuard.Module&version=2025.12.30.8
IISFrontGuard
Disclaimer: IISFrontGuard is a project name, not affiliated with Cloudflare or Microsoft Corp.
IISFrontGuard is a Web Application Firewall (WAF) module for Internet Information Services (IIS) built on .NET Framework 4.8. It provides advanced security features including request filtering, rate limiting, managed/interactive challenges, and comprehensive logging with webhook notifications.
Features
- Web Application Firewall (WAF): Custom rule-based request filtering with pattern matching
- Rate Limiting: Protect against DDoS and brute-force attacks with configurable rate limits
- Geographic IP Filtering: Block or allow traffic based on country of origin using GeoIP2
- Security Event Logging: Comprehensive logging to SQL database for audit and compliance
- Webhook Notifications: Real-time security event notifications to external systems
- Interactive Challenges: CAPTCHA-like challenges for suspicious requests
- Request Encryption: Support for encrypted request validation
Installation
Via NuGet Package Manager
Install-Package IISFrontGuard.Module
Via .NET CLI
dotnet add package IISFrontGuard.Module
Via Package Manager Console
PM> Install-Package IISFrontGuard.Module
Note: The package will automatically update your Web.config with required settings and open a getting started guide.
Configuration
1. Database Setup
Execute the included SQL script to create the required database tables:
-- Located in: Content\Scripts\init.sql
2. Web.config Configuration
The package automatically configures your Web.config during installation with the following default settings. Please review and update as needed:
<configuration>
<connectionStrings>
<add name="IISFrontGuard"
connectionString="Data Source=.;Initial Catalog=IISFrontGuard;Integrated Security=True;TrustServerCertificate=True;" />
</connectionStrings>
<appSettings>
<add key="IISFrontGuard.DefaultConnectionStringName" value="IISFrontGuard" />
<add key="IISFrontGuardEncryptionKey" value="YOUR-16-CHAR-KEY" />
<add key="IISFrontGuard.RateLimitMaxRequestsPerMinute" value="150" />
<add key="IISFrontGuard.RateLimitWindowSeconds" value="60" />
<add key="TrustedProxyIPs" value="" />
<add key="IISFrontGuard.Webhook.Enabled" value="false" />
<add key="IISFrontGuard.Webhook.Url" value="" />
<add key="IISFrontGuard.Webhook.AuthHeader" value="" />
<add key="IISFrontGuard.Webhook.CustomHeaders" value="" />
<add key="IISFrontGuard.Webhook.FailureLogPath" value="C:\Logs\webhook-failures.log" />
</appSettings>
<system.webServer>
<modules>
<add name="FrontGuardModule"
type="IISFrontGuard.Module.FrontGuardModule, IISFrontGuard.Module"
preCondition="managedHandler,runtimeVersionv4.0" />
</modules>
<httpProtocol>
<customHeaders>
<remove name="X-Powered-By" />
</customHeaders>
</httpProtocol>
</system.webServer>
<system.web>
<httpRuntime enableVersionHeader="false" />
</system.web>
</configuration>
3. GeoIP Database
The package includes a GeoLite2-Country database. To keep it updated:
- Register for a free MaxMind account at https://www.maxmind.com/
- Run the included
UpdateGeoDb.batscript with your license key
Usage
Interactive Challenges for localhost
Configure WAF rules for localhost:
-- Create an AppEntity for localhost testing
INSERT [dbo].[AppEntity] ([Id], [AppName], [AppDescription], [Host], [CreationDate], [TokenExpirationDurationHr]) VALUES (NEWID(), N'Localhost App', N'Test application for localhost', N'localhost', GETDATE(), 12)
GO
-- Retrieve the Id of the newly created AppEntity
DECLARE @LocalAppId UNIQUEIDENTIFIER
SELECT TOP 1 @LocalAppId = [Id] FROM [dbo].[AppEntity] WHERE [Host] = N'localhost'
-- Insert a rule for Interactive Challenge as an example on localhost using the newly created AppEntity
INSERT [dbo].[WafRuleEntity] ([Nombre], [ActionId], [AppId], [Prioridad], [Habilitado], [CreationDate])
VALUES (N'Interactive Challenge', 4, @LocalAppId, 0, 1, GETDATE())
Creating WAF Rules
Add custom WAF rules to the database:
INSERT INTO WafRules (Name, Priority, IsEnabled, Action, Conditions)
VALUES ('Block SQL Injection', 100, 1, 'Block',
'[{"Field":"QueryString","Operator":"Contains","Value":"UNION SELECT"}]');
Rate Limiting
Configure rate limits in Web.config:
<add key="RateLimitMaxRequestsPerMinute" value="150" />
<add key="RateLimitWindowSeconds" value="60" />
Geographic Filtering
Configure country blocking/allowing via database WAF rules:
INSERT INTO WafRules (Name, Priority, IsEnabled, Action, Conditions)
VALUES ('Block Specific Countries', 50, 1, 'Block',
'[{"Field":"Country","Operator":"Equals","Value":"CN,RU,KP"}]');
Requirements
- .NET Framework 4.8
- IIS 7.0 or later
- SQL Server 2012 or later
Uninstallation
To remove IISFrontGuard from your application:
Uninstall-Package IISFrontGuard.Module
The uninstall process will automatically:
- Remove module registration from web.config
- Remove security header configurations
- Remove connection strings and app settings
- Create a backup of your web.config
Manual cleanup required:
- Database tables (see UNINSTALL_GUIDE.md)
- Content files (GeoIP database, scripts, documentation)
- Log files
For complete uninstallation instructions, see UNINSTALL_GUIDE.md included in the package.
Support
For issues, questions, or contributions, please visit:
- Project Repository: https://github.com/kenllyacosta/IISFrontGuard
License
This project is licensed under the MIT License.
Author
IISFrontGuard Team
Changelog
Version 1.0.0
- Initial release
- WAF functionality with custom rules
- Rate limiting support
- GeoIP filtering
- Security event logging
- Webhook notifications
- Automatic security header management
- Complete uninstallation support
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET Framework | net48 is compatible. net481 was computed. |
-
.NETFramework 4.8
- IPNetwork (>= 1.3.2)
- MaxMind.Db (>= 4.3.4)
- MaxMind.GeoIP2 (>= 5.4.1)
- Microsoft.Bcl.AsyncInterfaces (>= 10.0.1)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.1)
- Microsoft.Extensions.Options (>= 10.0.1)
- Microsoft.Extensions.Primitives (>= 10.0.1)
- System.Buffers (>= 4.6.1)
- System.IO.Pipelines (>= 10.0.1)
- System.Memory (>= 4.6.3)
- System.Numerics.Vectors (>= 4.6.1)
- System.Runtime.CompilerServices.Unsafe (>= 6.1.2)
- System.Text.Encodings.Web (>= 10.0.1)
- System.Text.Json (>= 10.0.1)
- System.Threading.Tasks.Extensions (>= 4.6.3)
- System.ValueTuple (>= 4.6.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2025.12.31.1 | 67 | 12/31/2025 |
| 2025.12.30.9 | 73 | 12/30/2025 |
| 2025.12.30.8 | 77 | 12/30/2025 |
| 2025.12.30.7 | 75 | 12/30/2025 |
| 2025.12.30.5 | 75 | 12/30/2025 |
| 2025.12.29.40 | 88 | 12/29/2025 |
| 2025.12.28.7 | 82 | 12/28/2025 |
| 2025.12.28.6 | 78 | 12/28/2025 |
| 2025.12.28.5 | 83 | 12/28/2025 |
| 2025.12.28.4 | 78 | 12/28/2025 |
| 2025.12.27.23 | 87 | 12/28/2025 |
| 2025.12.27.21 | 76 | 12/28/2025 |
| 2025.12.27.19 | 79 | 12/27/2025 |
| 2025.12.27.17 | 74 | 12/27/2025 |
| 2025.12.27.16 | 80 | 12/27/2025 |
| 2025.12.27.14 | 78 | 12/27/2025 |
| 2025.12.27.13 | 79 | 12/27/2025 |
| 2025.12.27.12 | 75 | 12/27/2025 |
| 2025.12.26.30 | 85 | 12/26/2025 |
| 2025.12.26.29 | 81 | 12/26/2025 |
| 2025.12.26.28 | 86 | 12/26/2025 |
| 2025.12.26.27 | 87 | 12/26/2025 |
| 2025.12.25.36 | 164 | 12/25/2025 |
| 2025.12.25.25 | 165 | 12/25/2025 |
| 2025.12.25.24 | 165 | 12/25/2025 |
| 2025.12.24.15 | 166 | 12/24/2025 |
| 2025.12.24.14 | 163 | 12/24/2025 |
| 2025.12.24.13 | 173 | 12/24/2025 |
| 2025.12.24.12 | 167 | 12/24/2025 |
| 2025.12.24.11 | 160 | 12/24/2025 |
| 2025.12.24.10 | 157 | 12/24/2025 |
| 2025.12.24.9 | 154 | 12/24/2025 |
| 2025.12.24.8 | 162 | 12/24/2025 |
Initial release with WAF, rate limiting, GeoIP filtering, automatic security header management, and webhook notification support.