• Welcome to AcornDomains.co.uk, a friendly community for UK domain investors, developers and anyone interested in domain names.

    Whether you're looking to buy or sell domains, learn more about the UK domain market, get feedback on your names, or simply chat with other domainers, you're in the right place. AcornDomains has been bringing together people from across the UK domain industry for many years, from complete beginners to experienced investors.

    Have a look around, join the discussions and, if you haven't already, create a free account and introduce yourself.

Blocking IP range help with .htaccess

Status
Not open for further replies.
Joined
May 18, 2006
Posts
5,943
Reaction score
103
Hi all,

Can anyone kindly assist me with creating an .htaccess file to block an IP range which is spamming several sites on my server?

I'm getting spam from an originating T-Mobile IP range of 178.100.0.0 - 178.103.255.255. T-Mobile won't do anything about it and never reply. :rolleyes:

So, rather than use the WHM to blanket ban T-Mobile users with a wildcard on the entire server, I'd like to individually upload an .htaccess file to block several sites only.

How do I block the entire range as above?

e.g. Would this work?

Code:
order allow,deny
deny from 178.*.*.*.*
allow from all

Help gratefully received, thanks! :D
 
This should work:

order allow,deny
deny from 178.
allow from all

You can also block specific ISPs
 
If you really want to block the whole 178 range then the following would do it:

Code:
deny from 178.

edit:
I was picked at the post before refreshing the page.
 
Haha, great minds think alike.

Btw I don't think you are allowed affiliate links in your sig here.
 
Status
Not open for further replies.
Top Bottom