Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: SleePy on June 29, 2011, 03:25:36 PM

Title: IPv6 support
Post by: SleePy on June 29, 2011, 03:25:36 PM
Link to Mod (https://custom.simplemachines.org/mods/index.php?mod=3051)

IPv6 support for SMF 2.0+ Only.

SMF 2.1 Upgrades are not compatible with this and will cause all the IPv6s to be loss during the upgrade.

This customization will add support for the IPv6 enabled clients in SMF 2.0.  Specifically posts, ip tracking and ban management have been changed.  Member search from the admin panel does support this by default.

Due to the size and necessity of the changes, please do not continue with installation if any change should fail the test.  This may lead to unexpected results or a unusable forum.

Note: During uninstallation, all IPv6 enabled bans will be disabled.  This customization makes attempts to track those changes in columns it adds to the ban_items table.  If you remove the database changes, this tracking will be lost.  In addition upon reinstallation this customization makes attempts to re-enable those bans that should still be active.

Note: Currently you are unable to link via iurl/url or auto linking ipv6 urls.  This is due to the square brackets that ipv6 addresses are enclosed in.  However this doesn't affect domains.

Thanks to Ray Soucy (http://www.soucy.org)'s for his IPv6 functions he wrote and allowing usage of them in this customization.

This mod is open source at GitHub (https://github.com/jdarwood007/smfmod_ipv6)!.  See the source code, fork the project, suggest improvements and download old versions.
Title: Re: IPv6 support
Post by: butchs on July 30, 2011, 07:10:59 PM
Nice mod.  I look forward to trying this mod.

One question:  How would another mod be able to check when ipv6 is being handled by the mod? Would it be noticeable somewhere?
Title: Re: IPv6 support
Post by: SleePy on July 30, 2011, 10:24:49 PM
Is there any mod that explicitly handles IPs in a non normal way?  Unlike ban management, most other IP storing should be in a proper sized data set. Other than that, you could do a ipv6 regex check.  For simple checks you could just test to see if : exists in the ip address.   SMF does validate that the IP address is a valid IPv4 and this mod validates a IPv6 address.
Title: Re: IPv6 support
Post by: Stevenn on August 27, 2011, 03:34:31 PM
8.   Add Before   ./Sources/QueryString.php   Test failed

Help? I really need IPv6 for my site (:
Title: Re: IPv6 support
Post by: SleePy on August 30, 2011, 05:18:17 PM
Hello,
Do you have any other mods installed?

If you click on the arrow on the left, see which one of the edits on that file is failing, then click the edit icon.  That should give me information about what code it can't find.
Title: Re: IPv6 support
Post by: yellowgoat on September 01, 2011, 09:26:25 PM
Hello,
Do you have any other mods installed?

If you click on the arrow on the left, see which one of the edits on that file is failing, then click the edit icon.  That should give me information about what code it can't find.

Had the same issue.  It couldn't find
Code: [Select]
?>
on the final modification of  ./Sources/QueryString.php which inserted the functions.  Perfectly clean install.  This was the first mod I attempted to add.
Title: Re: IPv6 support
Post by: Fisch.666 on December 14, 2011, 10:54:02 AM
Hi!

I've installed this mod on my smf 2.0.1 / portamx 1.4.5 without an error in the package manager ang got this SQL Error:

Quote
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'BETWEEN bi.ip_low2 AND bi.ip_high2)
AND ( BETWEEN bi.ip_low3 AND bi.ip_hi' at line 7
File: /Sources/Security.php
Line: 344

After revert the Security.php back my page works again. Any ideas how i can fix this?

Thanks in advance for a reply.

*Edit*

Ah, and there is a small typo in the install file for the Security.php. This:

Code: [Select]
<?php

is replaced by this:

Code: [Select]
c<?php

which makes no sense.
Title: Re: IPv6 support
Post by: SleePy on December 17, 2011, 12:25:21 PM
I don't know how that c before <?php would of gotten there.  I make no such edit in the mod.  However removing it I don't think will fix the issue.  Looks like a query has gone wrong in that file.  Do you have that file before you reverted it?
Title: Re: IPv6 support
Post by: Fisch.666 on December 19, 2011, 09:53:52 AM
Hi!

Thanks for your reply. I've attached the file before the revert, but i think this should be correct.

The c before the <?php seems to be a typo in the install file. If you parse the mod on:

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

for 2.0 and 2.0.1 you get this edit in for the Security.php
Title: Re: IPv6 support
Post by: SleePy on December 24, 2011, 02:25:23 PM
I repackaged the mod and reuploaded it.  See if that provides any better luck.  I can't find that stray c in my repository anywhere. https://github.com/jdarwood007/smfmod_ipv6
Title: Re: IPv6 support
Post by: eric1234 on January 14, 2012, 03:23:13 PM
Installed. So how can i know that my site is supported with ipv6? Is there any sign that tell my forum is supported ipv6 so that i can convince my members? :)
Title: Re: IPv6 support
Post by: SleePy on January 15, 2012, 12:58:29 PM
You would have to ask your host if the server you are on is IPv6 enabled and then you would need to add a AAAA to your dns for that IPv6 address.  If you maintain your DNS records with your host, they would be able to do that if the box you are on is IPv6 capable.
If you have a VPS or dedicated server, you could setup a tunnel if your host doesn't support IPv6 yet. tunnelbroker.net is what I use to tunnel to IPv6 from my home connection since my ISP doesn't support IPv6 yet.  I've got that configured on my router so all my network computers can use IPv6.  The process is the same for setting it up on your VPS/dedicated.  Just need to configure it on the server instead.  Your OS/distro and network setup will depend on how you modify the network configurations to set that up.

This mod only makes it so SMF knows how to understand and handle IPv6 addresses.  It can't change what isn't enabled/setup on the server and DNS itself.
Title: Re: IPv6 support
Post by: eric1234 on January 16, 2012, 03:27:33 PM
You would have to ask your host if the server you are on is IPv6 enabled and then you would need to add a AAAA to your dns for that IPv6 address.  If you maintain your DNS records with your host, they would be able to do that if the box you are on is IPv6 capable.
If you have a VPS or dedicated server, you could setup a tunnel if your host doesn't support IPv6 yet. tunnelbroker.net is what I use to tunnel to IPv6 from my home connection since my ISP doesn't support IPv6 yet.  I've got that configured on my router so all my network computers can use IPv6.  The process is the same for setting it up on your VPS/dedicated.  Just need to configure it on the server instead.  Your OS/distro and network setup will depend on how you modify the network configurations to set that up.

This mod only makes it so SMF knows how to understand and handle IPv6 addresses.  It can't change what isn't enabled/setup on the server and DNS itself.
I see. I will confirm with my host. So if my host's server is not ready for ipv6, then what we shall do?
Title: Re: IPv6 support
Post by: SleePy on January 16, 2012, 04:01:26 PM
You won't be able to make use of the feature this mod adds.

As I said though, if you have a VPS or dedicated server, you can setup a IPv6 tunnel between your server and your IPv6 broker.
Title: Re: IPv6 support
Post by: gamerzworld on February 09, 2012, 09:30:52 PM
Getting a "The database value you're trying to insert does not exist: ip_low5" when trying to add a regular IPv4 ban and IPv6 bans do not show an IP address in the trigger list when added. Looking at the database, all bans have a value of 1 for is_ipv6 and even IPv6 bans have just a single 0 for each IPv6 address set. Also, the uninstaller for the database just gives me an error of "Database error, given array of integer values is empty. (bans)". I'm running SMF 2.0.2.
Title: Re: IPv6 support
Post by: SleePy on February 15, 2012, 02:19:02 PM
Hmm, looks like the ip2range function is causing this.

Open Subs.php and find:
Code: [Select]

return $ip_array;
}

// Lookup an IP; try shell_exec first because we can do a timeout on it.
function host_from_ip($ip)

Is there this code before that?:

Code: [Select]

// Makes it simpiler to work with.
$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);
Title: Re: IPv6 support
Post by: supersasho on June 19, 2012, 09:35:06 AM
Hi, i've got a similar problem like user Fish.666. When i try to install this mod there's an error with ./Sources/QueryString.php. Any ideas?

Code: [Select]
Code: (Find) [Select]

?>
Code: [Select]
Code: (Add Before) [Select]
// Working with them as if they where IPv4 numbers, makes it SMF compatible.
function smf_ipv6_to_ints($ip)
{
   // Expand the IP out.
   $ip = explode(':', smf_ipv6_expand($ip));

   $new_ip = array();
   foreach ($ip as $int)
      $new_ip[] = hexdec($int);

   return implode($new_ip, '-');
}


/**
 * IPv6 Address Functions for PHP
 *
 * Functions to manipulate IPv6 addresses for PHP
 *
 * Copyright (C) 2009 Ray Patrick Soucy
 *
 * LICENSE:
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 * @package   inet6
 * @author    Ray Soucy <rps@soucy.org>
 * @version   1.0.1
 * @copyright 2009 Ray Patrick Soucy
 * @link      http://www.soucy.org/
 * @license   GNU General Public License version 3 or later
 * @since     File available since Release 1.0.1
 */
function smf_ipv6_expand($addr, $strict_check = true)
{
   /* Check if there are segments missing, insert if necessary */
   if (strpos($addr, '::') !== false)
   {
      $part = explode('::', $addr);
      $part[0] = explode(':', $part[0]);
      $part[1] = explode(':', $part[1]);
      $missing = array();
      for ($i = 0; $i < (8 - (count($part[0]) + count($part[1]))); $i++)
         array_push($missing, '0000');
      $missing = array_merge($part[0], $missing);
      $part = array_merge($missing, $part[1]);
   }
   else
      $part = explode(":", $addr);

   /* Pad each segment until it has 4 digits */
   foreach ($part as &$p)
      while (strlen($p) < 4)
         $p = '0' . $p;

   unset($p);

    /* Join segments */
   $result = implode(':', $part);

   /* Quick check to make sure the length is as expected */
   if (!$strict_check || strlen($result) == 39)
      return $result;
   else
      return false;
}
Title: Re: IPv6 support
Post by: SleePy on June 23, 2012, 02:57:34 PM
I've updated that mod.  Its possibly a bug with how it was searching for the end of that file.  I've changed it to use the appropriate method.
Title: Re: IPv6 support
Post by: BaghdadGhost on June 27, 2012, 08:49:17 PM
Hi Sleepy,

forgive me for the question.

you stated that this mod changes the way ban members. so does it makes it better for admins?

I am not a pro in technology, but as far as I understand a lot of my members are from countries where they use internet providers with IPv6 and when I ban someone by IP usually effect other members. unlike here in the states where each one has a unique ip address.

will this mod help me controlling those members better in term of ban?

I have to ask my host first about the requirements you mentioned in one of your replies.

thanks in advance.

 
Title: Re: IPv6 support
Post by: BaghdadGhost on June 27, 2012, 08:58:59 PM
oh forgot one thing

does this mod have anything to do with this site


http://ipv6-test.com/validate.php

Title: Re: IPv6 support
Post by: Arantor on June 27, 2012, 09:09:12 PM
Quote
you stated that this mod changes the way ban members. so does it makes it better for admins?

Sort of.

You know the IP addresses like 127.0.0.1? That's called IPv4 and the available space in IPv4 is running out.

Now, a long time ago, some engineers figured out a replacement, IPv6. SMF itself has no support for IPv6, and users who use IPv6 will be identified as having IP 0.0.0.0 without this mod. With the mod their IP is correctly registered and you will actually be able to ban them.

Assuming you want to, of course, since banning is notoriously unreliable.
Title: Re: IPv6 support
Post by: SleePy on July 08, 2012, 02:18:21 AM
BaghdadGhost,

I feel that you don't grasp a understanding of what IPv6 is and its purpose.  I will suggest reading up on what IPv6 is and if your server supports it.  More than likely a shared hosting provider at this point is not providing IPv6 capabilities yet, so a VPS/Dedi would be needed and either a tunnel or native support from the host is needed.  That is just to setup the server.  If you want to use IPv6 you will either need a tunnel or your ISP to support it.

My VPS hosting provider (Linode.com [Referral link] (http://www.linode.com/?r=4d4608b7572fa6d4817e0d23e05ba50ab74f3e85)) supports this on their VPSes and I use a tunnel to get IPv6 to my home network (IPv6 tunnel is setup on my router enabling all my devices on my network to have IPv6 support).

Title: Re: IPv6 support
Post by: liuxyon on October 05, 2012, 10:42:34 AM
I am using ipv6 network for login SMF2.0.2.

SMF2.0.2 mysal database ip data type still not support ipv6 . So I have to Manually modify mysql data.
Title: Re: IPv6 support
Post by: AllMassive on January 24, 2013, 04:26:16 PM
Thank you very much for this mod - everything works fine, but using /who still shows 0.0.0.0 as IP.
Title: Re: IPv6 support
Post by: AllMassive on January 28, 2013, 03:32:38 PM
I've found these Errors in my Log:

Code: [Select]
Filter hinzufügen: Nur Fehlermeldungen dieser URL anzeigen
http://site.com/index.php?pretty;action=admin&amp;area=packages;sa=install2;package=ipv6_v1.0.1.zip;pid=0
Filter hinzufügen: Nur Fehlermeldungen mit der gleichen Nachricht anzeigen
2: mysql_fetch_assoc(): 732 is not a valid MySQL result resource
Filter hinzufügen: Nur Fehler von dieser Datei zeigen
Datei: /web/Packages/temp/ipv6_v1.0.1/database_install.php
Zeile: 64

and

Code: [Select]
Filter hinzufügen: Nur Fehlermeldungen dieser URL anzeigen
http://site.com/index.php?pretty;action=admin&amp;area=packages;sa=install2;package=ipv6_v1.0.1.zip;pid=0
Filter hinzufügen: Nur Fehlermeldungen mit der gleichen Nachricht anzeigen
2: Missing argument 3 for smf_db_change_column(), called in /web/Packages/temp/ipv6_v1.0.1/database_install.php on line 49 and defined
Filter hinzufügen: Nur Fehler von dieser Datei zeigen
Datei: /web/Sources/DbPackages-mysql.php
Zeile: 285

Title: Re: IPv6 support
Post by: EricTheRed on March 30, 2013, 05:42:30 PM
First off, great job with this mod!!! I was very surprised to see that SMF was offering at least some v6 support. I was actually going to purchase XenForo for a project I was working on, but seeing that they're not proactively working towards support v6, I ended up going with SMF.

I noticed a few issues with it though:

Thank you very much for this mod - everything works fine, but using /who still shows 0.0.0.0 as IP.
I'm experiencing the same behavior.

-In the Administration/Moderation log, only the first 4 hexadecimets of the v6 address shows up. I'm not sure if this is a bug or by design under the assumption that a user's range of defined IPs are by a /64 prefix.

-If I track a user by IP Address, the full v6 address shows up (yay!). However, the regional server lookup does not work by associating the IP with a regional numbers group like it does with IPv4.

-Banning a user IP IPv6 address does not seem to work. If I specify an address, a prefix or a wildcard, the ban is created, but with no IP. What is the appropriate format for entering v6 address bans?
ex:
2600:3c00:0:0:f03c:91ff:fe93:9f25
2600:3c00::f03c:91ff:fe93:9f25
2600:3c00::/64
2600:3c00::f03c*

I ended up finding this. http://dev.simplemachines.org/mantis/view.php?id=4593 So I guess that means that native v6 support will appear in 2.1. Will these issues be addressed in 2.1 and when is the expected release for it?

Following this topic for updates...

Thanks!!!
Title: Re: IPv6 support
Post by: Arantor on March 30, 2013, 05:52:10 PM
Quote
Will these issues be addressed in 2.1 and when is the expected release for it?

My understanding is that what's in 2.1 is not drastically different from this mod - given that it was the mod's author who added it to the original SMF repository back in 2011. You could always try SMF 2.1 from the Github repository.

As for expected release, when it's done. 2.1 has yet to even get to beta, so realistically the turn of the year at the earliest.

/me is just reminded of the debugging he needs to do for IPv6 on his setup, though was not implemented with this mod
Title: Re: IPv6 support
Post by: EricTheRed on March 30, 2013, 05:55:35 PM
Thanks for the speedy speed racer of feedback, wow.

I'm a v6 engineer by trade. If you guys need a little QA on that end, let me know and I'll be glad to help :)
Title: Re: IPv6 support
Post by: SleePy on April 07, 2013, 04:45:02 PM
I'm experiencing the same behavior.
Sounds like a bug then

Quote
-In the Administration/Moderation log, only the first 4 hexadecimets of the v6 address shows up. I'm not sure if this is a bug or by design under the assumption that a user's range of defined IPs are by a /64 prefix.
Would be a bug

Quote
-If I track a user by IP Address, the full v6 address shows up (yay!). However, the regional server lookup does not work by associating the IP with a regional numbers group like it does with IPv4.
I didn't even want to touch this, whois for ipv6 would get complicated.  The basics of what I read at the time (a few years ago) allows for the full ip (no just host bit) to be anywhere else on the world. IE ::2 could be in the US and ::3 could be in Japan.  Doing host tracking at least gets you to the right people but thats a big chunk of numbers.  Its hard to say what to do at this point.  SMF tracks these ranges manually in its code, I suppose a whois be possibly to try and figure out who the ip is registered to.

Quote
-Banning a user IP IPv6 address does not seem to work. If I specify an address, a prefix or a wildcard, the ban is created, but with no IP. What is the appropriate format for entering v6 address bans?
ex:
2600:3c00:0:0:f03c:91ff:fe93:9f25
2600:3c00::f03c:91ff:fe93:9f25
2600:3c00::/64
2600:3c00::f03c*
I didn't think about coding CIDRs, I don't think SMF even supported them in bans, so thats why I most likely didn't think about it.  Although I thought I handled wildcards.  Basically a wildcard is just taking the * and replacing it with a range.  For IPv6 that would be 0000 to FFFF (In dec of course as it makes it faster and easier to compare in php).


I will try to see if I can fix this, not sure about my time/interest in updating it.
Title: Re: IPv6 support
Post by: Arantor on April 07, 2013, 04:47:31 PM
Quote
I don't think SMF even supported them in bans,

It doesn't. SMF handles it as wildcarding by octet. There is precisely no support in the core for handling CIDRs anyway.

Quote
Its hard to say what to do at this point.

No, I haven't seen a valid solution for that either :/
Title: Re: IPv6 support
Post by: SleePy on April 07, 2013, 04:55:23 PM
Thats what I thought, I haven't coded much SMF in a while but I still remember the little things.

There may be a solution to the region detection.  Just like I hope to see a solution for mysql_* to pdo bridge (supporting mysql_* native functions while using pdo).
Title: Re: IPv6 support
Post by: EricTheRed on April 07, 2013, 08:02:17 PM
-Banning a user IP IPv6 address does not seem to work. If I specify an address, a prefix or a wildcard, the ban is created, but with no IP. What is the appropriate format for entering v6 address bans?
ex:
2600:3c00:0:0:f03c:91ff:fe93:9f25
2600:3c00::f03c:91ff:fe93:9f25
2600:3c00::/64
2600:3c00::f03c*
I didn't think about coding CIDRs, I don't think SMF even supported them in bans, so thats why I most likely didn't think about it.  Although I thought I handled wildcards.  Basically a wildcard is just taking the * and replacing it with a range.  For IPv6 that would be 0000 to FFFF (In dec of course as it makes it faster and easier to compare in php).


I will try to see if I can fix this, not sure about my time/interest in updating it.

Just so you're aware, most ISPs will assign a /64 prefix to a residential connection. This is due to IP address assignments getting addresses via Prefix Delegation/Auto Configuration instead of DHCPv6.  Banning a single IPv6 address does relatively no good because that leaves a few trillion other IP addresses at the household's disposal. Banning a prefix is the only way to block an entire household/static address assignment.
Title: Re: IPv6 support
Post by: Woet on December 15, 2013, 04:59:47 PM
Hmm, looks like the ip2range function is causing this.

I have the same problem when banning IPv4:
"The database value you're trying to insert does not exist: ip_low5"

The quote you mentioned exists in my Subs.php and I have a column called ip_low5 in forums_ban_items.
Also, when banning an IPv6 address, it either turns blank or changes it with lots of ff:ff:ff in front for no reason.
Title: Re: IPv6 support
Post by: AllMassive on August 24, 2014, 04:29:15 PM
Would someone pls be so kind and look into this '/who'-Bug ?

:*(

(and the others ofc also)
Title: Re: IPv6 support
Post by: Mr. Jinx on September 30, 2014, 02:33:22 PM
Anyone successfully installed this mod on SMF 2.0.8?
My forum is getting more and more IPv6 traffic lately and I would like to get some control over it.
Title: Re: IPv6 support
Post by: Mr. Jinx on October 03, 2014, 09:10:50 AM
Ok, installed this mod on SMF 2.0.8 and here are my results:

To fix the Who is online list:
(requires MySQL 5.6.3 or higher)

Database changes:
In smf_log_online change column "ip" to VARBINARY(16)
This is needed to hold the numeric value of an IPv6 address using 'inet6_aton'.

Source changes:
Open Sources/Subs.php
Find:
Code: [Select]
SET log_time = {int:log_time}, ip = IFNULL(INET_ATON({string:ip}), 0), url = {string:url}Replace with:
Code: [Select]
SET log_time = {int:log_time}, ip = IFNULL(INET6_ATON({string:ip}), 0), url = {string:url}
Find:
Code: [Select]
array($session_id, $user_info['id'], empty($_SESSION['id_robot']) ? 0 : $_SESSION['id_robot'], time(), 'IFNULL(INET_ATON(\'' . $user_info['ip'] . '\'), 0)', $serialized),Replace with:
Code: [Select]
array($session_id, $user_info['id'], empty($_SESSION['id_robot']) ? 0 : $_SESSION['id_robot'], time(), 'IFNULL(INET6_ATON(\'' . $user_info['ip'] . '\'), 0)', $serialized),
Open Sources/Who.php
Find:
Code: [Select]
lo.log_time, lo.id_member, lo.url, INET_NTOA(lo.ip) AS ip, mem.real_name,Replace with:
Code: [Select]
lo.log_time, lo.id_member, lo.url, INET6_NTOA(lo.ip) AS ip, mem.real_name,
A small warning though, I haven't tested this fully. Although this change should only affect the online users list it may break other parts.
Title: Re: IPv6 support
Post by: live627 on October 04, 2014, 08:31:37 PM
That requires MySQL5.6.3...
Title: Re: IPv6 support
Post by: Mr. Jinx on October 06, 2014, 02:58:44 AM
That is right, added a note.
Anyway, there are too many other problems with this mod.
I guess it is not very important for most of us or there is no interest.

Ah well, 2.1 should have this build in.
Title: Re: IPv6 support
Post by: SleePy on November 01, 2014, 11:01:23 AM
I no longer have a IPv6 connection and thus I haven't been able to develop it any further this at this time.  I'm hoping to get a Hurricane Electric Tunnel going so I can do this again.  I've had bad luck getting my dd-wrt router to attach the tunnel though.  I used to have a Apple router and that just worked great.

Your error with ip_low5 means that the database edits it does didn't fix it.  The mod works in a way it converts the hexadecimal to decimal and places each section into the 8 chunks required for IPv6.  This is done because it makes banning more efficient by allowing us to utilize the native number comparison features in SQL engines or PHP, while comparing hex to find if a hex value is between one or another isn't as straight forward.  This was also done as mentioned for MySQL requirements.
Title: Re: IPv6 support
Post by: Mr. Jinx on November 01, 2014, 01:41:09 PM
I really hope you get the HE tunnel working. I've been using HE for many years with great results.
You could also setup a tunnel from your client if it doesn't work with your router. They provide easy scripts for at least Windows. Apple I don't know.
Right now my internet provider (running over fiber) gives me native IPv6.
Title: Re: IPv6 support
Post by: OSSGeek on December 30, 2014, 03:09:25 AM
I installed the mod on SMF 2.0.8 without any issues but get this error in logs:

Code: [Select]
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'BETWEEN bi.ip_low2 AND bi.ip_high2)
AND ( BETWEEN bi.ip_low3 AND bi.ip_hi' at line 7
File:  Security.php
Line: 343

MySQL version: 5.1.37

Any ideas?
Title: Re: IPv6 support
Post by: Mr. Jinx on December 30, 2014, 11:55:45 AM
This mod is broken. Tried to fix some things (check http://www.simplemachines.org/community/index.php?topic=440357.msg3750120#msg3750120) , but there is too much to be done.
Title: Re: IPv6 support
Post by: OSSGeek on December 31, 2014, 01:44:26 AM
How can I uninstall it? I have Backup of my "Sources" folder. I need to rollback the DB changes to what was before installing this MOD...
Title: Re: IPv6 support
Post by: musicus on March 27, 2015, 07:46:48 PM
can not install that mod, if I install, this Error comes

Quote
Package upload failed due to the following error:
"Although the package was downloaded to the server it appears to be empty. Please check the Packages directory, and the "temp" sub-directory are both writable. If you continue to experience this problem you should try extracting the package on your PC and uploading the extracted files into a subdirectory in your Packages directory and try again. For example, if the package was called shout.tar.gz you should:
1) Download the package to your local PC and extract it into files.
2) Using an FTP client create a new directory in your "Packages" folder, in this example you may call it "shout".
3) Upload all the files from the extracted package to this directory.
4) Go back to the package manager browse page and the package will be automatically found by SMF."


When I decompress this in packages, nothing happens :(

in the package I found only this file, see attachment
Title: Re: IPv6 support
Post by: Deprecated on February 28, 2016, 12:56:25 AM
I just love Arantor's comment about "by the end of the year." Noting he didn't say which year! LOL!

Like it or not we are going to be dragged into the IPV6 world kicking and screaming. It would behoove the SMF developers to consider this in the SMF 2.1 design.

I am getting more and more IPV6 traffic and it just fails, fails, fails on 2.0.11. I can't even view IP addresses of posts as admin. It blew me away when I discovered one of my members is using an IPV6 address, and his IPV4 address (like in the smf_messages table) just shows up as blank, empty.

I thought I had my forum config messed up until I traced it to the real source of the problem IPV6.
Title: Re: IPv6 support
Post by: Deprecated on February 28, 2016, 10:46:49 AM
Does anybody know about the status of making SMF 2.1 fully IPV6 capable?

This problem is getting steadily worse, with some features in SMF not working because of the IPV6 addresses.

And yet worse, 2.1 is not likely to be released before the end of the year. Note I didn't say which year! :D
Title: Re: IPv6 support
Post by: SleePy on February 28, 2016, 11:06:26 AM
It is being worked on.  This mod was built in mind to keep existing ipv4 setup in SMF working properly and the ability to uninstall it and still have things working, so I didn't expand things too much.  2.1 is/has expanded it and working on making it working fully.  You can check out SMF 2.1's development progress if you want to know more: https://github.com/simplemachines/SMF2.1
Title: Re: IPv6 support
Post by: live627 on February 28, 2016, 06:08:37 PM
Quote
Does anybody know about the status of making SMF 2.1 fully IPV6 capable?
Our goal is to support it fully.
Title: Re: IPv6 support
Post by: Deprecated on February 28, 2016, 06:34:11 PM
That's good to know. I don't want to follow the progress because it begs the question, "When will 2.1 stable be ready?" And I been around long enough you don't ask that question. Not without annoying developers, who are better left to develop code than swat away the pesky questions like this one.

Anyway I know the answer. It will be done when it will be done and not a minute sooner. And we'll receive announcements when it's done anyway. I don't have anything to offer the developers except to leave them alone, and I'm doing my best I can.

I think I'll pass on the mod at the present time because the caveats are more than I'm willing to accept. I'm currently building a production forum I expect to grow big, and I want to keep the code base clean and stable.

BTW I have run a few non-production 2.1 forums (2- or 3-man forums to coordinate jobs, etc.) and 2.1 looks really fine! I'll adopt it as soon as there's a production rated release, and I have upgraded my mods for the new forum if any upgrades are required.

At least we know one thing: one day it will be released. All we can do is patiently wait for that day.
Title: Re: IPv6 support
Post by: Superion on December 17, 2016, 03:55:54 PM
Hi.
I'm trying to use your mod in order to fix an error I'm getting, probably due to IPv6. I modified the files listed according to the instructions, however, database_install.php gives me a HTML 500 error. In the error log:
Code: [Select]
PHP Fatal error:  Uncaught Error: Function name must be a string in [path]/database_install.php:40\nStack trace:\n#0 {main}\n  thrown in [path]/database_install.php on line 40Any idea what's wrong?
Also, isn't there a ?> missing from the file's end?
Title: Re: IPv6 support
Post by: Superion on December 17, 2016, 05:36:52 PM
Seeing how I can't modify my previous post anymore, pardon me for the second post in a row. I am silly and just noticed that the aforementioned error has a "partner" before it. So the full error message reads

Code: [Select]
PHP Notice:  Undefined index: db_list_columns in [path]/database_install.php on line 40
PHP Fatal error:  Uncaught Error: Function name must be a string in [path]/database_install.php:40\nStack trace:\n#0 {main}\n  thrown in [path]/database_install.php on line 40

(Provided that a moderator comes by, would it be possible to merge this post with my previous? Thoinks in advance!)
Title: Re: IPv6 support
Post by: SleePy on December 19, 2016, 07:01:58 PM
This modification requires SMF 2.0.  It doesn't support 1.1
Title: Re: IPv6 support
Post by: Superion on December 19, 2016, 07:24:06 PM
I'm using 2.0.12.
Title: Re: IPv6 support
Post by: SleePy on December 19, 2016, 11:22:36 PM
It should work then.  You can extract the database_install.php upload this to the root of your SMF installation and run that manually.
Title: Re: IPv6 support
Post by: Superion on December 20, 2016, 12:59:46 PM
I extracted it, uploaded it, and every time I try to run it the browser gives "HTTP ERROR 500", and the error.log has the aforementioned entries in it. One per reload.

These:
Code: [Select]
PHP Notice:  Undefined index: db_list_columns in [path]/database_install.php on line 40
PHP Fatal error:  Uncaught Error: Function name must be a string in [path]/database_install.php:40\nStack trace:\n#0 {main}\n  thrown in [path]/database_install.php on line 40
Title: Re: IPv6 support
Post by: SleePy on December 20, 2016, 09:08:34 PM
Open database_install.php and find:
Code: [Select]
// Fields to add

Add before:
Code: [Select]
db_extend('packages');

See if that fixes this.
Title: Re: IPv6 support
Post by: Superion on December 20, 2016, 10:06:35 PM
Now it ran seemingly properly, giving me
Code: [Select]
If no errors, Success!afterwards. However, looking in the error.log I found these:
Code: [Select]
[Wed Dec 21 03:07:10.718680 2016] (..) PHP Warning:  Missing argument 3 for smf_db_change_column(), called in [path]/database_install.php on line 50 and defined in [path]/Sources/DbPackages-mysql.php on line 285
[Wed Dec 21 03:07:10.719168 2016] (..) PHP Warning:  Missing argument 3 for smf_db_change_column(), called in [path]/database_install.php on line 50 and defined in [path]/Sources/DbPackages-mysql.php on line 285
[Wed Dec 21 03:07:10.719516 2016] (..) PHP Warning:  Missing argument 3 for smf_db_change_column(), called in [path]/database_install.php on line 50 and defined in [path]/Sources/DbPackages-mysql.php on line 285
[Wed Dec 21 03:07:10.719849 2016] (..) PHP Warning:  Missing argument 3 for smf_db_change_column(), called in [path]/database_install.php on line 50 and defined in [path]/Sources/DbPackages-mysql.php on line 285
[Wed Dec 21 03:07:10.720175 2016] (..) PHP Warning:  Missing argument 3 for smf_db_change_column(), called in [path]/database_install.php on line 50 and defined in [path]/Sources/DbPackages-mysql.php on line 285
[Wed Dec 21 03:07:10.720498 2016] (..) PHP Warning:  Missing argument 3 for smf_db_change_column(), called in [path]/database_install.php on line 50 and defined in [path]/Sources/DbPackages-mysql.php on line 285
[Wed Dec 21 03:07:10.720818 2016] (..) PHP Warning:  Missing argument 3 for smf_db_change_column(), called in [path]/database_install.php on line 50 and defined in [path]/Sources/DbPackages-mysql.php on line 285
[Wed Dec 21 03:07:10.721146 2016] (..) PHP Warning:  Missing argument 3 for smf_db_change_column(), called in [path]/database_install.php on line 50 and defined in [path]/Sources/DbPackages-mysql.php on line 285
[Wed Dec 21 03:07:10.721557 2016] (..) PHP Notice:  Undefined variable: request in [path]/database_install.php on line 65
[Wed Dec 21 03:07:10.721581 2016] (..) PHP Warning:  mysql_fetch_assoc() expects parameter 1 to be resource, null given in [path]/database_install.php on line 65
Title: Re: IPv6 support
Post by: landyvlad on February 01, 2017, 06:28:04 AM
I'm confused. Mod is in a .gz format rather than zip.
Package manager (SMF2.0.13) states that .gz is not supported ?!

Is there an automated way to install?
Title: Re: IPv6 support
Post by: Kindred on February 01, 2017, 09:34:59 AM
rename the extension to .tar.gz

it then works just fine
Title: Re: IPv6 support
Post by: SugarD-x on July 23, 2017, 02:20:08 PM
rename the extension to .tar.gz

it then works just fine

Sorry for the bump, but this user brings up a good point. This needs to be fixed on the SMF downloads section too. The file downloads corrupted otherwise. Many unknowing users are going to get confused by this.
Title: Re: IPv6 support
Post by: vivien on August 20, 2017, 02:55:28 AM
Is this mod compatible with SMF 2.0.14 and PHP 7?

https://custom.simplemachines.org/mods/index.php?mod=3051 say compatible with SMF 2.0 and SMF 2.0.2
Title: Re: IPv6 support
Post by: d3vcho(); on August 20, 2017, 04:40:02 AM
Yes, it should be compatible with 2.0.14 as well. You'd need to emulate your forum's version to install it; How can I install a mod that doesn't work in my SMF version? (https://wiki.simplemachines.org/smf/How_can_I_install_a_mod_that_doesn%27t_work_in_my_SMF_version)
Title: Re: IPv6 support
Post by: SleePy on August 20, 2017, 02:21:23 PM
It should be noted this mod is not compatible with SMF 2.1's IPv6 support and all IPv6s will be lost during the upgrade.
Title: Re: IPv6 support
Post by: MPHV on February 16, 2018, 04:07:36 PM
The banning does not seem to work correctly. I saw other people also had this problem
When I add a new IPv4 ban I get the error: "The database value you're trying to insert does not exist: ip_low5"

Did someone manage to fix this?
Also existing IPv4 ban triggers are not shown in the ban trigger list.
They do seem to work, however i can't manage them.

Has anyone solved this?
Title: Re: IPv6 support
Post by: vivien on March 31, 2018, 11:24:40 AM
This is problematic because some hosts no longer offer an option to disable IPv6.

I think that like for PHP 7, it should ensure compatibility for SMF 2.0 without waiting for SMF 2.1.
Title: Re: IPv6 support
Post by: butchs on June 10, 2018, 09:52:12 AM
I block ipv6 with Forum Firewall and bad Behavior which both support ipv6 internally.
Title: Re: IPv6 support
Post by: Fisch.666 on July 28, 2018, 07:40:43 AM
Is this mod compatible with SMF 2.0.14 and PHP 7?

I have it installed now on a SMF 2.0.15 running PHP 7.0.x and it seems its working for me (havn't tested it fully).

The only thing i have seen is that the following two errors are logged within the SMF Error Log during the  installation (posted previously in https://www.simplemachines.org/community/index.php?topic=440357.msg3904446#msg3904446):

Quote
2: mysqli_fetch_assoc(): Couldn't fetch mysqli_result
File: /var/www/forum/Packages/temp/database_install.php
Line: 64


2: Missing argument 3 for smf_db_change_column(), called in /var/www/forum/Packages/temp/database_install.php on line 49 and defined
File: /var/www/forum/Sources/DbPackages-mysql.php
Line: 285

Maybe this DB setup message could explain the missing database value here?:


The banning does not seem to work correctly. I saw other people also had this problem
When I add a new IPv4 ban I get the error: "The database value you're trying to insert does not exist: ip_low5"

Did someone manage to fix this?
Also existing IPv4 ban triggers are not shown in the ban trigger list.
They do seem to work, however i can't manage them.

Has anyone solved this?
Title: Re: IPv6 support
Post by: rho_simafo on August 15, 2018, 07:56:18 AM
When I tried to install this mode under SMF 2.0.15 it was not successfull.

The message I got:
Code: [Select]
Too few arguments to function smf_db_change_column(), 2 passed in /htdocs/smfforum.de/Packages/temp/database_install.php on line 49 and at least 3 expected
Title: Re: IPv6 support
Post by: Mr. Jinx on August 15, 2018, 11:59:11 AM
This mod hasn't been updated for a looooooooong time, and contains some serious flaws. I would not recommend installing it.
If you need IPv6 support badly then you should be looking for other forum software. SMF is just not build for that.
Title: Re: IPv6 support
Post by: alexetgus on September 20, 2018, 10:23:02 AM
This mod is obsolete. It is no longer compatible with the latest versions of PHP, SQL SGBD and SMF.
It's dammageable...

Code: [Select]
Packages/temp/database_install.php on line 49 and at least 3 expected