Htaccess [SOLVED]: how do I IP Block someone who is dosing me php or html

Htaccess [SOLVED]: how do I IP Block someone who is dosing me php or html

Home Forums htaccess Htaccess [SOLVED]: how do I IP Block someone who is dosing me php or html

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #36952

    Anonymous

    QuestionQuestion

    My website http://ppyazi.com is currently getting spammed, I think it’s a dos attack. I can not block the IP address in the admin control panel section. I am wondering if there is any way to block the IP address with php, html, htaccess, js or anything else.

    This is the ip:

    122.106.xxx.xxx
    

    This is not a duplicate because none of the other answers I found work.

    #36953

    Anonymous

    Accepted AnswerAnswer

    If you are running apache and are on shared hosting (no access to firewall on the server), then I would opt for htaccess. This would go in a file named .htaccess in your web directory:

    Order Deny,Allow
    Deny from 10.10.10.10
    Deny from 20.20.20.20
    

    Obviously use the IP addresses you want to block instead of these example ones and use a line for each IP

    Source: https://stackoverflow.com/questions/47985867/how-do-i-ip-block-someone-who-is-dosing-me-php-or-html
    Author: C Miller
    Creative Commons License
    This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.