[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[6bone] Ipv6 Enabled Web Site
- Subject: [6bone] Ipv6 Enabled Web Site
- From: jeroen at unfix.org (Jeroen Massar)
- Date: Sun Jul 18 05:32:51 2004
- In-reply-to: <[email protected]>
- References: <[email protected]>
On Sun, 2004-07-18 at 13:41, Gav wrote:
> Hi All,
> I want to create an IPv6 only version of my web site. I want that version to
> be the same as the IPv4 version
> except for some extra content on existing pages and also some v6 only extra
> I notice www.kame.net and a few others have at the bottom of their page a
> line which tells the user if they are visiting
> the site using a v6 address or a v4 address. I would like to know how to do
> this. I am guessing something to do with
> HTTP_REFERER is involved but not sure how to implement.
Nopes, you check the SERVER_ADDR, if it contains '.' then it is IPv4,
which matches even: ::ffff:192.0.2.1 when your server does IPv4 mapped
addresses. Eg in PHP:
if (strstr($_SERVER["SERVER_ADDR"], "."))
echo "IPv4 Connection Detected!\n";
echo "IPv6 Connection Detected!\n";
else echo "Can't determine if you are using IPv4 or IPv6\n";
> The extra content I am guessing I can use SSI includes and using conditional
> statements include them if HTTP_REFERER is v6 or leave them out if it is v4.
> I am using VirtualHosts on my Apache2 server, I am thinking I implement
> another VirtualHost container to listen out for the v6 socket.
One vhost is enough as you can just let the content do the above.
> I want to do this so as to promote the use of IPv6 and if they are not
> enabled, then give a short tutorial on how to get enabled, then they are
> rewarded with this extra content.
> The other thing is, although I am v6 enabled and have an account with
> FREENET6 , my ipv6 if seems correct, kame.net still says I am viewing using
> a v4 address, any ideas at what I have missed ?
Are you very sure that your IPv6 is working?
If that shows IPv4, try:
If that doesn't connect then you have no IPv6... thus check your config
and of course try traceroute6's to that host to see where your
Applications should first try IPv6 and then IPv4 but there has lately
been a trend that applications start doing IPv4 first and then IPv6 even
if this is against the RFC. Their biggest reason "we now support IPv6
and when that host is unreachable we are slower than the competition
because we timeout and then try IPv4".
> www.minitutorials.com <---- The site I am thinking of using. (online when
> my ISP isnt playing up!)
You will have to add a IPv6 address to that host first:
$ host -t aaaa www.minitutorials.com
www.minitutorials.com has no AAAA record (Authoritative answer)
Also a good 'policy' is to have:
www.example.com = IPv4 + IPv6 (A+AAAA)
www.ipv4.example.com = IPv4 (A)
www.ipv6.example.com = IPv6 (AAAA)
That way you can always use the IPv4 or IPv6 specific host and be
absolutely sure that you are accessing the correct host.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 240 bytes
Desc: This is a digitally signed message part
Url : http://mailman.isi.edu/pipermail/6bone/attachments/20040718/524a909f/attachment.bin