View previous topic :: View next topic |
Author |
Message |
Doctor -
Joined: 07 Jun 2007 Posts: 4
|
Posted: Thu Jun 07, 2007 10:59 pm Post subject: Deny/Allow IP's. |
|
|
Im wanting to deny every ip from my site, and allow certain ip's.
The problem is, some of those ip's will be static, so they will always be changing, and it will get very annoying, for I and the other people, to have to give me their ip, and replacing the other each time.
So I thought of using no-ip redirects for ip's, But that doesnt work either, for I get:
Error in IP Address/Range: Invalid IP address or IP range
Using, eg, "x.no-ip.info".
So, I was wondering if there was a way to do this. |
|
Back to top |
|
 |
AbyssUnderground -
Joined: 31 Dec 2004 Posts: 3855
|
Posted: Fri Jun 08, 2007 12:56 am Post subject: |
|
|
You could make a php script to do this.
Basically you enter the dyndns addresses you want to allow the ip's of.
Then the script resolves the domain to its IP, checking if the IP of the visitor coresponds to the IP of any of the domains you entered. If it does allow access, if not, you can redirect it to a forbidden page. _________________ Andy (AbyssUnderground) (previously The Inquisitor)
www.abyssunderground.co.uk |
|
Back to top |
|
 |
Doctor -
Joined: 07 Jun 2007 Posts: 4
|
Posted: Fri Jun 08, 2007 7:48 am Post subject: |
|
|
Would you have an example code, By any chance?
Ive been googling for quite some time. But I cant find any. |
|
Back to top |
|
 |
AbyssUnderground -
Joined: 31 Dec 2004 Posts: 3855
|
Posted: Fri Jun 08, 2007 11:03 am Post subject: |
|
|
Unforunately no, and its not something you would fine. Josh from trustabyss.com has made a script like this before so if you PM him he could help you. _________________ Andy (AbyssUnderground) (previously The Inquisitor)
www.abyssunderground.co.uk |
|
Back to top |
|
 |
pkSML -
Joined: 29 May 2006 Posts: 955 Location: Michigan, USA
|
Posted: Fri Jun 08, 2007 1:01 pm Post subject: |
|
|
You can enter wildcards for allowed IPs.
For instance if your friend's IP is 32.76.84.142. It usually change within this range: 32.76.84.0-255. So just allow 32.76.84.*
That should take care of your problem.
Otherwise, you could use a PHP authenication script, which will only allow certain visitors to access your site, regardless of IP address. _________________ Stephen
Need a LitlURL?
http://CodeBin.yi.org |
|
Back to top |
|
 |
Doctor -
Joined: 07 Jun 2007 Posts: 4
|
Posted: Fri Jun 08, 2007 5:41 pm Post subject: |
|
|
pkSML wrote: | You can enter wildcards for allowed IPs.
For instance if your friend's IP is 32.76.84.142. It usually change within this range: 32.76.84.0-255. So just allow 32.76.84.*
That should take care of your problem.
Otherwise, you could use a PHP authenication script, which will only allow certain visitors to access your site, regardless of IP address. | The reason I want to use IP restriction, Is because, I got sick of trying to make a login system. I got as far as a login system, then I couldnt figure out a system to see if they were logged in. So, I decided to use IP restrictions. Because I want this site to only be available to people in my "Subscribed" section of my forum. So, I cant really have wildcards, because then it could allow others in. |
|
Back to top |
|
 |
Doctor -
Joined: 07 Jun 2007 Posts: 4
|
Posted: Fri Jun 08, 2007 5:41 pm Post subject: |
|
|
AbyssUnderground wrote: | Unforunately no, and its not something you would fine. Josh from trustabyss.com has made a script like this before so if you PM him he could help you. | Thanks, Ill look into that :3 |
|
Back to top |
|
 |
|