custom ip range in htaccess

kolumneya

New member
Hello,
is there anyway that provide custom ip range in .htaccess for Allow from ?
for exampel following range :
10.0.0.140-10.0.0.190
 
Hello,

Simply allow the network as follows:

allow from 10.0.0.

I'm afraid I'm unaware of a more verbose method of allowing a specific range of IP's.

Hope this helps!
 
Hello,
is there anyway that provide custom ip range in .htaccess for Allow from ?
for exampel following range :
10.0.0.140-10.0.0.190

But what would you want to do that? Instead allow specific IP's allowing IP ranges can cause security threats, you just don't want to provide access to anyone, eventually when you don't know who's using those IP's.
 
http://billing.handsonwebhosting.com/knowledgebase.php?action=displayarticle&id=195
Code:
If you want to block a RANGE of IP numbers, you can use the following:
order allow,deny 
deny from 66.98.125.222-240 
allow from all.
This will DENY access to anyone with the IP numbers 66.98.125.222 through 66.98.125.240. You

So the same is true of the ALLOW.. just change the wording from "allow" to "deny" and vice versa.

We do this here on a number of our internal IPs for when we're testing sites etc.
 
http://billing.handsonwebhosting.com/knowledgebase.php?action=displayarticle&id=195
Code:
If you want to block a RANGE of IP numbers, you can use the following:
order allow,deny 
deny from 66.98.125.222-240 
allow from all.
This will DENY access to anyone with the IP numbers 66.98.125.222 through 66.98.125.240. You

So the same is true of the ALLOW.. just change the wording from "allow" to "deny" and vice versa.

We do this here on a number of our internal IPs for when we're testing sites etc.

That's great information!
 
Will it be cleaner? Yes as you're stopping it at the firewall, however the original poster asked specifically for .htaccess allow.

Can you do all this on a firewall and in IPTables, yes, but many people do not have access to firewall systems and instead must resolve with .htaccess information.
 
Back
Top