Forum Moderators: phranque

Message Too Old, No Replies

htaccess Domain Name Deny

Can't Allow From Domain Name

         

boxfan

1:06 am on Aug 2, 2006 (gmt 0)

10+ Year Member



Hello,

I have an htaccess file that I use to deny all traffic except for a few IP addresses. I had a user set up a no-ip static IP address and now I am trying to allow from username.no-ip.org but I can't get it to work.

If I allow from the ip address then the user is allowed access but when I try to change the ip address to the username.no-ip.org address the user is denied access.

Here is what I have

<Limit GET POST PUT>
order deny,allow
deny from all
# User 1
allow from username.no-ip.org
</Limit>

Any ideas why the user can't gain access using the no-ip.org address but can using an ip address? BTW, I can ping the no-ip.org address and obtain the correct IP address so that's not the problem.

Thanks

jdMorgan

2:12 am on Aug 2, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



What happens if you do a reverse-dns lookup on the IP address, though -- Does it resolve to that username.no-ip.org? (try dnsstuff for an RDNS lookup). If not, then you can't use a REMOTE_HOST check like you've shown, because REMOTE_HOST does a reverse-DNS lookup.

Jim

boxfan

3:44 am on Aug 2, 2006 (gmt 0)

10+ Year Member



Oh, yeah it resolves to the ISP and not the no-ip.org address.

So, what other options do I have? I want to allow by IP address or a no-ip.org address.