Support » Plugins and Hacks » Hacks » Block Ip's which hit certain landing page

Viewing 3 replies - 1 through 3 (of 3 total)
  • http://kb.mediatemple.net/questions/1699/Block+a+specific+IP+address+from+accessing+your+website

    this post helps you and your code will be like this

    # allow all except those indicated here
    <Files *>
    order allow,deny
    allow from all
    deny from xxx.xxx.xxx.xxx
    deny from .*example\.com.*
    </Files>

    the one who go to your 404 page which is custom get the ip address of user using php and then append your .htaccess file with their ip address

    I love the level of paranoia there 🙂

    You can do that via .htaccess like Altaf said, or you can just add the IP address at the top of your .htaccess file with “deny from IP”.

    However, I would recommend going into the other direction: You should block every IP address from visiting wp-login/wp-admin and only allowing the ones you trust.

    That way you don’t need these complex steps and you increased your security posture by quite a bit. I give some examples about it here:

    http://blog.sucuri.net/2012/07/wordpress-and-server-hardening-taking-security-to-another-level.html

    thanks,

    Thanks Altaf and Daniel!

    I was unsure of the logic behind ip blocking programatically. I’m a little new to the web realm.

    I would go the route of bocking every IP but my ISP using dynamic IP protocol. I will certainly block all IP’s from wp-admin and wp-login once I can purchase a static IP from them.

    Thanks again!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Block Ip's which hit certain landing page’ is closed to new replies.