Go Back   vb.org Archive > vBulletin Modifications > vBulletin 3.8 Modifications > vBulletin 3.8 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
IPV6 Support in VB3 Details »»
IPV6 Support in VB3
Version: 1.0.0, by wootalyzer wootalyzer is offline
Developer Last Online: Apr 2012 Show Printable Version Email this Page

Category: Miscellaneous Hacks - Version: 3.8.x Rating:
Released: 07-28-2009 Last Update: 07-28-2009 Installs: 31
Re-useable Code Code Changes Additional Files  
No support by the author.

UPDATE - This mod works with vBulletin 3 AND vBulletin 4!

About

Ok, so let's get started. Got a web server that resolves IP addresses as ipv6? Don't want to remove that ipv6 functionality just so vBulletin will work well? Well, this mod will take care of all of that for you.

How it works

vBulletin 3 and 4 are (from a coding standpoint) completely reliant upon ipv4. Classes are coded all over the place which expect addresses to be in ipv4 format. This mod runs before ANYTHING in vB gets a chance to load and does the following:

- If the address is in ipv4-over-ipv6 format, it simply dumps the ipv4 portion of the address into vbulletin. Done. Simple as pie.
- If the address is in standard ipv6 format (it's a real ipv6 address), it generates a "psudo-ipv4" address to represent the ipv6 address. This "psudo-ipv4" address is in a reserved ipv4 address space, so it shouldn't interfere with any of the real ipv4 addresses, and is generated from a hash of the ipv6 address (so each of the ipv6 addresses should hopefully resolve to their own, unique ipv4 address).

And... that's about it! vB continues on it's merry way treating everyone's ip as a standard ipv4 address.

WATCH OUT!

See someone on your forum with an IP address starting in 204. after installing this mod? That means they are actually accessing your site via an ipv6 address, and the address LISTED doesn't really mean anything.

Installation

Not scared about what we just covered? Good, let's get started.

1. Upload ipv6_fix.php to your forum/includes directory.
2. Edit your includes/init.php file (VERY carefully)

Find

Code:
require_once(CWD . '/includes/class_core.php');
And insert JUST ABOVE IT

Code:
require_once(CWD . '/includes/ipv6_fix.php');
3. Every time you upgrade vB, repeat step 2.

And you're done!

This mod should have no effect if your web server is handling connections as ipv4 addresses. [S]This mod is no replacement for the REAL ipv6 support coming in vB4, so upgrade as soon as it is released![/S] Looks like ipv6 didn't make it into vB4 either -- On lives the mod!

Have fun

Download Now

File Type: php ipv6_fix.php (974 Bytes, 306 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Благодарность от:

Comments
  #12  
Old 05-31-2012, 10:55 PM
matrex722's Avatar
matrex722 matrex722 is offline
 
Join Date: Jan 2007
Posts: 161
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

installed 3.8.7
thanks
Reply With Quote
  #13  
Old 05-30-2013, 08:26 PM
Chris8's Avatar
Chris8 Chris8 is offline
 
Join Date: Nov 2009
Posts: 188
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So, what are the pros of doing this?
Reply With Quote
  #14  
Old 05-31-2013, 04:06 AM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

For the record, vBulletin operates just fine with a server running ipv6.
Reply With Quote
  #15  
Old 11-14-2013, 08:23 AM
AusPhotography's Avatar
AusPhotography AusPhotography is offline
 
Join Date: Nov 2007
Location: Hobart & Adelaide .au
Posts: 521
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

To fix this mod for vB 4.2 change the code as follows: (added %256 on 3 lines)
PHP Code:
function ipv6_to_ipv4($input) {
    
// Create a fake ipv4 address
    // that will "represent" the given
    // ipv6 address
    
$hash abs(crc32($input));
    if(
$hash 100000000$hash += 100000000;
    
$num1 intval(substr($hash03))%256;
    
$num2 intval(substr($hash33))%256;
    
$num3 intval(substr($hash63))%256;
    return 
"224." .$num1"." .$num2"." .$num3;

Reply With Quote
Благодарность от:
tbworld
  #16  
Old 11-16-2013, 04:02 AM
AusPhotography's Avatar
AusPhotography AusPhotography is offline
 
Join Date: Nov 2007
Location: Hobart & Adelaide .au
Posts: 521
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

WHM/cPanel 11.40.0.19 now supports IPv6

Here are some useful links...

Release notes
http://docs.cpanel.net/twiki/bin/vie...easeNotes#IPv6

Blog... (video how to)
http://blog.cpanel.net/ipv6-update/

Instructions...
http://docs.cpanel.net/twiki/bin/vie...ocs/EnableIpv6

I've setup to use IPv6 using WHM/cPanel 11.40.0.19 on a XEN Virtual server
http://www.ausphotography.net.au
IP 4/6 displays in page footer
Reply With Quote
  #17  
Old 06-30-2014, 09:52 AM
TMM-TT's Avatar
TMM-TT TMM-TT is offline
 
Join Date: Jun 2005
Location: Sweden
Posts: 212
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The actual problem seems to be a very simple variable in core - SESSION_HOST, at least for the "who's online"-part. Or are there more different methods that has to be changed also?

I have described the problem here: https://tornevall.net/forum/showthre...9-ipv6-support.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:34 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04343 seconds
  • Memory Usage 2,292KB
  • Queries Executed 22 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_code
  • (1)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (7)post_thanks_box
  • (1)post_thanks_box_bit
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (2)post_thanks_postbit
  • (7)post_thanks_postbit_info
  • (6)postbit
  • (1)postbit_attachment
  • (7)postbit_onlinestatus
  • (7)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete