Forum Moderators: phranque
I'm trying to block requests from outside our local network, it's a private server, so need to allow only 192.168.3.*
The problem is the server is misconfigured to always send to Apache the IP: 10.0.0.1, even external requests, the htaccess looks like:
This allow access but even is an external pc:
order deny,allow
deny from all
allow from 10.0.0.1
I need this config, but doesn't work because the server config send 10.0.0.1 to apache:
order deny,allow
deny from all
allow from 192.168.3.
Question: Can I do a rewrite rule to do this? like:
Options +FollowSymlinks
rewriteEngine On
rewriteCond %{HTTP_FORWARDED_FOR}!192\.168\.3\..*
rewriterule / - [F]
Thank you!