About this blog…

I am employed by Netnod as head of engineering, research and development and am among other things chair of the Security and Stability Advisory Committee at ICANN. You can find CV and photos of me at this page.

As I wear so many hats, I find it being necessary to somewhere express my personal view on things. This is the location where that happens. Postings on this blog, or at Facebook, Twitter etc, falls under this policy.

The views expressed on this post are mine and do not necessarily reflect the views of Netnod or any other of the organisations I have connections to.

Display of IPv6/IPv4 address on this blog

I have got some questions on how I managed to get the IP address of the client connecting to this blog in the right column. Specifically the IPv6 address.

First of all, the blog do have native IPv6 access, which of course is needed for accessing it over IPv6. Sounds like a natural thing, but sometimes not so easy to get. The number of ISPs and hosting companies that do have native IPv6 is though exploding, so if you checked a year or two ago and did not find one, check again.

Then to the actual display. I use Executable PHP Plugin, and in the widget, I have the following code, that display an image as well as the IP address of the peer:

<b>
<?php if(preg_match('/:/',$_SERVER["REMOTE_ADDR"])) : ?>
 <IMG SRC="https://stupid.domain.name/stuff/xxxxxxxxxx.jpg">
<?php endif ;?>
<?php printf("You: %s",$_SERVER["REMOTE_ADDR"]) ?>
</b>

I do though not disclose what image it is, as I do not think people not using IPv6 for accessing the page should know what it is (it is not that fun, but still).

6 comments to Display of IPv6/IPv4 address on this blog

  • Not that you would think that the picture would be any different if you would be using IPv4. (Yes, I use IPv6.)

    What would be interesting to gather statistics about, or just displaying to the user, would be if he or she is using a tunnel method such as Teredo or 6to4. That’s a very easy regexp.

  • Wolfgang Tremmel

    Well, usually I just read the RSS feed of your blog but this post actually made me open the website…

  • Wolfgang Tremmel

    Well, I usually just read the RSS feed of your blog but this post actually made me open the web version.

  • Peter

    Hi Patrik,

    was trying to access this page with my Nokia E90 Communicator in widescreen, in order to find out whether my mobile phone provider supports IPv6. I wanted to check the display from your page, but the right hand navigation bar, including the display of the IPv6 number, did not show up. I even tried zooming to 50%, but somehow I only see left hand and middle content, not the content on the right.

    Cheers,

    Peter

  • Coming IP Gnome (https://ipgnome.com) will have IPv6 support and display.

  • What is my IP? Visit https://ipgnome.com for details. Now with IPv6 support.