PDA

View Full Version : custom ip range in .htaccess



Lucifer
09-10-11, 14:21
Hello,

Is there way that provide custom IP range in .htaccess to allow from? For an instance, 10.0.0.150-10.0.0.180

Louis
09-10-11, 14:34
Just allow the network as following:

allow from 10.0.0.

I am concerned that I am unaware of a more wordy method of allowing a specific range of IP's. Hope this helps.

Judd
09-10-11, 14:40
What exactly you wanting to do? Rather allow perticular IP's allowing IP range can cause security threats, you simply do not want to give access to anyone, sooner or later when you do not know who is using those IP's.

Arthur
09-10-11, 14:53
If you want to block a IP range, you can use the following steps:


EX.
order allow, deny
deny from 69.65.43.93-100
allow from all.
This will deny access to anyone with the IP numbers 69.65.43.93 through 69.65.43.100

So the same is true of the allow; simply change the texts from “allow” to “deny” and vice versa.

Rozanne
09-10-11, 15:08
Wouldn't it be simpler to use IPTables to do the same thing?

Arthur
09-10-11, 15:17
OP specifically asked for a .htaccess file and yes, with the help Of IPTables we can do all this on a firewall, but a lot of people don't have the access to firewall systems and therefore they must resolve this issue with .htaccess information.

Rozanne
09-10-11, 15:24
Probably OP is on shared or reseller hosting package, because I haven't seen a VPS or Dedicated Server without IPTables access.