Block Range of IPs

橙三吉。 提交于 2020-01-03 03:17:06

问题


I'm trying to block a range of IPs from visiting my website

Here is what I have in my .htaccess file

order allow,deny
Deny from 64.244.0.0/64.245.255.255
Deny from 64.244.0.0/15
allow from all

I'd like to know if anyone can tell (or estimate) me how many IPs have i blocked there?


回答1:


I believe the first DENY FROM is just wrong. I've always seen it this way

    64.244.0.0/15
Base Address^  ^Number of bits to use for subnet

This would mean that you have 2^15 addresses in the deny block.

Edit

Using the comments below, what you would want is

ORDER deny,allow
DENY from 64.244.0.0/15
ALLOW from all


来源:https://stackoverflow.com/questions/6335745/block-range-of-ips

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