IP ban control

This is an archive of the phpBB 2.0.x support forum. Support for phpBB2 has now ended.
Forum rules
Following phpBB2's EoL, this forum is now archived for reference purposes only.
Please see the following announcement for more information: viewtopic.php?f=14&t=1385785
Locked
twinbee
Registered User
Posts: 33
Joined: Mon Dec 15, 2003 11:18 pm

IP ban control

Post by twinbee »

**************** EDIT *****************
- SEE LAST POST OF THREAD
It's a simple test that should only take a minute to complete (maximum)
***************************************


Two questions.

1: If I have to ban someone, what do they see when they try to access the forum? Is there any way to 'fake' a 404 error, so they see that instead?

2: Which of these is a valid IP number to put into the ban control field:
a: 123.456.7**.**
b: 123.456.7**.-
c: 123.456.7-.-

The docs don't make this clear enough.
Last edited by twinbee on Fri Jul 16, 2004 4:03 pm, edited 1 time in total.
Skelp
Registered User
Posts: 73
Joined: Mon Mar 08, 2004 11:38 pm

Post by Skelp »

3.5.1.2: Banning by IP or Hostname
When an IP or hostname is banned, your board's content will be blocked from any connection coming from that IP or host. Users from a banned IP will be informed of the ban, but may not view the board at all.

To ban by IP or hostname, simply enter the IP address or hostname to ban and click Submit. To specify multiple IPs or hostnames, you may separate the multiple entries with commas (,). For instance, to ban the IP 192.168.8.19 and the hostname banned.cheese.com, you would enter 192.168.8.19,banned.cheese.com

You may also ban multiple IPs or hostnames using ranges and wildcard characters. To ban a range of IPs, use -(hyphen) (e.g. 192.168.8.19-124). Banning a range of IPs will cause each IP in that range to be added to the list, so using specific IPs or wildcards is preferred. The wildcard *(asterisk) will match any characters, so to ban all IPs that begin with 192.168, use 192.168.*.* This also works with hostnames. For example *.cheese.com will ban all hostnames that end with ".cheese.com"

To un-ban IPs and hostnames, simply select the banned IP or hostname from the Un-ban one or more IP addresses listbox and press Submit.

================
You only need to use one *. So using the xample you have above you would enter: 123.456.*.*
twinbee
Registered User
Posts: 33
Joined: Mon Dec 15, 2003 11:18 pm

Post by twinbee »

Many thanks for your detailed reply.

The example you gave:
123.456.*.*
...is fine for anything beginning with 123.456
But I'm looking for anything beginning with 123.456.7

So could you confirm that I would use:
123.456.7*.*
User avatar
A_Jelly_Doughnut
Former Team Member
Posts: 34459
Joined: Sat Jan 18, 2003 1:26 am
Location: Where the Rivers Run
Contact:

Post by A_Jelly_Doughnut »

Yes, 123.456.7*.* should work.

It is possible to fake a 404 error, but IMO that is really mean. I'm not sure where to put this, put probably in login.php.

Code: Select all

header( redirect: http://www.phpbb.com/phpBB/this_file_doesnt_exist.html );
A Donut's Blog
"Bach's Prelude (Cello Suite No. 1) is driving Indiana country roads in Autumn" - Ann Kish
twinbee
Registered User
Posts: 33
Joined: Mon Dec 15, 2003 11:18 pm

Post by twinbee »

A_Jelly_Doughnut wrote: Yes, 123.456.7*.* should work.

It is possible to fake a 404 error, but IMO that is really mean.

Well, obviously it depends for what purpose. How about if one's worried the spammer might go to further lengths if he knows he's been banned?
If he sees that the forum is just 'down', he might get more easily bored.
I'm not sure where to put this, put probably in login.php.

Code: Select all

header( redirect: http://www.phpbb.com/phpBB/this_file_doesnt_exist.html );

Thanks. Is there any safe way to temporarily ban myself so that I can see what they would see?
twinbee
Registered User
Posts: 33
Joined: Mon Dec 15, 2003 11:18 pm

Post by twinbee »

A_Jelly_Doughnut wrote: Yes, 123.456.7*.* should work.

It is possible to fake a 404 error, but IMO that is really mean. I'm not sure where to put this, put probably in login.php.

Code: Select all

header( redirect: http://www.phpbb.com/phpBB/this_file_doesnt_exist.html );


I tried and it doesn't work. PhpBB inexplicably puts the IP 123.28.129.197 into the ban list after me trying 123.456.7*.*

Okay, let's try 123.456.*.* now:

Ah, this time, phpBB thinks I've put 123.28.143.* .....strange, but at least it's got a star in there.

Now I'll try a more 'typical' IP:
200.200.*.*

Yes, phpBB handles this okay! I wonder why...

One more:

200.200.1*.*

No, phpBB can't handle mixing a number with a star in this way (it turned out an almost random IP of 200.200.78.127).

But that's what I need. I need to mix in the star symbol with a number, and for phpBB to stop producing pseudo-random IPs. Any ideas for a solution (I am using phpBB 2.0.3 - I presume the same thing happens on 2.0.9). (Now where is the bug-reporting section...)

By the way, I tried the alternative of using a dash to mark a range of IPs by banning (for example) 200.200.200-299.* and guess what? phpBB didn't add anything this time.
twinbee
Registered User
Posts: 33
Joined: Mon Dec 15, 2003 11:18 pm

Post by twinbee »

I surely can't be the only one who has this problem. In fact, I'm sure this happens with all phpBB boards.

Nevertheless, could someone who uses 2.0.8 or 2.0.9 see if the example IP numbers in the above post also give them problems?
twinbee
Registered User
Posts: 33
Joined: Mon Dec 15, 2003 11:18 pm

Post by twinbee »

*bump*

I've waited more than 6 hours, so I hope this is okay to do. Still awaiting a response :)
twinbee
Registered User
Posts: 33
Joined: Mon Dec 15, 2003 11:18 pm

Post by twinbee »

*bump*

I hope an administrator (or anyone!) can spare just one minute, because that's all it will take to test if this bug really exists.

Because if it's a bug, it's a fairly serious one...

Step 1:
Simply go the admin panel and click ban control.

Step 2:
Enter 123.456.*.* or 200.200.1*.* in the "Ban one or more IP addresses or hostnames" field, and click "submit".

Step 3:
Click 'Here' (to return to Ban Control), and see if PhpBB has added 123.28.143.* or something equally random. Post results back here.

Remember, you can easily unban that random IP you just added by clicking on the IP number and selecting "Un-ban one or more IP addresses".
Last edited by twinbee on Fri Jul 16, 2004 4:12 pm, edited 2 times in total.
XeoB
Registered User
Posts: 36
Joined: Fri Jun 04, 2004 2:20 am

Post by XeoB »

hey quick question when you ban someones ip from your forum what does it do or what does it say?
twinbee
Registered User
Posts: 33
Joined: Mon Dec 15, 2003 11:18 pm

Post by twinbee »

What it says depends on what's written in the languages file. Look at:
language/lang_english/lang_main.php

I quote:
You have been banned from this forum<br />Please contact the webmaster or board administrator for more information


Hmmm... do me a favour and try that 3 step test will you ;-)
twinbee
Registered User
Posts: 33
Joined: Mon Dec 15, 2003 11:18 pm

Post by twinbee »

I don't like to keep bumping, and I probably won't do it anymore. But honestly, this is a test that will take anyone literally one minute to complete. Then I'll shut up forever!

Just follow the steps in the third post above this one (look for the large, friendly blue letters) and see if you can replicate the error I described. If it is a bug, is there anywhere on this forum to report it? The thing is - it seems so simple that I can't imagine phpBB being at fault, which is why I'm wondering if it's a mistake with my server, phpBB setup or whatever.

Thanks in advance, and I appreciate the 1 minute's time of the person who responds :D

(p.s. 1 minute is probably an exaggeration. This can test can completed in 30 seconds - just try! Anyone!)
hsialin
Registered User
Posts: 18
Joined: Mon Jul 26, 2004 4:37 am

Post by hsialin »

yes i see it has a bug, it bans IP 123.28.143.* instead of the IP you actually entered.

weird isnt it.
Locked

Return to “2.0.x Support Forum”