Advertisement:

Author Topic: IPv6 support  (Read 30791 times)

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 69,110
    • StoryBB/StoryBB on GitHub
Re: IPv6 support
« Reply #20 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.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

Nothing turns to hate so bitter as what once was love.

Offline SleePy

  • Site Team Lead
  • SMF Master
  • *
  • Posts: 30,097
  • Gender: Male
  • Thats his happy face.
    • jdarwood007 on GitHub
    • @jdarwood on Twitter
    • SleePy Code - My personal site
Re: IPv6 support
« Reply #21 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]) 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).

Jeremy D — Site Team / SMF Developer
Support the SMF Support team!
Profiles:
GitHub

Offline liuxyon

  • Newbie
  • *
  • Posts: 9
Re: IPv6 support
« Reply #22 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.

Offline AllMassive

  • Jr. Member
  • **
  • Posts: 141
  • Gender: Male
Re: IPv6 support
« Reply #23 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.

Offline AllMassive

  • Jr. Member
  • **
  • Posts: 141
  • Gender: Male
Re: IPv6 support
« Reply #24 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&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&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


Offline EricTheRed

  • Semi-Newbie
  • *
  • Posts: 55
  • Gender: Male
    • All about IPv6!
Re: IPv6 support
« Reply #25 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!!!

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 69,110
    • StoryBB/StoryBB on GitHub
Re: IPv6 support
« Reply #26 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.

* Arantor is just reminded of the debugging he needs to do for IPv6 on his setup, though was not implemented with this mod
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

Nothing turns to hate so bitter as what once was love.

Offline EricTheRed

  • Semi-Newbie
  • *
  • Posts: 55
  • Gender: Male
    • All about IPv6!
Re: IPv6 support
« Reply #27 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 :)

Offline SleePy

  • Site Team Lead
  • SMF Master
  • *
  • Posts: 30,097
  • Gender: Male
  • Thats his happy face.
    • jdarwood007 on GitHub
    • @jdarwood on Twitter
    • SleePy Code - My personal site
Re: IPv6 support
« Reply #28 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.
Jeremy D — Site Team / SMF Developer
Support the SMF Support team!
Profiles:
GitHub

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 69,110
    • StoryBB/StoryBB on GitHub
Re: IPv6 support
« Reply #29 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 :/
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

Nothing turns to hate so bitter as what once was love.

Offline SleePy

  • Site Team Lead
  • SMF Master
  • *
  • Posts: 30,097
  • Gender: Male
  • Thats his happy face.
    • jdarwood007 on GitHub
    • @jdarwood on Twitter
    • SleePy Code - My personal site
Re: IPv6 support
« Reply #30 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).
Jeremy D — Site Team / SMF Developer
Support the SMF Support team!
Profiles:
GitHub

Offline EricTheRed

  • Semi-Newbie
  • *
  • Posts: 55
  • Gender: Male
    • All about IPv6!
Re: IPv6 support
« Reply #31 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.

Offline Woet

  • Newbie
  • *
  • Posts: 5
Re: IPv6 support
« Reply #32 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.

Offline AllMassive

  • Jr. Member
  • **
  • Posts: 141
  • Gender: Male
Re: IPv6 support
« Reply #33 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)

Offline Mr. Jinx

  • Full Member
  • ***
  • Posts: 477
  • Gender: Male
    • Ziggo Forum Chelloo
Re: IPv6 support
« Reply #34 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.

Offline Mr. Jinx

  • Full Member
  • ***
  • Posts: 477
  • Gender: Male
    • Ziggo Forum Chelloo
Re: IPv6 support
« Reply #35 on: October 03, 2014, 09:10:50 AM »
Ok, installed this mod on SMF 2.0.8 and here are my results:
  • The included database script has some errors, or it doesn't work anymore. You may not see any errors during install, but after checking I could find that some parts of the script where not executed. You'll have to manually do the adjustments in your database.
  • Banning an IPv6 number doesn't work, but I think this is related to some tables that are not properly changed.
  • Still getting "The database value you're trying to insert does not exist: ip_low5" when trying to banning an IPv4 address
  • Who is online doesn't show IPv6 numbers

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.
« Last Edit: October 06, 2014, 03:01:36 AM by Mr. Jinx »

Offline live627

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 5,273
  • Gender: Male
  • Cat: Destroy!
    • live627 on Facebook
    • live627 on GitHub
    • live627 on LinkedIn
    • @live627 on Twitter
    • livemods
Re: IPv6 support
« Reply #36 on: October 04, 2014, 08:31:37 PM »
That requires MySQL5.6.3...
Try not to become a man of success, but rather try to become a man of value.
- Albert Einstein

Offline Mr. Jinx

  • Full Member
  • ***
  • Posts: 477
  • Gender: Male
    • Ziggo Forum Chelloo
Re: IPv6 support
« Reply #37 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.
« Last Edit: October 07, 2014, 08:15:31 AM by Mr. Jinx »

Offline SleePy

  • Site Team Lead
  • SMF Master
  • *
  • Posts: 30,097
  • Gender: Male
  • Thats his happy face.
    • jdarwood007 on GitHub
    • @jdarwood on Twitter
    • SleePy Code - My personal site
Re: IPv6 support
« Reply #38 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.
Jeremy D — Site Team / SMF Developer
Support the SMF Support team!
Profiles:
GitHub

Offline Mr. Jinx

  • Full Member
  • ***
  • Posts: 477
  • Gender: Male
    • Ziggo Forum Chelloo
Re: IPv6 support
« Reply #39 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.
« Last Edit: November 01, 2014, 03:30:11 PM by Mr. Jinx »