Uutiset:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu
Advertisement:

Ban IP "0.0.0.0"

Aloittaja Mark Thomas, syyskuu 07, 2006, 07:32:21 AP

« edellinen - seuraava »

Mark Thomas

We're getting folks trying to register with an IP of 0.0.0.0, most of these seem to be bottom feeders, i.e. spammers. When I setup a ban trigger on said IP it doesn't register and I see "(No ban triggers)" under "Banned entity". I tried sever wildcard versions but all come back as "invalid IP range".

If you look at "Who's online" you might see the following;
Guest  (0.0.0.0)     08:17:47 am     Viewing the board .....

If they register and you look at "Awaiting Approval" you see no IP what so ever.

LainaaPowered by SMF 1.1 RC2 | TinyPortal v0.8.6 © Bloc

thanks

Harzem

A quick and dirty fix can be opening QueryString.php, finding that:


if (preg_match('~^((([1]?\d)?\d|2[0-4]\d|25[0-5])\.){3}(([1]?\d)?\d|2[0-4]\d|25[0-5])$~', $_SERVER['REMOTE_ADDR']) === 0)
$_SERVER['REMOTE_ADDR'] = '';


Adding this after it:


if($_SERVER['REMOTE_ADDR'] == '' || $_SERVER['REMOTE_ADDR'] == '0.0.0.0')
fatal_error('Invalid IP address.',true);


So they will get a fatal error.

These errors are also logged in your error log, so you can see whether it is working or not.

Mark Thomas


Skipdawg

Very good!  ;D

Awesome question and answer  ;)
Skipdawg's Community

Powered by SMF 1.1.3

Advertisement: