Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with IP deny

Status
Not open for further replies.

Crundy

Programmer
Jul 20, 2001
305
GB
Hello,
I want to block a whole ISP from accessing a section of my website. Imagine the netblock is in the range:
123.456.31.0 - 123.456.63.255
I've tried:

SetEnvIf Remote_Addr "^123.456.[31-63].[0-255]$" ban
order deny,allow
deny from env=ban
allow from all

But that didn't work. Can anyone help?

C:\DOS:>
C:\DOS:>RUN
RUN DOS RUN!!
 
Hello,
Thanks for the reply, but unfortunately it still doesn't work.

I'm testing using my own ISP. My current IP is 82.14.31.81 and so I tried:

Order deny,allow
Deny from 82.14.31.0/255.255.224.0
Allow from all

But it didn't work. Do you know anything else that might work

C:\DOS:>
C:\DOS:>RUN
RUN DOS RUN!!
 
How does that work? Can you explain a little for me?

C:\DOS:>
C:\DOS:>RUN
RUN DOS RUN!!
 
Ah, it's OK, predamarcel's version did work. I just needed to omit the "Allow from all" line and it worked.

Thanks :)

C:\DOS:>
C:\DOS:>RUN
RUN DOS RUN!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top