I use my computer when I want to access the internet. I realize that this has nothing to do with my website.
I had a public IPv4, but I noticed lately that I also had an IPv6 address, which my ISP no doubt gave me in order to be able to connect to IPv6 sites. I completely understand this.
Now, with respect to my website.
Yes, it is at a different location, is part of shared hosting and at my hosting company location somewhere in the US.
The following is why I started enquiring about IPv6.
We are using PHP and fsockopen() to check if a host is available. It works great for standard ipv4 addresses, but recently we started adding ipv6 addresses and it fails. According to the PHP documentation for fsockopen() we simply just need to enclose the ipv6 address in brackets for ipv6 support.
fsockopen('[2001:41d0:2:381::14]', 80, $return_error_number, $return_error, 10);
However, we are always getting:
"Network is unreachable"
I then checked my PHP on my website using php():
It stated ipv6 was enabled.
As a test, I ran the local host in ipv6:
This worked with fsockopen()
Then I decided to try an ipv4 from yahoo.com and mapped to ipv6:
22.214.171.124 ===> [::ffff:628b:b495]
This worked with fsockopen
Just for the hell of it I used [::] and it worked with fsockeopen
As I stated, after some more research, I learned more about mappedIPv6 and also IPv6to4 which is supposed to be used in Tunneling
Using my IPv4 website address I created a mappedIPv6 and an IPv6to4 and added them both to my DNS file as AAAA records.
When I did a DNS lookup, both IPv6 addresses showed up.
Again, I was not able to connect to IPv6 addresses with fsockopen.
I then started reading a lot about tunnelling, gateways etc. to connect IPv4 to IPv6.
What I need to do then is reach IPv6 addresses from an IPv4-only network with fsockopen.
Sometimes I only know the IPv6 address of the website not the domain name so I need to be able to check if there is a connection using IP address only.
Hopefully I have explained why I am going through this IPv6 process.