Search Engine Optimization > Web Development > Blocking users from posting to phpBB forum by their IP address
Blocking users from posting to phpBB forum by their IP address
Posted by Dave on November 14th, 2005

After sorting out a way to stop someone from outside the UK posting to a
guest book, I then decided I'd had enough with the guest book and would
install phpBB to give a better look and feel !!

Is it possible to block someone posting to a phpBB forum based on their
IP address? (I want to exclude those outside the UK, by using GeoIP).
Obviously I can prevent them accessing the directory with phpBB in, but
I'd rather let them read, but not write to it if possible.

Posted by :::Jerry:::: on November 14th, 2005


"Dave" <nospam@nowhere.com> wrote in message
news:4378303a@212.67.96.135...
Wouldn't that also effect those using AOL in this country, or is this
an just an 'old wives tail'?



Posted by Dave on November 14th, 2005

:::Jerry:::: wrote:
I don't know. I've just found out from someone else in the UK, who uses
my guest book reasonably regularly, that he is blocked. He works for a
US company and so the traffic appears to come from the US, despite the
fact he is in the UK.So this problem, which someone else mentioned here,
is perhaps not as rare as was thought.

Perhaps I'll just exclude the troublesome countries - the US has not
been one of them.

I'd still like to allow it to be read anywhere though, but I don't see
how one can do that with phpBB.


Posted by Krustov on November 14th, 2005

<uk.net.web.authoring , Dave , nospam@nowhere.com>
<4378303a@212.67.96.135>
<Mon, 14 Nov 2005 06:35:37 +0000>

Instead of instant or user validation on signup - you could make it
admin validation .


--
(c) The Amazing Krustov

Posted by guv on November 14th, 2005

On Mon, 14 Nov 2005 15:50:29 -0000, Krustov
<krusty@krustov.co.uk.INVALID> wrote:

Yes agreed. That way you could monitor the members and still be
viewable for all.

Not sure how you would manage to determine you is in the UK from the
registration details though! (Location is listed but not as field that
must be filled - and could be faked anywy!)



--
www.senaction.com

Posted by Gordon Hudson on November 14th, 2005


":::Jerry::::" <me@privacy.INVALID> wrote in message
news:437872f6$0$81707$892e7fe2@authen.yellow.readf reenews.net...
Not just those but any US IP's routed from over here.
Some other ISP does this as well but I have forgotten which.
It may be possible to determine which blocks of AOL's range are used from
the UK though.



Posted by David Kirkby on November 14th, 2005

Gordon Hudson wrote:

I got a message earlier today from someone who works for a US company in
the UK. He was blocked to my guest book, so a total block outside the UK
would appear to cause problems.

Looking at the spam I seem to have attracted, 95 or more percent of it
comes from China, Korea & Taiwan. So filtering out those countries, will
probably do what I want. But I'm still not sure how (if at all) I can do
it so the phpBB forum can be read, but not written to by those
countries. With the guest book it was easy, as the cgi script was in a
protected directory, but the html file was not. In the case of phpBB,
that is not so easy.

I have the file GeoIPCountryWhois.csv. I don't know how good that is,
but given its for a community site, I am not going to spend money on
paying for a database.

Looking at the phpBB docs

http://www.phpbb.com/support/guide/#section3_5_1_2

there is a method to block content. However, the method would I think
slow the program down if there were hundred of lines of IPs for it to
parse. At least the GeoIP module is quick in apache.

I'm already finding phpBB is slowing the site down. The httpd process
has never had as much to do as now. I do have a faster machine I could
use (Sun Ultra 60), but if that was to go wrong I'd have no backup. At
least with the SPARC 20 I am using, should it go wrong I have another
identical machine.

I might go for blocking in Apache. It will block reads too, but I don't
suppose that will matter an awful lot. I'd just prefer not to have to do
so.


--
David Kirkby,
G8WRB

Please check out http://www.g8wrb.org/
of if you live in Essex http://www.southminster-branch-line.org.uk/


Posted by Gordon Hudson on November 15th, 2005


"David Kirkby" <david.kirkby@onetel.net> wrote in message
news:4378f540@212.67.96.135...

Thats what I would do.
Substantially easier than trying to block a function within the software.

I think its Pipex who have some US IP's operating from here mainly in use by
business customers.


--
Gordon Hudson || Hostroute.com Ltd
e-mail:ghudson [at] hostroute.net
http://www.hostroute.co.uk/resellers Host 5 web sites for £9 per month
http://www.nameroute.co.uk/ Domain Names with free hosting and email




Posted by Dave on November 15th, 2005

Gordon Hudson wrote:
Yes, I can see that. With my perl script for a guest book it was easy -
just protect the cgi, but with phpbb is is a lot more difficult.


OK, I'll leave the USA open. I've blocked this lot of countries - are
there any obvious problems likely to be encountered with any of these?
Of course no list is perfect, but I need to strike a balance. Since the
site is very local in nature, there really is no need for someone
getting access from outside the UK.

Perhaps someone will tell me one of the major ISP's uses one of these
countries.

Argentina
Bangladesh
Bolivia
Brazil
Chile
China
Colombia
Estonia
French
Equatorial
Hong
India
Iraq
Japan
Korea
Nigeria
Peru
Pakistan
Paraguay
Russia
Suriname
Taiwan
Ukraine
Uruguay
Venezuela

Dave
(with a valid email address !!!!)


Posted by Gordon Hudson on November 15th, 2005


"Dave" <November-2005@southminister-branch-line.org.uk> wrote in message
news:437a21cd@212.67.96.135...
Can't help you there as we block fraud countries like Nigeria, Indonesia,
Egypt etc



Funbolt.com - Entertainment portal, wallpapers, sexy celebs