PDA

View Full Version : vBulletin and IPv6


apleschu
03-02-2015, 05:00 PM
Out of the box, believe it or not, the developers of vBulletin do not seem to have any idea about IPv6 or the fact that we are using it already all over the world or that some folks need to or prefer to use IPv6. I am on of the latter category, my day to day job is in and about networks, so I need to know what is going on, and therefore my forums also have IPv6 enabled. Come to find out quite a number of folks already have, and are using IPv6. Unfortunately though the moment vBulletin encounters an IPv6 address it treats it just the same as if it were an IPv4. Needless to say that this does not make any sense at all.

Now I know there have been discussion in the past about IP addresses being treated as strings and that a few folks do not agree with that, I for one just wanted to be able to see the full address a client comes from, or have the full address available in the logs. With that said I set out to change what is needed in order to have vBulletin IPv6 aware. More than likely I forgot something, but at least it is working for now.

Now if you are a mod developer, don't thumb your nose at vBulletin, unless your mods are IPv6 aware as well. After all IPv6 is now around for long enough that we should all start to be aware and know how to use it.

But enough of the talk here are the changes I did in order to have my forum being able to deal with IPv6 addresses.

**IF YOU FOLLOW WHAT I DID AND YOU MESS UP YOUR FORUM YOU ARE ON YOUR OWN. THE FOLLOWING INSTRUCTIONS ARE DANGEROUS, SO IF YOU DO NOT FEEL 100% COMFORTABLE TO POKE AROUND IN THE DATABASE, *D*O* *N*O*T* *D*O* *I*T*!!**

Everywhere I saw so far IP addresses are just stored as strings, which makes a lot of things easy to deal with. First: Tables and fields that have to changed.

adminlog.ipaddress
apiclient.initialipaddress
apilog.ipaddress
blog_rate.ipaddress
blog_search.ipaddress
blog_text.ipaddress
blog_trackbacklog.ipaddress
cms_rate.ipaddress
dbtech_classifieds_listing.ipaddress
dbtech_classifieds_transaction.ipaddress
groupmessage.ipaddress
guest.ipaddress
guest.altip
guestviews.ipaddress
guestviews.altip
ipdata.ip
ipdata.altip
moderatorlog.ipaddress
picturecomment.ipaddress
post.ipaddress
searchcore.ipaddress
searchlog.ipaddress
session.host
strikes.strikeip
threadrate.ipaddress
user.ipaddress
userchangelog.ipaddress
visitormessage.ipaddress

for each one of them you basically have to change the field type in the database to a varchar(40) (I know 39 is technically enough, I just love to have one char extra as a buffer)

once that is done you will need to change one line in include/class_core.php:


define('SESSION_HOST', substr(IPADDRESS, 0, 15));


to


define('SESSION_HOST', substr(IPADDRESS, 0, 39));


After these changes at least the IPv6 addresses show up correctly in the online page and seem to be correct everywhere else as well. If you do this let me know what your experiences are.

SystemFiles
03-10-2015, 02:09 PM
Not exactly, in some of the tables they store the IP as an integer. They use ip2long to convert the IPv4 address. However with an IPv6 ip2long will return false and therefore it will not store the IP correctly. I do find it ridiculous that vBulletin still does not support IPv6.

final kaoss
04-28-2015, 11:57 PM
Just today I saw a ipv6 address and when I clicked on it:

IP Address 2601:a:3b00:b12
Resolved Host Name Unable to resolve IP address

Thinking about doing this "fix" maybe.

Zachery
04-29-2015, 01:31 AM
IPv6 usage is low, globally, and really has almost no impact on the forum software itself. A

final kaoss
04-29-2015, 01:39 AM
IPv6 usage is low, globally, and really has almost no impact on the forum software itself. A

According to google, in 2014 it was 3 percent overall and so far in 2015, it's at 6.4 percent of all devices are using it.
https://www.google.com/intl/en/ipv6/statistics.html

Sure we don't need it at this very moment but as we get more and more smart devices, laptops & desktops sold, the more ipv6 will be adopted. So in the meantime what are we to do if lets say spammers pick up on this and start using ipv6 addresses to spam from? It would be a bit harder to ban them wouldn't it.