Deny by Request Rate

Hello

I need to configure denyByRequestRate to an existing DSC push environment, but not sure how.

I was able to install the windows feature via the my psd1 script:

[pre] WindowsFeatures = (“Web-Server”, “Web-Basic-Auth”, “Web-Windows-Auth”, ‘Web-Url-Auth’, ‘Web-IP-Security’,“Web-Mgmt-Tools”, “Web-Mgmt-Service”, ‘Web-Includes’, ‘Web-CGI’) [/pre] and then config it manually to see the output to the applicationhost.config file.

then manually configured the setting to get the output: <dynamicIpSecurity>
<denyByRequestRate enabled=“true” maxRequests=“200” requestIntervalInMilliseconds=“20000” />
</dynamicIpSecurity>

 

Something from xWebAdministration module should help you. Below are the DSCResources available. check xWebConfigProperty and xWebConfigPropertyCollection.

ImplementedAs   Name                          ModuleName                     Version    Properties
-------------   ----                          ----------                     -------    ----------
PowerShell      WebApplicationHandler         xWebAdministration             2.4.0.0    {Name, Path, AllowPathInfo, DependsOn...}
PowerShell      xIisFeatureDelegation         xWebAdministration             2.4.0.0    {Filter, OverrideMode, Path, DependsOn...}
PowerShell      xIisHandler                   xWebAdministration             2.4.0.0    {Ensure, Name, DependsOn, PsDscRunAsCredential}
PowerShell      xIisLogging                   xWebAdministration             2.4.0.0    {LogPath, DependsOn, LogCustomFields, LogFlags...}
PowerShell      xIisMimeTypeMapping           xWebAdministration             2.4.0.0    {ConfigurationPath, Ensure, Extension, MimeType...
PowerShell      xIisModule                    xWebAdministration             2.4.0.0    {Name, Path, RequestPath, Verb...}
PowerShell      xSSLSettings                  xWebAdministration             2.4.0.0    {Bindings, Name, DependsOn, Ensure...}
PowerShell      xWebApplication               xWebAdministration             2.4.0.0    {Name, PhysicalPath, WebAppPool, Website...}
PowerShell      xWebAppPool                   xWebAdministration             2.4.0.0    {Name, autoShutdownExe, autoShutdownParams, aut...
PowerShell      xWebAppPoolDefaults           xWebAdministration             2.4.0.0    {ApplyTo, DependsOn, IdentityType, ManagedRunti...
PowerShell      xWebConfigKeyValue            xWebAdministration             2.4.0.0    {ConfigSection, Key, WebsitePath, DependsOn...}
PowerShell      xWebConfigProperty            xWebAdministration             2.4.0.0    {Filter, PropertyName, WebsitePath, DependsOn...}
PowerShell      xWebConfigPropertyCollection  xWebAdministration             2.4.0.0    {CollectionName, Filter, ItemKeyName, ItemKeyVa...
PowerShell      xWebsite                      xWebAdministration             2.4.0.0    {Name, ApplicationPool, ApplicationType, Authen...
PowerShell      xWebSiteDefaults              xWebAdministration             2.4.0.0    {ApplyTo, AllowSubDirConfig, DefaultApplication...
PowerShell      xWebVirtualDirectory          xWebAdministration             2.4.0.0    {Name, PhysicalPath, WebApplication, Website...}

i will look