<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title>www.ipv4ipv6.net</title>
  <id>https://www.ipv4ipv6.net/</id>
  <subtitle>This site is all about IPv6 address.Smart Home World is an exclusive magazine for Smart Home Technology, Home /Building Automation &amp; Audio -Video. Smart Home World, aims to bring to your knowledge, all the latest technological advancements and noteworthy national and global news related to Smart Homes.</subtitle>
  <generator uri="https://github.com/madskristensen/Miniblog.Core" version="1.0">Miniblog.Core</generator>
  <updated>2024-02-16T11:48:17Z</updated>
  <entry>
    <id>https://www.ipv4ipv6.net/blog/ipv6-site/</id>
    <title>ipv6 site</title>
    <updated>2024-03-28T10:06:18Z</updated>
    <published>2024-02-16T11:48:17Z</published>
    <link href="https://www.ipv4ipv6.net/blog/ipv6-site/" />
    <author>
      <name>test@example.com</name>
      <email>www.ipv4ipv6.net</email>
    </author>
    <category term="ipv6" />
    <content type="html">&lt;ul style="box-sizing: inherit; margin: 0px 0px 0px 2em; padding: 0px 0px 3px; font-family: Arial, Helvetica, 'sans-serif'; font-size: 14px; color: #58585a; font-weight: 400;"&gt;
&lt;li style="box-sizing: inherit; margin-left: 0em; margin-top: 0.1875rem; margin-bottom: 0.1875rem; list-style-type: disc; padding-top: 0px; padding-bottom: 3px;"&gt;Dedicated&amp;nbsp;&lt;strong style="box-sizing: inherit;"&gt;Web Server&lt;/strong&gt;&amp;nbsp;on a defined IPv4 Address (&lt;strong style="box-sizing: inherit;"&gt;192.168.1.2&lt;/strong&gt;)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Public IP Address API&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.ipify.org/"&gt;https://www.ipify.org/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="../../api/IpAddress/"&gt;https://www.ipv4ipv6.net/api/IpAddress/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://test-ipv6.com/"&gt;https://test-ipv6.com/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://findipv6.com/"&gt;https://findipv6.com/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://whatismyipaddress.com/"&gt;https://whatismyipaddress.com/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;IPNetwork command line and C# library&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/lduchosal/ipnetwork"&gt;https://github.com/lduchosal/ipnetwork&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;table&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Microsoft&amp;rsquo;s IPv6 Portal&lt;/td&gt;
&lt;td&gt;&lt;a href="http://www.microsoft.com/ipv6/"&gt;http://www.microsoft.com/ipv6/&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;UK IPv6 Resource Centre&lt;/td&gt;
&lt;td&gt;&lt;a href="http://www.cs-ipv6.lancs.ac.uk/ipv6/"&gt;http://www.cs-ipv6.lancs.ac.uk/ipv6/&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;6Bone.Net&lt;/td&gt;
&lt;td&gt;&lt;a href="http://www.6bone.net/"&gt;http://www.6bone.net/&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;IPv6 News and Links&lt;/td&gt;
&lt;td&gt;&lt;a href="http://www.hs247.com/"&gt;http://www.hs247.com/&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;WIDE Project&lt;/td&gt;
&lt;td&gt;&lt;a href="http://www.v6.wide.ad.jp/"&gt;http://www.v6.wide.ad.jp/&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;IPv6 Information&lt;/td&gt;
&lt;td&gt;&lt;a href="http://www.ipv6.org/"&gt;http://www.ipv6.org/&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;</content>
  </entry>
  <entry>
    <id>https://www.ipv4ipv6.net/blog/ipv6-addresses-have-three-types/</id>
    <title>IPv6 address types</title>
    <updated>2024-04-28T23:20:57Z</updated>
    <published>2024-02-16T11:30:31Z</published>
    <link href="https://www.ipv4ipv6.net/blog/ipv6-addresses-have-three-types/" />
    <author>
      <name>test@example.com</name>
      <email>www.ipv4ipv6.net</email>
    </author>
    <category term="ipv6" />
    <content type="html">&lt;p&gt;IPv6 addresses have three types:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Global Unicast Address &amp;ndash;Scope Internet- routed on Internet&lt;/p&gt;
&lt;p&gt;Unique Local &amp;mdash; Scope Internal Network or VPN internally routable, but Not routed on Internet&lt;/p&gt;
&lt;p&gt;Link Local &amp;ndash; Scope network link- Not Routed internally or externally.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img src="/Posts/files/ipv6-address-types-1_638436803729385404.jpg" alt="ipv6-address-types-1.jpg" width="588" height="301" /&gt;&lt;/p&gt;
&lt;h1&gt;Global and Public Addresses&lt;/h1&gt;
&lt;p&gt;Global addresses are routable on the internet and start with 2001:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h1&gt;Internal Addresses- Link Local and Unique Local&lt;/h1&gt;
&lt;p&gt;These addresses are not routed on the Internet and are reserved for internal networks.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;IPv6&amp;nbsp; has two Internal address types.&lt;/p&gt;
&lt;pre class="language-markup"&gt;&lt;code&gt;Link Local
Unique Local&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h2&gt;Link Local&lt;/h2&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;These are meant to be used inside an internal network, and again they are not routed on the Internet.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Link local addresses start with fe80&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;They are restricted to a link and are not routed on the Internal network or the Internet.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Link Local addresses are self assigned i.e. they do not require a DHCP server.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;A link local address is required on every IP6 interface even if no routing is present.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h2&gt;Unique Local&lt;/h2&gt;
&lt;p&gt;Unique Local are meant to be used inside an internal network.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;They are routed on the Internal network but not routed on the Internet.&lt;/p&gt;
&lt;p&gt;The address space is divided into two /8 spaces: fc00::/8 for globally assigned addressing, and fd00::/8 for locally assigned addressing.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;For manually assignment by an organisation use the fd00 prefix.&lt;/p&gt;
&lt;p&gt;nslookup www.ipv4ipv6.net&lt;/p&gt;
&lt;pre class="language-csharp"&gt;&lt;code&gt;F:\net8.0\publish&amp;gt;nslookup www.ipv4ipv6.net
服务器:  UnKnown
Address:  fd18:f22c:7814:d900:1af2:2cff:fe78:14d9

非权威应答:
名称:    www.ipv4ipv6.net
Addresses:  2606:4700:3036::ac43:b4af
          2606:4700:3032::6815:23ec
          104.21.35.236
          172.67.180.175
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;ping -6&amp;nbsp; www.ipv4ipv6.net&lt;/p&gt;
&lt;pre class="language-markup"&gt;&lt;code&gt;F:\net8.0\publish&amp;gt;ping -6  www.ipv4ipv6.net

正在 Ping www.ipv4ipv6.net [2606:4700:3032::6815:23ec] 具有 32 字节的数据:
来自 2606:4700:3032::6815:23ec 的回复: 时间=219ms
来自 2606:4700:3032::6815:23ec 的回复: 时间=218ms
来自 2606:4700:3032::6815:23ec 的回复: 时间=218ms
来自 2606:4700:3032::6815:23ec 的回复: 时间=220ms&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Google dns server 2001:4860:4860::8888 and 2001:4860:4860::8844.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;matter ipv6 address&lt;/p&gt;
&lt;p&gt;&lt;img src="/Posts/files/ipv6-address-types-2_638499432102006959.webp" alt="ipv6-address-types-2.webp" width="923" height="99" /&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</content>
  </entry>
  <entry>
    <id>https://www.ipv4ipv6.net/blog/how-to-enable-or-disable-ipv6-in-windows-10/</id>
    <title>How to Enable or Disable IPv6 in Windows 10</title>
    <updated>2024-02-16T11:28:55Z</updated>
    <published>2024-02-16T11:10:36Z</published>
    <link href="https://www.ipv4ipv6.net/blog/how-to-enable-or-disable-ipv6-in-windows-10/" />
    <author>
      <name>test@example.com</name>
      <email>www.ipv4ipv6.net</email>
    </author>
    <category term="ipv6" />
    <content type="html">&lt;p&gt;Considerations Before Enabling IPv6:&lt;/p&gt;
&lt;p&gt;ISP Support&amp;nbsp;&lt;/p&gt;
&lt;p&gt;DNS Server Support&lt;/p&gt;
&lt;p&gt;Router Support&lt;/p&gt;
&lt;p&gt;os&lt;/p&gt;
&lt;p&gt;ISP Support&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Not all ISPs offer IPv6 connectivity.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Router Support&lt;/p&gt;
&lt;p&gt;Ensure that your router supports IPv6.&lt;/p&gt;
&lt;pre class="language-markup"&gt;&lt;code&gt;Option One: To Enable or Disable IPv6 or its Components using Microsoft Easy Fix Wizard
Option Two: To Enable or Disable IPv6 in Network Adapter Properties
Option Three: To Enable IPv6 for Specific Network Adapter in PowerShell
Option Four: To Enable IPv6 for All Network Adapters in PowerShell
Option Five: To Disable IPv6 for Specific Network Adapter in PowerShell
Option Six: To Disable IPv6 for All Network Adapters in PowerShell&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;如果你确定有 IPv6，但我们检测不到，有两个可能的原因：&lt;/p&gt;
&lt;p&gt;1.你的单位通过网络策略阻断了与外界的 IPv6 通信&lt;/p&gt;
&lt;p&gt;2.你看到的 IPv6 地址不是公网地址。任何以&amp;ldquo;::&amp;rdquo;&amp;ldquo;fc&amp;rdquo;&amp;ldquo;fd&amp;rdquo;或&amp;ldquo;fe&amp;rdquo;开头的地址都无法接入 IPv6 互联网。&lt;/p&gt;
&lt;p&gt;3.当内容商同时提供 IPv4 和 IPv6 时，你的浏览器会优先通过 IPv4 连接。&lt;/p&gt;</content>
  </entry>
  <entry>
    <id>https://www.ipv4ipv6.net/blog/blazor-webassembly-get-ip-address/</id>
    <title>How to Get IP Address in Blazor WebAssembly</title>
    <updated>2024-02-16T11:03:09Z</updated>
    <published>2024-02-09T03:20:52Z</published>
    <link href="https://www.ipv4ipv6.net/blog/blazor-webassembly-get-ip-address/" />
    <author>
      <name>test@example.com</name>
      <email>www.ipv4ipv6.net</email>
    </author>
    <category term="ip address api" />
    <category term="csharp" />
    <category term="ip address api" />
    <content type="html">&lt;p&gt;&lt;span style="color: #24292e; font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, Segoe UI, Oxygen, Ubuntu, Cantarell, Open Sans, sans-serif;"&gt;&lt;span style="font-size: 16px;"&gt;You can use a third party API, such as https://www.ipv4ipv6.net/api/IpAddress/, to get the IP address of the current request in Blazor. The script https://www.ipv4ipv6.net/api/IpAddress/&amp;nbsp;will return the IP address in text format. But this is a workaround. As of now, there is no way to achieve this. In the following code snippet, the IP address will be retrieved from the https://www.ipv4ipv6.net/api/IpAddress/&amp;nbsp;API through a JS interop call to the Blazor server.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;pre class="language-csharp"&gt;&lt;code&gt;[_Host.cshtml/index.html]

&amp;lt;script&amp;gt;
function GetAddress() {
    var script = document.createElement("script");
    script.type = "text/javascript";
    script.src = "https://www.ipv4ipv6.net/api/IpAddress/";
    document.getElementsByTagName("head")[0].appendChild(script);
};
function DisplayIP(response) {
    document.getElementById("text").innerHTML = "Your IP Address is " + response.ip;
}
&amp;lt;/script&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;pre class="language-csharp"&gt;&lt;code&gt;[index.razor]

@page "/"
@inject IJSRuntime jsRuntime

&amp;lt;button @onclick="GetIp"&amp;gt;Get IP!!!&amp;lt;/button&amp;gt;
&amp;lt;textarea id="text" style="width:50%;height:40px;" /&amp;gt;

@code{
          public async Task GetIp()
          {
                 await jsRuntime.InvokeAsync&amp;lt;object&amp;gt;("GetAddress");
          } 
}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Ohter&lt;/p&gt;
&lt;p&gt;github.com&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/vandycknick/cloudflare-ddns"&gt;https://github.com/vandycknick/cloudflare-ddns&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Cloudflare DDNS allows you to run your own Dynamic DNS service from the comfort of your own infrastructure. Combined with a Raspberry PI or whatever spare hardware you still have lying around, it helps promote a more decentralized internet at a low cost. During execution, it resolves your current public IPv4 and IPv6 addresses and creates/updates DNS records in Cloudflare to point to your home address. It keeps track of any DNS records that it is managing, giving you some peace of mind and allowing it to run in non-empty Cloudflare zones without having to worry that your public blog gets taken down. Any stale or duplicate records will get safely cleaned up.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</content>
  </entry>
  <entry>
    <id>https://www.ipv4ipv6.net/blog/How-Get-Real-IP-Addresses-CloudFlare-Nginx-web-server/</id>
    <title>How to Get Real Visitor IP Address (Restoring Visitor IPs) with Nginx and CloudFlare.</title>
    <updated>2024-02-09T03:09:20Z</updated>
    <published>2024-02-09T02:47:01Z</published>
    <link href="https://www.ipv4ipv6.net/blog/How-Get-Real-IP-Addresses-CloudFlare-Nginx-web-server/" />
    <author>
      <name>test@example.com</name>
      <email>www.ipv4ipv6.net</email>
    </author>
    <category term="csharp" />
    <category term="get real visitor ip address cloudflare" />
    <category term="cloudflare" />
    <content type="html">&lt;p&gt;One annoying issue, however, is the fact that because it&amp;rsquo;s a proxy you see incoming requests as coming from CloudFlare servers rather than the original client. So if you&amp;rsquo;re doing any cool data analytics on your server your source IP information will be borked.&lt;/p&gt;
&lt;p&gt;To provide the client (visitor) IP address for every request to the origin, Cloudflare adds the "CF-Connecting-IP" header. We will catch the header and get the real ip address of the visitor.&lt;/p&gt;
&lt;p&gt;There&amp;rsquo;s an easy way to fix it, however.&lt;span style="color: #1f2328; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'; font-size: 16px;"&gt;modify your nginx configuration to let you get the real ip address of your visitors for your web applications that behind of Cloudflare's reverse proxy network.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;I run Nginx as my main webserver,which allows you to specify a set of proxy server IPs and the original IP header within the forwarded traffic so you can map it properly.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;So, using Nginx, edit your nginx.conf file and add the following to your http section:&lt;/p&gt;
&lt;pre class="language-markup"&gt;&lt;code&gt;http 80;
include cloudflare.conf
real_ip_header X-Forwarded-For;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;pre class="language-markup"&gt;&lt;code&gt;$ curl https://www.cloudflare.com/ips-v4
173.245.48.0/20
103.21.244.0/22
....
131.0.72.0/22&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;span style="color: #191b1f; font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Microsoft YaHei', 'Source Han Sans SC', 'Noto Sans CJK SC', 'WenQuanYi Micro Hei', sans-serif; font-size: medium;"&gt;cloudflare.conf&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;So, using Nginx, edit your nginx.conf file and add the following to your http section:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;set_real_ip_from 173.245.48.0/20;&lt;/p&gt;
&lt;p&gt;set_real_ip_from 103.21.244.0/22;&lt;/p&gt;
&lt;p&gt;set_real_ip_from 103.22.200.0/22;&lt;/p&gt;
&lt;p&gt;set_real_ip_from 103.31.4.0/22;&lt;/p&gt;
&lt;p&gt;...&lt;/p&gt;
&lt;p&gt;set_real_ip_from 2405:b500::/32;&lt;/p&gt;
&lt;p&gt;set_real_ip_from 2405:8100::/32;&lt;/p&gt;
&lt;p&gt;set_real_ip_from 2a06:98c0::/29;&lt;/p&gt;
&lt;p&gt;set_real_ip_from 2c0f:f248::/32;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;real_ip_header CF-Connecting-IP;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Restart Nginx and you&amp;rsquo;ll start seeing original IPs in your logs.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Useful links&lt;/p&gt;
&lt;p&gt;The bash script may run manually or can be scheduled to refresh the ip list of CloudFlare automatically.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/ergin/nginx-cloudflare-real-ip"&gt;https://github.com/ergin/nginx-cloudflare-real-ip&lt;/a&gt;&lt;/p&gt;</content>
  </entry>
  <entry>
    <id>https://www.ipv4ipv6.net/blog/how-to-check-if-a-given-ip-address-is-ipv4-or-ipv6-in-csharp/</id>
    <title>How to Check if a Given IP Address is IPv4 or IPv6 in C#</title>
    <updated>2024-02-09T02:04:10Z</updated>
    <published>2024-02-08T19:50:31Z</published>
    <link href="https://www.ipv4ipv6.net/blog/how-to-check-if-a-given-ip-address-is-ipv4-or-ipv6-in-csharp/" />
    <author>
      <name>test@example.com</name>
      <email>www.ipv4ipv6.net</email>
    </author>
    <category term="ipv6" />
    <category term="csharp" />
    <content type="html">&lt;p&gt;There are various ways to check if an IP address is IPv4 or IPv6.&amp;nbsp;&lt;/p&gt;
&lt;pre class="language-markup"&gt;&lt;code&gt;Example 1: Using IPAddress.TryParse() Method
Example 2: Using Regex
Example 3: UsingSystem.Net.IpAddress&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;System.Net.IpAddress can be used to check whether it is IPV4 or IPV6 address.&lt;/p&gt;
&lt;p&gt;Add Namespaces&lt;/p&gt;
&lt;pre class="language-csharp"&gt;&lt;code&gt;using System;
using System.Net;
using System.Net.Sockets;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;use IPAddress.Parse(ipv6address)&lt;/p&gt;
&lt;pre class="language-csharp"&gt;&lt;code&gt;var ipv6address = this._httpContextAccessor.HttpContext.Connection.RemoteIpAddress.ToString();

var headers = this._httpContextAccessor.HttpContext.Request.Headers;

if (headers.ContainsKey("X-Forwarded-For"))
{
    ipv6address = headers["X-Forwarded-For"].ToString().Split(',', StringSplitOptions.RemoveEmptyEntries)[0];
}

ipv6address = headers["CF-Connecting-IP"].ToString();

IPAddress address = IPAddress.Parse(ipv6address); /* https://learn.microsoft.com/en-us/dotnet/api/system.net.ipaddress.isloopback?view=net-8.0 */

var isipv6address = false;

if (address.AddressFamily == AddressFamily.InterNetworkV6)
    isipv6address = true;
else
   if (IPAddress.IsLoopback(address) &amp;amp;&amp;amp; address.AddressFamily == AddressFamily.InterNetwork)
    isipv6address = false;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;source:&lt;a href="https://learn.microsoft.com/en-us/dotnet/api/system.net.ipaddress.isloopback?view=net-8.0"&gt;https://learn.microsoft.com/en-us/dotnet/api/system.net.ipaddress.isloopback?view=net-8.0&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;useful links&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.tutorialsrack.com/articles/413/how-to-check-if-a-given-ip-address-is-ipv4-or-ipv6-in-csharp"&gt;https://www.tutorialsrack.com/articles/413/how-to-check-if-a-given-ip-address-is-ipv4-or-ipv6-in-csharp&lt;/a&gt;&lt;/p&gt;</content>
  </entry>
  <entry>
    <id>https://www.ipv4ipv6.net/blog/Get-User-IP-Address-ASP.NET-Core-Web-API/</id>
    <title>How to Get Client User IP Address In ASP.NET Core Web API</title>
    <updated>2024-02-09T01:53:19Z</updated>
    <published>2024-02-08T19:19:19Z</published>
    <link href="https://www.ipv4ipv6.net/blog/Get-User-IP-Address-ASP.NET-Core-Web-API/" />
    <author>
      <name>test@example.com</name>
      <email>www.ipv4ipv6.net</email>
    </author>
    <category term="ipv6" />
    <category term="csharp" />
    <content type="html">&lt;p&gt;How to Get User IP Address In ASP.NET Core Web API.&lt;/p&gt;
&lt;p&gt;This page summarize information about how to retrieve client and server IP address in ASP.NET Core&amp;nbsp; web applications.&amp;nbsp;&lt;/p&gt;
&lt;h1&gt;Get client user IP address&lt;/h1&gt;
&lt;p&gt;Client IP address can be retrieved via HttpContext.Connection object. This properties exist in both Razor page model and ASP.NET MVC controller. Property RemoteIpAddress is the client IP address. The returned object (System.Net.IpAddress) can be used to check whether it is IPV4 or IPV6 address.&lt;/p&gt;
&lt;pre class="language-csharp"&gt;&lt;code&gt;public string ClientIPAddr { get; private set; }

public async Task&amp;lt;IActionResult&amp;gt; OnGetAsync()
{
	// Retrieve client IP address through HttpContext.Connection
	ClientIPAddr = HttpContext.Connection.RemoteIpAddress?.ToString();
	return Page();
}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h1&gt;Access HttpContext in ASP.NET Core&lt;/h1&gt;
&lt;p&gt;Refer to documentation &lt;a href="https://learn.microsoft.com/en-us/aspnet/core/fundamentals/http-context?view=aspnetcore-8.0"&gt;Access HttpContext in ASP.NET Core | Microsoft Docs&lt;/a&gt; to understand the details of accessing HttpContext in ASP.NET Core applications.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h1&gt;For requests forwarded by proxy servers&lt;/h1&gt;
&lt;p&gt;This means the client IP of HttpContext.Connection.RemoteIpAddress is the IP address of the proxy servers.&lt;/p&gt;
&lt;p&gt;If the HTTP request is first processed by a reverse proxy server, the only approach to get the client IP address in server side is to look into the forwarded headers if there are any. For example, Retrieve Client IP Address in cloudflare with HTTP Ingress.&lt;/p&gt;
&lt;pre class="language-csharp"&gt;&lt;code&gt;    var headers = this._httpContextAccessor.HttpContext.Request.Headers;

    if (headers.ContainsKey("X-Forwarded-For"))
    {
        ipv6address = headers["X-Forwarded-For"].ToString().Split(',', StringSplitOptions.RemoveEmptyEntries)[0];
    }

    ipv6address = headers["CF-Connecting-IP"].ToString();
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</content>
  </entry>
  <entry>
    <id>https://www.ipv4ipv6.net/blog/Public-IP-Address-API/</id>
    <title>A Simple Public IP Address API</title>
    <updated>2024-02-09T03:22:51Z</updated>
    <published>2024-02-08T18:39:52Z</published>
    <link href="https://www.ipv4ipv6.net/blog/Public-IP-Address-API/" />
    <author>
      <name>test@example.com</name>
      <email>www.ipv4ipv6.net</email>
    </author>
    <category term="ip address api" />
    <content type="html">&lt;p&gt;API Usage&lt;/p&gt;
&lt;p&gt;Using https://www.ipv4ipv6.net/is ridiculously simple. You have three options. You can get your public IP directly (in plain text), you can get your public IP in JSON format, or you can get your public IP information in JSONP format (useful for Javascript developers).&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Code samples 1&lt;/p&gt;
&lt;p&gt;C#&lt;/p&gt;
&lt;pre class="language-csharp"&gt;&lt;code&gt;var httpClient = new HttpClient();
var ip = await httpClient.GetStringAsync("https://www.ipv4ipv6.net/api/IpAddress/");
Console.WriteLine($"My public IP address is: {ip}");&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;output&lt;/p&gt;
&lt;pre class="language-markup"&gt;&lt;code&gt;My public IP address is:98.28.39.165&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Code samples 2&lt;/p&gt;
&lt;pre class="language-csharp"&gt;&lt;code&gt;using System;
using System.Net;

namespace Ipify.Examples {
    class Program {
        public static void Main (string[] args) {
            WebClient webClient = new WebClient();
            string publicIp = webClient.DownloadString("https://www.ipv4ipv6.net/api/IpAddress/");
            Console.WriteLine("My public IP Address is: {0}", publicIp);
        }
    }
}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;table class="table api-usage-table overflow-auto-table"&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;td style="width: 231px;"&gt;API URL&lt;/td&gt;
&lt;td style="width: 104.281px;"&gt;Response Type&lt;/td&gt;
&lt;td style="width: 161px;"&gt;Sample Output (IPv4)&lt;/td&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr class="empty-tr-line"&gt;
&lt;td style="width: 231px;"&gt;&amp;nbsp;&lt;/td&gt;
&lt;td style="width: 104.281px;"&gt;&amp;nbsp;&lt;/td&gt;
&lt;td style="width: 161px;"&gt;&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="width: 231px;"&gt;&lt;code&gt;https://www.ipv4ipv6.net/api/IpAddress/&lt;/code&gt;&lt;/td&gt;
&lt;td style="width: 104.281px;"&gt;&lt;code&gt;text&lt;/code&gt;&lt;/td&gt;
&lt;td style="width: 161px;"&gt;&lt;code&gt;98.207.254.136&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="width: 231px;"&gt;&lt;code&gt;https://www.ipv4ipv6.net/api/IpAddress/?format=json&lt;/code&gt;&lt;/td&gt;
&lt;td style="width: 104.281px;"&gt;&lt;code&gt;json&lt;/code&gt;&lt;/td&gt;
&lt;td style="width: 161px;"&gt;&lt;code&gt;{"ip":"98.207.254.136"}&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;</content>
  </entry>
  <entry>
    <id>https://www.ipv4ipv6.net/blog/What-is-IPv6-part5/</id>
    <title>How much of the world uses IPv6?</title>
    <updated>2024-02-09T01:55:50Z</updated>
    <published>2024-02-08T17:40:35Z</published>
    <link href="https://www.ipv4ipv6.net/blog/What-is-IPv6-part5/" />
    <author>
      <name>test@example.com</name>
      <email>www.ipv4ipv6.net</email>
    </author>
    <category term="ipv6" />
    <content type="html">&lt;p&gt;Since it's been around longer, IPv4 is more widely used, but IPv6 adoption is growing as addresses on the older IP run out. According to Google data, around 40% of the world has adopted IPv6 as of June 2023. Google also breaks down that data by country, which varies pretty widely. The U.S., for example, is at over 50% adoption while Australia is at just over 29%, Sweden is at 19%, and Argentina is at 18.4%.&lt;/p&gt;</content>
  </entry>
  <entry>
    <id>https://www.ipv4ipv6.net/blog/What-is-IPv6-part4/</id>
    <title>Is IPv4 faster than IPv6?</title>
    <updated>2024-02-08T17:43:00Z</updated>
    <published>2024-02-08T17:39:13Z</published>
    <link href="https://www.ipv4ipv6.net/blog/What-is-IPv6-part4/" />
    <author>
      <name>test@example.com</name>
      <email>www.ipv4ipv6.net</email>
    </author>
    <category term="ipv6" />
    <content type="html">&lt;p&gt;Most of the time, IPv6 doesn't appear to be much faster than IPv4. Cloud-based tech company Sucuri tested the two IPs against one another in multiple scenarios and didn't appear to find much of a difference in speed.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;There are some situations where IPv6 seems to be faster, though. Facebook ran a test back in 2015, for example, and determined its website loaded 10-12% faster on IPv6. The large number of variables between the two makes it difficult to see which is faster without extensive testing in a highly controlled environment.&lt;/p&gt;</content>
  </entry></feed>