# 1 WP Plug-in
Wordpress, consulte lo siguiente, es posible que necesite o no un complemento
- Lea este enlace sobre varios complementos antispam de WP y ajuste la configuración de WP para que no necesite el complemento.
- Los 10 mejores plugins antispam de WP
- Página de plugin de Wordpress
Como tiene control sobre el servidor web, la instalación del complemento no debería ser un problema.
# 2 IIS Web.config
El bloqueo de la base de IP se puede hacer con IIS Web.config, el siguiente es un ejemplo para permitir todo excepto bloquear IP específicas
<security>
<ipSecurity allowUnlisted="true"> <!-- this line allows everybody, except those listed below -->
<clear/> <!-- removes all upstream restrictions -->
<add ipAddress="83.116.19.53"/> <!-- blocks the specific IP of 83.116.19.53 -->
<add ipAddress="83.116.119.0" subnetMask="255.255.255.0"/> <!--blocks network 83.116.119.0 to 83.116.119.255-->
<add ipAddress="83.116.0.0" subnetMask="255.255.0.0"/> <!--blocks network 83.116.0.0 to 83.116.255.255-->
<add ipAddress="83.0.0.0" subnetMask="255.0.0.0"/> <!--blocks entire /8 network of 83.0.0.0 to 83.255.255.255-->
</ipSecurity>
</security>
Más información en este enlace .
# 3 IIS Web.config reescribir
Encontrado a continuación aquí , tal vez puedas probarlo.
<!-- Heading for the XML File -->
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<!-- This is where the rules start, this one will block EVERYTHING on your site with the <match url=".*" /> -->
<rules>
<rule name="Blocked Users" stopProcessing="true">
<match url=".*" />
<conditions>
<!-- This will just go to the 'Bad Ips' rewriteMap below and compare it to the REMOTE_ADDR which is the requesting IP -->
<add input="{Bad Ips:{REMOTE_ADDR}}" pattern="1" />
</conditions>
<!-- Actions can be Custom Rewrite, Redirect, or Just Abort Request, uncomment examples as needed -->
<action type="CustomResponse" statusCode="403" statusReason="Forbidden" statusDescription="Forbidden" />
<!-- This one will rewrite url to specified file
<action type="Rewrite" url="error.html" appendQueryString="false" /> -->
<!-- This on will redirect to another site
<action type="Redirect" url="http://www.google.com" appendQueryString="false" /> -->
<!-- This one will just Abort
<action type="AbortRequest" /> -->
</rule>
</rules>
<!-- This rewrite Map is where you choose your blocked IP's, values with 1 are blocked, all others are ignored, simple add your keys -->
<rewriteMaps>
<rewriteMap name="Bad Ips">
<!-- This one will use wildcards -->
<add key="108.166.*.*" value="1" />
<!-- This one wil use static IP -->
<add key="12.13.15.16" value="1" />
</rewriteMap>
</rewriteMaps>
</rewrite>
</system.webServer>
</configuration>