Skip to content

New Security Module

Compare
Choose a tag to compare
@geoperez geoperez released this 19 Dec 16:09
· 167 commits to master since this release

EmbedIO brings a new security module named IPBanningModule. This module is an out-of-box feature similar to Fail2ban.

This module integrates one watcher for possible service abuse:

1 - Direct logger inspection - Add Regular Expressions to validate brute-force attacks.

In the next release we will include:

2 - Open connections inspection - Set up max connections per time to validate service abuse attacks.

Check the following example where the module is activated to the webserver with a whitelist of valid clients and a rule to detect massive 404 responses.

var server = new WebServer(o => o
                    .WithUrlPrefix("http://localhost:1010")
                    .WithMode(HttpListenerMode.EmbedIO))
                .WithIPBanning(o => o
                    .WithWhitelist(
                        "",
                        "172.16.16.124",
                        "172.16.17.1/24",
                        "192.168.1-2.2-5")
                    .WithRules("(404 Not Found)+"), 5,5);

Let's know if you like this new feature or not.