UeDeals
UeDeals

Reputation: 1

.htaccess block local ip address

I have 3 applications running on wampserver hosted on our intranet.

I would like to block the access of applications for a certain ip range. So I edited .htaccess files for each application as below. But the application is not blocked.

order deny,allow allow from 10.212.4. deny from all

After checking the logs I found that the ip address the client returning was different. Since all our machines use proxy settings by default.

Anyone could help me how to over come this ?

Upvotes: 0

Views: 718

Answers (1)

Zeki
Zeki

Reputation: 5276

You can use mod_rewrite to block people based on their "x-forwarded-for" header. I would not consider this secure though, because these are easy to forge.

See the discussion here:

http://www.110mb.com/forum/empty-t26129.0.html

Upvotes: 0

Related Questions