This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

How do i disabled IPv6
#1
How do i disabled IPv6
The title says it all, how do i make my webserver accept IPv4 only?
Thanks in advance
Reply
Thanks given by:
#2
RE: How do i disabled IPv6
http://askubuntu.com/questions/440649/ho...untu-14-04
No support using PM (Auto adding to IGNORE list!), use the forum. 
How to ask

200$ free to start your VPS 60 days credit
Reply
Thanks given by:
#3
RE: How do i disabled IPv6
I tried that before posing my question, and it didnt work Sad
Reply
Thanks given by:
#4
RE: How do i disabled IPv6
Just don't use it? Why do you need to remove it? Is there a problem or conflict?
-TGates - Project Council

SEARCH the Forums or read the DOCUMENTATION before posting!
Support Sentora and Donate: HERE

Find my support or modules useful? Donate to TGates HERE
Developers and code testers needed!
Contact TGates for more information
Reply
Thanks given by:
#5
RE: How do i disabled IPv6
My issue is, im working with teamspeak 3 API and teamspeak 3 uses IPv4. Im building a control panel for remote access which authenticates with your teamspeak 3 last known IP. In which case, the IPv6 returned from $_SERVER['REMOTE_ADDR'] != the IPv4 returned from teamspeak 3. My only solution is to find a way to only accept IPv4. Perhaps im using PHP wrong, any suggestions will be appreciated
Reply
Thanks given by:
#6
RE: How do i disabled IPv6
I see.. well, this has nothing to do with Sentora, but more an OS related issue. You will need to check Google or even maybe the TeamSpeak site to sort that out Sad
-TGates - Project Council

SEARCH the Forums or read the DOCUMENTATION before posting!
Support Sentora and Donate: HERE

Find my support or modules useful? Donate to TGates HERE
Developers and code testers needed!
Contact TGates for more information
Reply
Thanks given by:
#7
RE: How do i disabled IPv6
Alright, appreciate the support. Thank you
Reply
Thanks given by:
#8
RE: How do i disabled IPv6
A quick search on Google lead me here: http://stackoverflow.com/questions/12435...shows-ipv6

Quote:The server is then accepting connections on an IPv6 socket. Some operating systems can do both IPv4 and IPv6 on an IPv6 socket. When that happens the IPv6 address will look like
Code:
::ffff:192.0.2.123
or
Code:
::ffff:c000:027b
which is the same address but written in hexadecimal.
If you see IPv6 addresses like
Code:
2a00:8640:1::224:36ff:feef:1d89
then your webserver really is reachable over IPv6 :-)
Anyway, to convert everything back to a canonical form you can use something like:
Code:
// Known prefix
$v4mapped_prefix_hex = '00000000000000000000ffff';
$v4mapped_prefix_bin = pack("H*", $v4mapped_prefix_hex);

// Or more readable when using PHP >= 5.4
# $v4mapped_prefix_bin = hex2bin($v4mapped_prefix_hex);

// Parse
$addr = $_SERVER['REMOTE_ADDR'];
$addr_bin = inet_pton($addr);
if( $addr_bin === FALSE ) {
 // Unparsable? How did they connect?!?
 die('Invalid IP address');
}

// Check prefix
if( substr($addr_bin, 0, strlen($v4mapped_prefix_bin)) == $v4mapped_prefix_bin) {
 // Strip prefix
 $addr_bin = substr($addr_bin, strlen($v4mapped_prefix_bin));
}

// Convert back to printable address in canonical form
$addr = inet_ntop($addr_bin);
Using this code, when you input one of the following:
Code:
::ffff:192.000.002.123
::ffff:192.0.2.123
0000:0000:0000:0000:0000:ffff:c000:027b
::ffff:c000:027b
::ffff:c000:27b
192.000.002.123
192.0.2.123
you always get the canonical IPv4 address
Code:
192.0.2.123
as output.
And of course IPv6 addresses get returned as canonical IPv6 addresses:
Code:
2a00:8640:0001:0000:0224:36ff:feef:1d89
becomes
Code:
2a00:8640:1::224:36ff:feef:1d89
etc.


Yet, also note this: http://stackoverflow.com/questions/31233...ddr-in-php

Quote:
Code:
$_SERVER['REMOTE_ADDR']
always contains the address of the visitor. If it contains an IPv6 address then the visitor used IPv6 and there is no IPv4 address. And vice versa of course. These days you have to be able to deal with both.
Some visitors will have only IPv4, some will have only IPv6 and some will have both. The browser decides what is available and what it will use, and that's all you'll see. Note that a browser that has both might even switch between IPv4 and IPv6 between requests if it deems that necessary for good connectivity.
-TGates - Project Council

SEARCH the Forums or read the DOCUMENTATION before posting!
Support Sentora and Donate: HERE

Find my support or modules useful? Donate to TGates HERE
Developers and code testers needed!
Contact TGates for more information
Reply
Thanks given by:


Possibly Related Threads…
Thread Author Replies Views Last Post
Domain disabled page incorrect QuakeMedia 2 6 ,152 08-19-2017, 03:41 AM
Last Post: TGates
ipv6 DNS records trs998 8 22 ,703 08-28-2016, 04:59 PM
Last Post: vicii
PHP exec disabled - problem enabling. asobiek 2 8 ,454 07-07-2016, 05:33 AM
Last Post: Me.B

Forum Jump:


Users browsing this thread: 4 Guest(s)