Ban users by IP address

janipewter

Joined: 2006-05-20
Posts: 18
Posted: Thu, 2007-03-22 13:09

Is there any way of banning users from Gallery2 by IP address? I would rather do this rather than having to drop all connections using iptables.


Gallery version = 2.2-rc-2 core 1.1.30
PHP version = 4.3.10-18 apache2handler
Webserver = Apache/2.0.54 (Debian GNU/Linux) PHP/4.3.10-18
Database = mysql 4.0.24_Debian-10sarge2-log, lock.system=flock
Toolkits = ArchiveUpload, Exif, Getid3, Thumbnail, Gd, LinkItemToolkit
Acceleration = none, none
Operating system = Linux server1.teamhost.co.uk 2.6.8-3-686-smp #1 SMP Thu Sep 7 04:39:15 UTC 2006 i686
Default theme = classic
gettext = enabled
Locale = en_GB
Browser = Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.2) Gecko/20070219 Firefox/2.0.0.2
Rows in GalleryAccessMap table = 28
Rows in GalleryAccessSubscriberMap table = 583
Rows in GalleryUser table = 5
Rows in GalleryItem table = 579
Rows in GalleryAlbumItem table = 67
Rows in GalleryCacheMap table = 0

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Thu, 2007-03-22 13:54

Nope.

Would you want to block them from registering / logging in, from anything or what specifically?

--------------
Doumentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage

 
janipewter

Joined: 2006-05-20
Posts: 18
Posted: Thu, 2007-03-22 17:48

Blocking them from viewing the gallery completely.

 
philjung

Joined: 2004-05-18
Posts: 19
Posted: Fri, 2007-03-30 19:29

Since your server is running on Linux, you can block specific users/IP addresses/domains with an .htaccess file

If you google for "ban users with .htaccess" you will find what you need, but here is a 10-second summary:
In your Gallery installation directory, create/edit a file called .htaccess and add something similar to the following:

order allow,deny
deny from 123.456.78.90
deny from 123.456.78
deny from .aol.com
allow from all

This will block users for that particular directory.

If you have URL Rewrite Module, be sure to put these new lines above where it says
# BEGIN Url Rewrite section
# (Automatically generated. Do not edit this section)

Hope this helps.

 
janipewter

Joined: 2006-05-20
Posts: 18
Posted: Sat, 2007-03-31 14:11

Thanks for the reply philjung, it works a treat.

 
Suzana02

Joined: 2007-04-06
Posts: 6
Posted: Thu, 2009-04-16 22:59

How do you ban an ip addy if you don't use .htaccess? I need to ban one specific person from the entire gallery.
Also where can I locate the installation file? My gallery has been up for 2 yrs. now and this person gives me problems all the dang time.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 22892
Posted: Fri, 2009-04-17 03:12
Quote:
How do you ban an ip addy if you don't use .htaccess?

move to a host that supports this most common feature.

Quote:
Also where can I locate the installation file? My gallery has been up for 2 yrs. now and this person gives me problems all the dang time.

start a new thread, that is not related to this topic.

Dave

_____________________________________________
Blog & G2 || floridave - Gallery Team

 
Suzana02

Joined: 2007-04-06
Posts: 6
Posted: Fri, 2009-04-17 04:23

Hmmm not moving hosts as I like my current server and have been w/them for years.
I may use another gallery format other then G2.

Sorry I thought it was topic related as response from a mod was to go to this section of G2 to ban. Not that important I find a gallery host that makes it much simpler to ban ip's and easier to get assistance.

Thank you for your time. :)

 
alecmyers

Joined: 2006-08-01
Posts: 4338
Posted: Fri, 2009-04-17 07:55
Quote:
response from a mod was to go to this section of G2 to ban

According to my interpretation the response was to do it with an .htaccess file, I find no reference to "installation file" anywhere.

 
Suzana02

Joined: 2007-04-06
Posts: 6
Posted: Fri, 2009-04-17 08:35

One of the responses in minimizing the response from google said to access that file...but again no matter I will find another host for my gallery.
I thank you for your time. :)

 
alecmyers

Joined: 2006-08-01
Posts: 4338
Posted: Fri, 2009-04-17 08:50
Quote:
One of the responses in minimizing the response from google

Now you've lost me completely ... sorry!

 
Suzana02

Joined: 2007-04-06
Posts: 6
Posted: Fri, 2009-04-17 22:07
philjung wrote:
Since your server is running on Linux, you can block specific users/IP addresses/domains with an .htaccess file

If you google for "ban users with .htaccess" you will find what you need, but here is a 10-second summary:
In your Gallery installation directory, create/edit a file called .htaccess and add something similar to the following:

order allow,deny
deny from 123.456.78.90
deny from 123.456.78
deny from .aol.com
allow from all

This will block users for that particular directory.

If you have URL Rewrite Module, be sure to put these new lines above where it says
# BEGIN Url Rewrite section
# (Automatically generated. Do not edit this section)

Hope this helps.

I placed in bold what I was referring to based off another person's instructions. They brought up the fact to go thru install that is why I posted the ? I did when I was told to start another thread, to me it looks like this is the appropriate thread.

But again never mind, I will find a place that is tons more helpful and much more customer service oriented. Will also advise other website owner friends to not go w/G2 because of the lack of features and assistance.

Hope everyone has a nice weekend.

 
alecmyers

Joined: 2006-08-01
Posts: 4338
Posted: Fri, 2009-04-17 23:42

Ah... the installation directory is the directory on your webserver you installed Gallery in - the one with the main.php file in it. Previously you were asking "where can I locate the installation file?" - hence the confusion.

Quote:
But again never mind, I will find a place that is tons more helpful and much more customer service oriented. Will also advise other website owner friends to not go w/G2 because of the lack of features and assistance.

You've left no one in any doubt about your opinion about the level of assistance you've had here, but reading the thread back I think it's been quite on-the-ball. Anyway it's useful to complete queries even if it's not any use to you, because this thread may crop up in someone's search for their problems in the future.