DeLegacy: Forcing IPv6 at Scale
Mynacol
Gulaschprogrammiernacht 24 (GPN24) · Day 2 · ZKM Medientheater
Overview
In "DeLegacy: Forcing IPv6 at Scale," speaker Mynacol presents a novel and somewhat subversive approach to accelerating IPv6 adoption across the internet. The talk addresses the persistent challenge of many websites remaining IPv4-only, even when hosted on IPv6-capable infrastructure like major Content Delivery Networks (CDNs). Mynacol, a PhD student at M University researching network security, introduces the DeLegacy project, which aims to enable native IPv6 connectivity for clients by manipulating DNS responses, effectively "forcing" IPv6 for previously IPv4-only domains without requiring any changes on the server side.

Key moments
- 1:00 Problem: IPv6 adoption stalled, Cloudflare example
- 2:30 Core concept: Rewriting DNS CNAMEs for IPv6
- 7:50 Implementing CNAME rewrites with DNS Response Policy Zones
- 14:00 Using DNS64 to translate IPv4 addresses to IPv6
- 20:30 Unexpected side effects and breakage from forced IPv6
- 23:00 Tools and methods for discovering new IPv6 rules
- 32:00 Evaluation: Impact on IPv6 adoption across major CDNs
- 50:50 Deep dive into GitHub's lack of IPv6 support
DeLegacy: Forcing IPv6 at Scale
Speakers: Mynacol, PhD Student, M University
Conference: GPN24
YouTube: https://www.youtube.com/watch?v=uQBsCZEMY_U
Overview
In "DeLegacy: Forcing IPv6 at Scale," speaker Mynacol presents a novel and somewhat subversive approach to accelerating IPv6 adoption across the internet. The talk addresses the persistent challenge of many websites remaining IPv4-only, even when hosted on IPv6-capable infrastructure like major Content Delivery Networks (CDNs). Mynacol, a PhD student at M University researching network security, introduces the DeLegacy project, which aims to enable native IPv6 connectivity for clients by manipulating DNS responses, effectively "forcing" IPv6 for previously IPv4-only domains without requiring any changes on the server side.
The core premise of DeLegacy is to empower clients to connect to websites via IPv6 by rewriting DNS records at the resolver level. This strategy targets common CDN configurations, where a site might lack AAAA records but the underlying CDN infrastructure inherently supports IPv6. By doing so, DeLegacy not only improves IPv6 accessibility for end-users but also implicitly pressures CDN operators and their customers to ensure their services are robustly prepared for IPv6 traffic, even if they haven't explicitly enabled it. The project provides a practical framework for network operators and individuals to contribute to the global transition to IPv6.
Background
▶ Watch: Problem: IPv6 adoption stalled, Cloudflare example (1:00)
The internet's transition to IPv6 has been a long and arduous journey. While IPv6 client usage, as measured by Google, now stands at approximately 50%, a significant portion of the web, particularly on the server side, remains anchored to IPv4. This discrepancy creates a bottleneck for universal IPv6 adoption, as clients often fall back to IPv4 even when their network supports IPv6, simply because the destination server doesn't advertise an AAAA record. This problem is particularly acute for websites hosted on large CDNs. For instance, Cloudflare, which serves around 20% of the internet, has supported IPv6 since 2012, yet many sites leveraging its services still do not expose IPv6 addresses.
The primary reason for this inertia often stems from legacy configurations, enterprise IT policies, or a simple lack of motivation to update systems that are perceived to be "working fine" on IPv4. Many site operators, even those on modern CDN platforms, might not bother enabling AAAA records, either due to oversight, fear of breaking existing setups, or the belief that IPv4 will suffice for the foreseeable future. Mynacol acknowledges prior work in this area, specifically mentioning Muru's "IPv6 DNS server," a NodeJS-based custom DNS resolver that implemented similar logic for various CDNs. The DeLegacy project builds upon this foundation, aiming to standardize and port these capabilities to widely used DNS resolvers like Bind and Unbound, making the approach more accessible and maintainable. The goal is to bridge the gap between IPv6-ready infrastructure and IPv4-only accessible content, pushing the internet further towards native IPv6.
Key Findings
▶ Watch: Implementing CNAME rewrites with DNS Response Policy Zones (7:50)
The DeLegacy project demonstrates several key findings and contributions in its effort to accelerate IPv6 adoption:
- Feasibility of Client-Side IPv6 Forcing: The project conclusively shows that it is possible to force IPv6 connectivity for a substantial number of IPv4-only websites by strategically rewriting DNS responses at the client's recursive resolver. This circumvents the need for server-side modifications, which are often beyond an end-user's or network operator's control.
- Leveraging Standard DNS Mechanisms: Mynacol highlights the effective use of DNS Response Policy Zones (RPZ) as a portable and standardized method for rewriting DNS responses. RPZ allows matching on query names and introducing local data, effectively changing a CNAME record to point to an IPv6-enabled alternative on the same CDN.
- Addressing Complex Delegation Patterns: For CDNs like Akamai, which use more intricate delegation involving subdomain trees, the project adapted DNAME records. While DNAMEs are not directly supported within RPZ due to precedence issues, a workaround involving setting them up as primary zones within the DNS resolver proves effective.
- Innovative Use of DNS64: A significant finding is the application of DNS64 (specified in RFC 6147) not for private network translation, but to generate global unicast IPv6 addresses for CDNs that are known to respond to any IPv6 address within a specific prefix. This technique is particularly powerful for sites using static IP addresses, CNAME flattening, or A name aliases, which cannot be easily addressed by CNAME rewriting. Cloudflare and AWS CloudFront are prime examples where DNS64 achieves near 100% IPv6 enablement for previously IPv4-only sites.
- Quantifiable Impact on IPv6 Adoption: Through an evaluation against the Tranco list of 6.8 million domains, DeLegacy demonstrated a measurable increase in AAAA record availability. Overall, the methods introduced by DeLegacy added AAAA records for approximately 10% of the domains tested. For specific CDNs, the impact is even more dramatic, with Cloudflare and AWS CloudFront showing substantial increases in IPv6 accessibility, largely due to the DNS64 approach.
- Revealing Server-Side IPv6 Readiness and Flaws: A crucial, albeit "subversive," finding is that forcing IPv6 traffic often exposes underlying issues or unimplemented IPv6 support on the server side. Examples include HTTP 502 errors, redirect loops, or explicit IPv6 blocking messages (like from X.com). This effectively compels service operators to address their IPv6 capabilities, even if unintended.
Technical Deep Dive
▶ Watch: Unexpected side effects and breakage from forced IPv6 (20:30)
The DeLegacy project employs a multi-pronged technical approach to achieve its goal of forcing IPv6 at scale, primarily by manipulating DNS responses. Each method targets different ways websites delegate their content, from standard CNAMEs to static IP addresses.
CNAME Rewriting via Response Policy Zones (RPZ)
The first and most broadly applicable method involves rewriting CNAME records using DNS Response Policy Zones (RPZ). RPZ is a standardized mechanism (supported by major DNS resolvers like Bind, Unbound, Knot, and PowerDNS) that allows administrators to define custom policies for DNS responses. Instead of simply blocking malicious domains, DeLegacy uses RPZ to introduce local data, effectively rewriting the CNAME to an IPv6-enabled alternative.
The process is as follows:
- A client queries for the AAAA record of
example.com. - The recursive DNS resolver, configured with DeLegacy's RPZ rules, sees that
example.comCNAMEs toexample.com.cdn.net. - The RPZ rule matches
*.cdn.cloudflare.net(or a similar pattern for other CDNs). - Instead of returning the original CNAME, the RPZ rule rewrites it to
cloudflare.net.cdn.cloudflare.net(an internal Cloudflare domain known to have AAAA records). - The client then receives the AAAA record for this new, IPv6-enabled CNAME and connects via IPv6.
An example RPZ rule from the project is:
*.cdn.cloudflare.net CNAME cloudflare.net.cdn.cloudflare.net.
Specific domains can be exempted from these rules using RPZ pass through, preventing unintended breakage.
DNAME for Subdomain Trees (Akamai)
For CDNs like Akamai, which often use complex subdomain delegation patterns rather than simple CNAMEs, DeLegacy leverages DNAME records. Akamai's setup often involves CNAME chains like www.nvidia.com CNAMEing to some.akamai.net, which then CNAMEs to an identifier like E33907.akamai.net. While akamai.net domains typically only have A records, a "dual-stack client" (DSCA) variant exists, such as DSCA.edge.net, which offers IPv6.
A DNAME record is similar to a CNAME but delegates an entire subdomain tree. For example, source.net DNAME target.net would cause a query for a.b.source.net to be synthesized as a.b.target.net. This is ideal for Akamai, where the identifier prefix (e.g., E33907) needs to be preserved for certificate validation and correct routing. The desired DNAME rule would be .akamai.net DNAME .DSCA.edge.net.
However, a significant challenge is that DNAMEs are not supported within DNS response policy zones. This is due to unresolved precedence rules between global DNS CNAMEs and RPZ DNAMEs. The workaround implemented by DeLegacy is to introduce these subdomains as primary zones directly in the DNS resolver's configuration. This bypasses the RPZ limitation, allowing the DNAME records to function correctly and provide IPv6 addresses for Akamai-hosted sites.
DNS64 for IP Address Mapping
The most powerful method for catching setups that don't rely on CNAMEs (e.g., static IP addresses, CNAME flattening, or A name aliases) is the innovative use of DNS64. Traditionally, DNS64 (RFC 6147) is used in IPv6-only networks to synthesize IPv6 addresses for IPv4-only destinations, routing them through a NAT64 gateway. DeLegacy, however, applies DNS64 to generate global unicast IPv6 addresses that CDNs like Cloudflare and AWS CloudFront are known to respond to.
The insight here is that some CDNs are configured to answer on any IPv6 address within a specific large prefix (e.g., a /64). DeLegacy identifies these prefixes (e.g., Cloudflare's 2606:4700::/64) and uses DNS64 to map an IPv4 address (e.g., 192.0.2.1) into an IPv6 address within that prefix (e.g., 2606:4700::192.0.2.1).
In Bind, this is configured using Access Control Lists (ACLs) to specify the IPv4 prefixes of the target CDN, followed by a DNS64 rule that defines the IPv6 prefix and constrains it to the ACL.
Example Bind configuration snippet:
A significant limitation of this approach is that only Bind, among the popular resolvers, offers the functionality to restrict DNS64 to specific IPv4 prefixes. Furthermore, it's not possible to exempt specific domain names from DNS64 functionality if they cause issues over IPv6. The only workaround is to knowingly introduce broken AAAA records for those domains, forcing clients to fall back to IPv4 via happy eyeballs, which is not ideal.
Unsupported and Challenging Cases
Despite these techniques, some services remain difficult to force into IPv6. Fastly, for example, uses a complex IPv6 address generation logic involving a Molo 256 hash of the IPv4 address, which cannot be easily translated into a portable DNS server configuration. GitHub.com (github.com) is another notable challenge. While some GitHub subdomains (like raw.githubusercontent.com and GitHub Pages, which use Fastly) support IPv6, the main github.com domain does not. GitHub has its own ASN and even a /29 IPv6 prefix (2001:470:1:18::/29), with some addresses being pingable but not responding on TCP ports. This suggests an internal IPv6 setup that is intentionally firewalled from the public internet, possibly due to concerns about enterprise IP whitelists or ongoing migration efforts to Azure.
Demo / Proof of Concept
▶ Watch: Tools and methods for discovering new IPv6 rules (23:00)
The efficacy and implications of the DeLegacy project were demonstrated through several practical examples and evaluation methods:
Mynacol presented a public recursive resolver available during GPN24 at delegacy.de (port 53, DNS over TLS, DNS over HTTPS), allowing attendees and the public to test the IPv6 forcing mechanisms directly. This resolver incorporated all the tricks discussed: RPZ, DNAMEs via primary zones, and DNS64.
To observe the effects of DeLegacy, users can employ browser add-ons like IPvFoo, which visually indicates whether a primary domain and its included resources are accessed over IPv4 or IPv6. This tool helped Mynacol identify misconfigurations, such as a university GitLab server that was unexpectedly falling back to IPv4, prompting a quick fix by administrators.
For command-line testing, curl offers a convenient way to temporarily resolve a domain to a specific IPv6 address without modifying the host file:
curl --resolve example.com:443:[IPv6_address] https://example.com
The "proof of concept" also highlighted instances where forcing IPv6 led to unexpected but informative breakage:
- IPv6 Bus Podcast: Attempting to access a podcast file resulted in an
HTTP 502 Internal Server Errorwhen an intermediate ad-insertion server was accessed over IPv6. The server likely expected an IPv4 client IP for geo-targeting ads and failed to process the IPv6 address. This particular issue could be exempted in the RPZ case but not with DNS64. - Research Publisher: Accessing a research publisher's website resulted in a redirect loop, with Firefox eventually giving up after 50 redirects. This indicated an inability to handle IPv6 requests properly, again highlighting a server-side misconfiguration or lack of support. Similar to the podcast case, exemptions are possible with RPZ but not DNS64 for Cloudflare-hosted sites.
- X.com (formerly Twitter): When accessed over IPv6, the site responded with a plain text message: "IPv6". This is a humorous yet clear indication of deliberate blocking or non-support for IPv6 traffic, demonstrating that the forced connection was acknowledged, even if rejected.
For users on NixOS, DeLegacy provides an included flake with convenience functions to easily enable RPZ, DNAMEs, and DNS64 configurations for specific CDNs. For other systems, detailed documentation for Bind and Unbound configurations is available, demonstrating how to set up secondary RPZ zones, primary DNAME zones, and DNS64 rules constrained by ACLs. These practical demonstrations underscore DeLegacy's ability to not only increase IPv6 adoption but also expose and, in a way, force the remediation of IPv6-related issues on the server side.
Defensive Implications
▶ Watch: Deep dive into GitHub's lack of IPv6 support (50:50)
The DeLegacy project carries significant defensive implications for various stakeholders, from service operators and CDNs to network defenders and end-users.
For Service Operators and CDNs:
- Awareness of Implicit IPv6 Traffic: Service operators and CDNs can no longer assume that the absence of AAAA records guarantees IPv4-only client traffic. DeLegacy demonstrates that clients, through modified DNS resolvers, can and will connect via IPv6 if the underlying infrastructure permits.
- Robust IPv6 Handling: This implicitly pressures operators to ensure their applications, load balancers, firewalls, and internal systems (e.g., for analytics, ad serving, geo-location) are fully IPv6-compatible. Failures like HTTP 502 errors or redirect loops, as observed in the demo, highlight vulnerabilities in their IPv6 readiness.
- Proactive IPv6 Enablement: If IPv6 support is desired, CDNs and service providers should proactively enable AAAA records by default and ensure seamless operation, rather than leaving it as an optional, manual step for customers. Cloudflare's default IPv6 enablement for new zones is a positive example.
- Explicit Policy Enforcement: If there are legitimate reasons to restrict IPv6 access (e.g., enterprise IP whitelists as mentioned for GitHub), operators must implement explicit IPv6 blocking or error handling, rather than relying on the absence of AAAA records. This prevents unexpected behavior or client-side workarounds.
- CDN Responsibility: CDNs, acting as middlemen, could theoretically prevent such DNS manipulation, similar to how they prevent domain fronting. However, Mynacol notes that there's currently little incentive for them to do so unless customer complaints become widespread. If DeLegacy gains significant traction, CDNs might be forced to re-evaluate their policies.
For Network Defenders and Users:
- Accelerated IPv6 Adoption: Deploying DeLegacy rules on recursive DNS resolvers provides a tangible way to accelerate IPv6 adoption within their networks, improving client connectivity over IPv6 for a wide range of services.
- Visibility into IPv6 Readiness: Tools like
IPvFooempower users and administrators to identify which sites genuinely support IPv6 and which are being "forced," revealing misconfigurations or deliberate IPv6 avoidance. - Advocacy and Contribution: Users can contribute to the DeLegacy project by identifying new IPv4-only sites on CDNs, researching replacement IPv6-enabled domains, and improving documentation. They can also advocate directly to service providers, encouraging them to enable IPv6 support (e.g., creating GitHub issues).
- Careful Deployment and Exemptions: Defenders must be aware of potential breakage for certain sites, especially when using DNS64 without specific domain exemption capabilities. Careful monitoring and the use of RPZ exemptions are crucial to maintain service availability.
- Understanding the "Subversive" Element: The approach forces a reaction from service operators, turning passive IPv4-only setups into active IPv6 interactions. This can be seen as a positive pressure towards a more IPv6-centric internet.
Key Takeaways
- Client-Side DNS Manipulation Accelerates IPv6: The DeLegacy project demonstrates that IPv6 adoption can be significantly accelerated by modifying DNS responses at the client's recursive resolver, making IPv4-only sites accessible over IPv6.
- RPZ, DNAMEs, and DNS64 are Core Techniques: Standard DNS mechanisms like Response Policy Zones (RPZ) for CNAME rewriting, DNAME records (via primary zones workaround) for subdomain trees, and innovative use of DNS64 for IP address mapping are effective tools.
- CDNs are Key Targets for IPv6 Forcing: Major CDNs like Cloudflare and AWS CloudFront are highly susceptible to IPv6 forcing, particularly through DNS64, which can bring their IPv6 adoption for customer sites close to 100%.
- Forcing IPv6 Exposes and Addresses Server-Side Issues: The "subversive" nature of DeLegacy means that forcing IPv6 traffic often reveals server-side misconfigurations, bugs (e.g., HTTP 502, redirect loops), or deliberate blocking, compelling operators to improve their IPv6 readiness.
- Potential for Breakage Requires Caution: While beneficial, the method can cause some websites to break. Careful deployment, monitoring, and the use of domain-specific exemptions (especially for RPZ, less so for DNS64 in Bind) are necessary to maintain user experience.
- Community Contribution is Encouraged: The DeLegacy project is open source and welcomes contributions, including finding new rules, improving documentation, and advocating for IPv6 adoption with service providers.
About the Speaker(s)
Mynacol is a PhD student at M University, where his research focuses on network security, with a particular interest in anonymous communication technologies such as Tor. He is an active participant in the BW net research project and contributes to the university's network operations team. Beyond his academic and research commitments, Mynacol is a notable open-source contributor, maintaining the RSS Bridge project and actively contributing to Nix packages. His work on DeLegacy stems from his deep understanding of network infrastructure and a passion for advancing internet standards like IPv6.
Reviews
Dr. Zero (Offensive Security Researcher) — STRONG ACCEPT
Clever, practical work that actually moves the needle on IPv6 adoption by weaponizing DNS mechanisms against lazy operators. Not a new vulnerability class, but solid engineering with real-world impact and the right amount of chaos energy.
Heather Calloway (CISO) — SOLID
Clever DNS manipulation work that accelerates IPv6 adoption by forcing it client-side. Interesting academic project, but the governance and enterprise risk implications are thin — this is infrastructure advocacy, not security research.