-
# Asegurando WordPress
-
-
# Desactivar la firma de servidor
-
ServerSignature Off
-
-
# Desactivar el listado de carpetas y archivos
-
Options All -Indexes
-
-
# Protegiendo el mismo fichero htaccess
-
<files .htaccess>
-
order allow,deny
-
deny from all
-
</files>
-
-
# Protegiendo htaccess de manera extrema
-
<files ~ "^.*\.([Hh][Tt][Aa])">
-
order allow,deny
-
deny from all
-
satisfy all
-
</files>
-
-
# Protegiendo wp-admin por IP
-
AuthUserFile /dev/null
-
AuthGroupFile /dev/null
-
AuthName "Access Control"
-
AuthType Basic
-
order deny,allow
-
deny from all
-
# IP cuando estoy en casa
-
allow from xx.xxx.xxx.xx
-
# IP cuando estoy en el trabajo
-
allow from xx.xxx.xxx.xxx
-
allow from xxx.xxx.xxx.200
-
# IP de otro usuario con permisos
-
allow from xxx.xxx.x.xx
-
-
# Protegiendo el fichero wpconfig.php
-
<files wp-config.php>
-
order allow,deny
-
deny from all
-
</files>
-
-
# Protegiéndonos de los commentarios spam
-
<IfModule mod_rewrite.c>
-
RewriteEngine On
-
RewriteCond %{REQUEST_METHOD} POST
-
RewriteCond %{REQUEST_URI} .wp-comments-post\.php*
-
RewriteCond %{HTTP_REFERER} !.*tublog.com* [OR]
-
RewriteCond %{HTTP_USER_AGENT} ^$
-
RewriteRule (.*) ^http://%{REMOTE_ADDR}/$ [R=301,L]
-
</IfModule>
-
-
# Desactivando el hotlinking con un mensaje de aviso
-
<IfModule mod_rewrite.c>
-
RewriteEngine On
-
RewriteCond %{HTTP_REFERER} !^$
-
RewriteCond %{HTTP_REFERER} !^http://www.xyz.com/.*$ [NC]
-
RewriteCond %{HTTP_REFERER} !^http://www.xyz.com$ [NC]
-
RewriteCond %{HTTP_REFERER} !^http://xyz.com/.*$ [NC]
-
RewriteCond %{HTTP_REFERER} !^http://xyz.com$ [NC]
-
RewriteCond %{HTTP_REFERER} !google. [NC]
-
RewriteCond %{HTTP_REFERER} !msn. [NC]
-
RewriteCond %{HTTP_REFERER} !live. [NC]
-
RewriteCond %{HTTP_REFERER} !yahoo. [NC]
-
RewriteCond %{HTTP_REFERER} !gravatar. [NC]
-
RewriteCond %{HTTP_REFERER} !search?q=cache [NC]
-
RewriteRule .*\.(jpg|jpeg|gif|png|bmp)$ - [F,NC]
-
</IfModule>
-
-
# Baneo por IP
-
<Limit GET POST>
-
order allow,deny
-
deny from xx.xx.xxx.xxx /aquí pones la IP a banear
-
allow from all
-
</Limit>
-
-
# Baneo por dominio
-
RewriteEngine On
-
Options +FollowSymlinks
-
RewriteCond %{HTTP_REFERER} dominio_a_banear\.com [NC]
-
RewriteRule .* - [F]
-
-
# Evitar splogs
-
RewriteEngine On
-
RewriteCond %{REQUEST_METHOD} POST
-
RewriteCond %{REQUEST_URI} .wp-signup.php*
-
RewriteCond %{HTTP_REFERER} !.*miwordpressmu.com.* [OR]
-
RewriteCond %{HTTP_USER_AGENT} ^$
-
RewriteRule (.*) http://disney.com/ [R=301,L]
No hay comentarios:
Publicar un comentario