IIS and Web Servers
Detecting Hits that are using IPv6
Gravatar is a globally recognized avatar based on your email address. Detecting Hits that are using IPv6
  Randy Pearson
  All
  Aug 17, 2021 @ 08:43am

Hi all, We are trying to sort out which hits are coming from IPv4 vs IPv6 clients in apps using IIS and WWWC. Originally it looked like IPv6 addresses as passed in from IIS were enclosed in square brackets, such as [2001:19e8:1:8fe:f5b4:771a:d382:d85d]:5967. But in the IIS logs we see some without brackets that are clearly not IPv4 (ex: 2001:19e8:1:8fe:a905:4539:5751:13a9).

Is this an IIS bug or ? Can't find info about this. I'm trying to craft an isIPv6() method that's reasonably robust. Perhaps anything where occurs(":", m.lcIp) >= 2?

TIA, Randy

Gravatar is a globally recognized avatar based on your email address. re: Detecting Hits that are using IPv6
  Rick Strahl
  Randy Pearson
  Aug 17, 2021 @ 12:24pm

Not sure, but whatever you are getting is what IIS is providing (unless it's getting trimmed because it's too long?)

Do you need to use IPv6? I tend to turn it off on my adapters or hosted VMs. It'll just bloat your logs and in reality won't provide you with anything very useful since they are practically unreadable.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Detecting Hits that are using IPv6
  Randy Pearson
  Rick Strahl
  Aug 17, 2021 @ 12:59pm

We have a client that is planning to prioritize IPv6 traffic. We're just assessing readiness and have no say in the routing, etc. decisions.

Gravatar is a globally recognized avatar based on your email address. re: Detecting Hits that are using IPv6
  Rick Strahl
  Randy Pearson
  Aug 18, 2021 @ 10:15am

Got it. But are you actually doing anything with the IPv6 addresses? If not just ignore them?

As said there's no control over what IIS gives you, but I do think that the format is consistent unless there's some sort of module in IIS that is changing them.

+++ Rick ---

© 1996-2021