News:

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

Main Menu

[Outdated] IPv6 support

Started by SleePy, June 29, 2011, 03:25:36 PM

Previous topic - Next topic

Arantor

Quoteyou 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.

SleePy

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 ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

liuxyon

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.

AllMassive

Thank you very much for this mod - everything works fine, but using /who still shows 0.0.0.0 as IP.

AllMassive

I've found these Errors in my Log:


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


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



EricTheRed

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:

Quote from: 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.
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!!!

Arantor

QuoteWill 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

EricTheRed

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 :)

SleePy

Quote from: EricTheRed on March 30, 2013, 05:42:30 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 ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

Arantor

QuoteI 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.

QuoteIts hard to say what to do at this point.

No, I haven't seen a valid solution for that either :/

SleePy

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 ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

EricTheRed

Quote from: SleePy on April 07, 2013, 04:45:02 PM
Quote from: EricTheRed on March 30, 2013, 05:42:30 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.

Woet

Quote from: SleePy on February 15, 2012, 02:19:02 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.

AllMassive

Would someone pls be so kind and look into this '/who'-Bug ?

:*(

(and the others ofc also)

Mr. Jinx

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.

Mr. Jinx

#35
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:SET log_time = {int:log_time}, ip = IFNULL(INET_ATON({string:ip}), 0), url = {string:url}
Replace with:SET log_time = {int:log_time}, ip = IFNULL(INET6_ATON({string:ip}), 0), url = {string:url}

Find: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: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:lo.log_time, lo.id_member, lo.url, INET_NTOA(lo.ip) AS ip, mem.real_name,
Replace with: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.

live627

That requires MySQL5.6.3...

Mr. Jinx

#37
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.

SleePy

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 ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

Mr. Jinx

#39
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.

Advertisement: