Deny/Allow IP's.

 
Post new topic   Reply to topic    Aprelium Forum Index -> General Questions
View previous topic :: View next topic  
Author Message
Doctor
-


Joined: 07 Jun 2007
Posts: 4

PostPosted: Thu Jun 07, 2007 10:59 pm    Post subject: Deny/Allow IP's. Reply with quote

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 View user's profile Send private message
AbyssUnderground
-


Joined: 31 Dec 2004
Posts: 3855

PostPosted: Fri Jun 08, 2007 12:56 am    Post subject: Reply with quote

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 View user's profile Send private message Visit poster's website
Doctor
-


Joined: 07 Jun 2007
Posts: 4

PostPosted: Fri Jun 08, 2007 7:48 am    Post subject: Reply with quote

Would you have an example code, By any chance?
Ive been googling for quite some time. But I cant find any.
Back to top View user's profile Send private message
AbyssUnderground
-


Joined: 31 Dec 2004
Posts: 3855

PostPosted: Fri Jun 08, 2007 11:03 am    Post subject: Reply with quote

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 View user's profile Send private message Visit poster's website
pkSML
-


Joined: 29 May 2006
Posts: 955
Location: Michigan, USA

PostPosted: Fri Jun 08, 2007 1:01 pm    Post subject: Reply with quote

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 View user's profile Send private message Visit poster's website
Doctor
-


Joined: 07 Jun 2007
Posts: 4

PostPosted: Fri Jun 08, 2007 5:41 pm    Post subject: Reply with quote

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 View user's profile Send private message
Doctor
-


Joined: 07 Jun 2007
Posts: 4

PostPosted: Fri Jun 08, 2007 5:41 pm    Post subject: Reply with quote

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 View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> General Questions All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group