mandrakethepenguin Posted August 6, 2006 Share Posted August 6, 2006 How do I block more than one range of IP addresses. And can I do this without a .htaccess file, or can I do it through one of the config files. I'm running SuSE Linux 10 on the server. Quote Link to comment Share on other sites More sharing options...
youcantoo Posted August 11, 2006 Share Posted August 11, 2006 There are a number of ways to block ip numbers or ranges of ip numbers. The first one of the top of my hease is the hosts.deny file. usally found in the '/etc' directory of your system.inside that file you would have something likeALL: 61.178.127.182 <-- blocks a single ip numberALL: 61.145.126.0/255.255.240.0 <- blocks 255 ip numbers (.0-.255)ALL: 61.151. <-- matches the fist two octels (blocks lots of ip starting with 61.151)ALL: .co.jp <-- blocks everything with with a domain ending with (.co.jp)another way is to block them within the httpd.conf file using theOrder Deny,AllowDeny from xxx.xxx.xxx.xxx <--repeat as neededDeny from xxx.xxx.xxx.xxx each on a line by its selfAllow from alllast would be using .htaccesspersonally, I use all three Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.