Membership is FREE – with unlimited access to all features, tools, and discussions. Premium accounts get benefits like banner ads and newsletter exposure. ✅ Signature links are now free for all. 🚫 No AI-generated (LLM) posts allowed. Share your own thoughts and experience — accounts may be terminated for violations.

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.

Rule #1: Be Respectful

Do not insult any other member. Be polite and do business. Thank you!

Members online

Premium Members

New Threads

Domain Forum Friends

Lastest Listings

Our Mods' Businesses

*the exceptional businesses of our esteemed moderators
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Siusaidh AcornBot:
    Siusaidh has left the room.
      Siusaidh AcornBot: Siusaidh has left the room.
      Top Bottom