Can't Access Plesk Admin Because Of DOS Attack, Block IP Address Through SSH?

 ̄綄美尐妖づ 提交于 2019-12-07 05:00:48

问题


I can't access Plesk Amdin because of DOS attack; can I block a hostname or IP address through SSH? If so, how would I be able to do this?

Thank you!


回答1:


If you have iptables you can block it using simple rule:

iptables -I INPUT --source 1.2.3.4 -j DROP

This rule drops packets coming from IP 1.2.3.4.




回答2:


Probably the easiest is to SSH to your box use vim to and add the following to the top of your .htaccess file in the root of your domain (/var/www/vhosts/yourdomain.com/httpdocs/.htaccess):

deny from 12.345.67.89

Obviously replace the IP address with the one you want to block. Repeat this for any sites you think are being attacked.




回答3:


iptables -I INPUT -p tcp -s 1.2.3.4 -m statistic --probability 0.5 -j DROP iptables -I INPUT n -p tcp -s 1.2.3.4 -m rpfilter --loose -j ACCEPT # n would be an numeric index into the INPUT CHAIN -- default is append to INPUT chain

iptables -I INPUT -p tcp -m hashlimit --hashlimit-mode srcip -s 1.2.3.4 --hashlimit-srcmask --hashlimit-above 9/second -j DROP

iptables -I INPUT -p tcp -s 1.2.3.4 -m limit --sport 80 --limit 100/second -j ACCEPT

There are countless others for your circumstances.

Sincerely,

ArrowInTree



来源:https://stackoverflow.com/questions/12301411/cant-access-plesk-admin-because-of-dos-attack-block-ip-address-through-ssh

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!