Forum Discussion
stolivar_88319
Nimbostratus
Feb 11, 2009.htaccess no longer denying pages to non specified IP addresses
Seems i have ran into another problem. Websites that have .htaccess files in directories that restrict viewing a page if you don't match an IP isn't working anymore.
my .htaccess looks like
deny from all
allow from 169.147
allow from 10
I think the problem is that my F5 devices are on the 10.x.x.x subnet (so is the rest of our network) and apache sees these IPs as the requesting IPs and are letting them in. I am using the XForward rule to allow the apache logs to see the requesting IP addresses, but this doesn't seem to work when it comes to .htaccess files.
Any suggestions because I am stumped.
- dennypayne
Employee
Hmmm...so I'm guessing if you disallow the specific 10.x.x.x SNAT address then legitimate customers would also get denied.when CLIENT_ACCEPTED { if { [IP::addr [IP::client_addr]/8 equals 10.0.0.0 ] || [IP::addr [IP::client_addr]/16 equals 169.147.0.0 ] } { snat to allowed address snat 10.x.x.A } else { snat to denied address snat 10.x.x.B } }
- stolivar_88319
Nimbostratus
I will look at this and run this by my networking folks to make sure we can do it. - stolivar_88319
Nimbostratus
I haven't head back from my network guys yet. - stolivar_88319
Nimbostratus
Okay, this works - stolivar_88319
Nimbostratus
Matt, thank you. Yes I realize I posted the [F] in there, I have played with mod_rewrite and can't seem to get it to go from checking IPs to providing auth. - stolivar_88319
Nimbostratus
Matt, thank you. Yes I realize I posted the [F] in there, I have played with mod_rewrite and can't seem to get it to go from checking IPs to providing auth. - stolivar_88319
Nimbostratus
also tried this in
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects