One dns name to route traffic to IPv4 and IPv6 address for different clients

Hello,

This is not an openwrt specific question. But still would like to ask here as there are many experts here.

From my ISP I only got IPv6 address, which can be used to access my systems outside home. (IPv4 is CGNAT)
I host a website at my home with above IPv6 address.
I got another dual stack VPS in cloud. Where I setup NGINX proxy pass to forward traffic to below dns.

If I setup the DNS name as below,

Where dns will send requests to in below scenarios?
someone access my dns name from IPv4 only address?
someone access my dns name from IPv6 only address?
someone access my dns name from dual stack?

Note: I know I can remove the IPv6 address from the dns name, send all traffic to VPS and let reverse proxy forward to my home IPv6. I am trying to reduce some latency for IPv6 capable clients.

It depends on the client querying the DNS, whether it will ask for A or AAAA record of the hostname.
In case it requests both, usually the IPv6 has precedence.

1 Like