Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: makv on May 09, 2015, 08:17:43 AM

Title: Attempt to ban IP address fails
Post by: makv on May 09, 2015, 08:17:43 AM
Trying to add a ban on a specific IP address. I get this error:

The database value you're trying to insert does not exist: ip_low5

We are at 2.0.10.
Title: Re: Attempt to ban IP address fails
Post by: makv on May 09, 2015, 08:26:44 AM
Upate. The below are in the Error logs at the time the ban was attempted:


Apply Filter: Only show the error messages of this URL
http://xxxxxxx.info/smf/index.php?action=admin;area=ban;sa=edit
8: Undefined offset: 4
File: /var/www/smf/Sources/ManageBans.php
Line: 1645

http://xxxxxxx.info/smf/index.php?action=admin;area=ban;sa=edit
8: Undefined offset: 4
File: /var/www/smf/Sources/ManageBans.php
Line: 1646


http://xxxxxxx.info/smf/index.php?action=admin;area=ban;sa=edit
The database value you're trying to insert does not exist: ip_low5
Function: checkExistingTriggerIP
File: /var/www/smf/Sources/ManageBans.php
Line: 1672


File attached.
Title: Re: Attempt to ban IP address fails
Post by: Kindred on May 09, 2015, 10:06:30 AM
what IP address are your trying to ban?

what mods do you have installed?
what version of SMF?


More importantly, why are you attempting to ban an IP address?   If it is a temp ban, then using the SMF ban system makes sense (but it would make more sense to ban by user/email).    If it is to be a permanent ban of that IP (which might actually affect real users, BTW) then you should be placing the IP in a deny list in your .htaccess file and saving your system the processing time form having to calculate the SMF ban on every page load.
Title: Re: Attempt to ban IP address fails
Post by: Shambles on May 09, 2015, 10:20:51 AM
Uninstall the "IPv6 Support" mod and see how you go on.
Title: Re: Attempt to ban IP address fails
Post by: player.samp on May 10, 2015, 03:54:14 AM
Quote from: Kindred on May 09, 2015, 10:06:30 AMwhat version of SMF?


Quote from: makv on May 09, 2015, 08:17:43 AMWe are at 2.0.10.
Title: Re: Attempt to ban IP address fails
Post by: makv on May 10, 2015, 07:24:11 AM
Quote from: Shambles on May 09, 2015, 10:20:51 AM
Uninstall the "IPv6 Support" mod and see how you go on.

Interesting, thanks. That mod was actually installed by a previous admin of the forum. What does it actually do?
Title: Re: Attempt to ban IP address fails
Post by: makv on May 10, 2015, 07:42:27 AM
Quote from: Kindred on May 09, 2015, 10:06:30 AM
what IP address are your trying to ban?

what mods do you have installed?
what version of SMF?


More importantly, why are you attempting to ban an IP address?   If it is a temp ban, then using the SMF ban system makes sense (but it would make more sense to ban by user/email).    If it is to be a permanent ban of that IP (which might actually affect real users, BTW) then you should be placing the IP in a deny list in your .htaccess file and saving your system the processing time form having to calculate the SMF ban on every page load.

The actual problem I have is that I'm getting 1,000s of messages of this nature:

Sorry, you have reached your login attempts threshold. Please wait 30 seconds and try again later.

All from the same address. These are literally subseconds apart. The IP address has previously been used by one of our users in one post, although he's a big poster to the forum. I'm concerned that there may be some kind of hacking attempt, so was trying to take the brute force approach before addressing the underlying problem, whatever that may be.

As for mods, my suspicion is that it is related to tapatalk.
Title: Re: Attempt to ban IP address fails
Post by: Shambles on May 10, 2015, 09:05:23 AM
Quote from: makv
Quote from: Shambles
Uninstall the "IPv6 Support" mod and see how you go on.

Interesting, thanks. ... What does it actually do?
Seriously?

It's right there in the modifications section.

http://custom.simplemachines.org/mods/index.php?mod=3051

That mod is the cause of a lot of your issues - check its support thread and post there for further details.
Title: Re: Attempt to ban IP address fails
Post by: makv on May 11, 2015, 04:26:19 AM
Quote from: Shambles on May 10, 2015, 09:05:23 AM
Quote from: makv
Quote from: Shambles
Uninstall the "IPv6 Support" mod and see how you go on.

Interesting, thanks. ... What does it actually do?
Seriously?

It's right there in the modifications section.

http://custom.simplemachines.org/mods/index.php?mod=3051

That mod is the cause of a lot of your issues - check its support thread and post there for further details.

Yes, seriously. The ... in my post that you deleted in your quote said "That mod was actually installed by a previous admin of the forum." Of course I have read the modifications section, but I simply don't understand the description, so I was asking for some help in understanding what it does. Seriously.
Title: Re: Attempt to ban IP address fails
Post by: Colin on May 11, 2015, 04:46:42 AM
It adds support for IPv6, but I suspect that your real question is what is IPv6. Hence, here is a bit of background on IPv6:

QuoteIPv6 is short for "Internet Protocol Version 6". IPv6 is the Internet's next-generation protocol, designed to replace the current Internet Protocol, IP Version 4.
In order to communicate over the Internet, computers and other devices must have sender and receiver addresses. These numeric addresses are known as Internet Protocol addresses. As the Internet and the number of people using it grows exponentially, so does the need for IP addresses.
IPv6 is a standard developed by the Internet Engineering Task Force, an organization that develops Internet technologies. The IETF, anticipating the need for more IP addresses, created IPv6 to accommodate the growing number of users and devices accessing the Internet.
IPv6 allows more users and devices to communicate on the Internet by using bigger numbers to create IP addresses. Under IPv4, every IP address is 32 bits long, which allows 4.3 billion unique addresses. An example IPv4 address is:
172.16.254.1
In comparison, IPv6 addresses are 128 bits, which allow for approximately three hundred and forty trillion, trillion unique IP addresses. An example IPv6 address is:
2001:db8:ffff:1:201:02ff:fe03:0405

IPv6 also relieves other networking issues that can arise due to the limited number of addresses available on IPv4. For example, IPv6 reduces the need for Network Address Translation, a service that allows multiple clients to share a single IP address, but is not always reliable.
Title: Re: Attempt to ban IP address fails
Post by: Shambles on May 11, 2015, 05:26:40 AM
Nice, Colin, but if makv doesn't know how to use Google he/she certainly won't understand any of your quote.
Title: Re: Attempt to ban IP address fails
Post by: makv on May 11, 2015, 08:38:00 AM
Thanks Colin. I do have a high-level understanding of IPv6, thanks. I guess my questions really comes down to this ... what are the consequences of removing the mod, and therefore NOT supporting the protocol on my particular forum. Does it mean that users with IPv6 addresses will not be able to access the forum?
Title: Re: Attempt to ban IP address fails
Post by: Illori on May 11, 2015, 08:41:05 AM
they can access without the mod, just their ip address will not show up correctly in posts and you can not ban such a user by ip address.
Title: Re: Attempt to ban IP address fails
Post by: gnif on January 10, 2019, 01:15:01 AM
I realise this is a necro post, but since google turns up this thread for this problem I figured it's worth posting the solution.

There is bug in 'Sources/Subs.php' on lines 3726-3729 where:


  $ip_array[5] = array('low' => 0, 'high' => 0);
  $ip_array[6] = array('low' => 0, 'high' => 0);
  $ip_array[7] = array('low' => 0, 'high' => 0);
  $ip_array[8] = array('low' => 0, 'high' => 0);


Should be:


  $ip_array[4] = array('low' => 0, 'high' => 0);
  $ip_array[5] = array('low' => 0, 'high' => 0);
  $ip_array[6] = array('low' => 0, 'high' => 0);
  $ip_array[7] = array('low' => 0, 'high' => 0);