如何获取免费的 .arpa 域名
How to get a free .arpa domain

原始链接: https://hawksley.dev/blog/get-free-arpa-domain

虽然 `.arpa` 顶级域名是为互联网基础设施保留的,且禁止公共注册,但这篇指南介绍了一种利用 `ip6.arpa` 在该域名下托管网站的巧妙变通方法。 该过程涉及“滥用”反向 DNS 查询基础设施: 1. **获取 IPv6 前缀:** 使用 Hurricane Electric 的 Tunnelbroker 服务获取一个 IPv6 地址块。注册过程几乎不需要验证,让你能够绕过严格的要求。 2. **计算域名:** 将你获得的 IPv6 前缀转换为所需的反向查询字符串格式(例如 `0.4.1.0.9.0.f.1.0.7.4.0.1.0.0.2.ip6.arpa`)。 3. **配置 DNS:** 使用像 deSEC 这样灵活的 DNS 提供商来托管记录,因为许多主流提供商会拒绝 `.arpa` 域名。将隧道的反向 DNS (rDNS) 委派给 deSEC。 4. **部署站点:** 使用像 Surge 这样的托管服务发布内容。由于传统的 SSL/TLS 证书颁发机构通常拒绝为 `.arpa` 域名颁发证书,指南建议使用非 HTTPS 托管。 5. **完成:** 在 DNS 设置中创建一个 CNAME 记录,指向你使用 Surge 托管的站点。 遵循这些步骤,你就可以成功在保留的基础设施顶级域名上托管网站。

这篇 Hacker News 讨论聚焦于一篇关于如何通过 Hurricane Electric (HE) 获取免费 `.arpa` 域名的博文。 讨论的主要要点包括: * **使用要求:** 用户指出,如果 IPv6 前缀没有被积极路由,HE 可能会收回这些处于非活跃状态的前缀。一位用户讲述了自己在中断设置隧道多年后,前缀被收回的经历。 * **信誉问题:** 一个反复被提及的担忧是,HE 的 IPv6 隧道经常被标记为恶意来源,导致网站将源自这些隧道的流量视为机器人行为。 * **技术灵活性:** 评论者澄清,尽管 `.arpa` 通常与 PTR(反向 DNS)查询相关联,但它像其他域名一样运作。用户可以在其区域内托管各种记录,例如 A、AAAA 或 TXT 记录。 * **稳定性:** 参与者普遍提醒,这些免费分配的域名不如传统的商业注册域名稳定或可靠。
相关文章

原文

This post is also available over on get-arpa-domain.0.4.1.0.9.0.f.1.0.7.4.0.1.0.0.2.ip6.arpa (opens in a new tab)!

On the internet, .arpa is the top level domain reserved for critical internet infrastructure. It isn’t open to public registration, so you can’t own mysite.arpa sadly. However, this isn’t the only way to reserve some real-estate on .arpa - there are many different services that you can abuse to get your own DNS records, and hence your own website.

I first learned about this through a blog post explaining e164.arpa (opens in a new tab), an old scheme where you could query information about phone numbers using DNS. If you’re German or Czech, you can sign up and control the DNS records that correspond to your phone number!

For the rest of the world, our phone numbers aren’t open to registration, so that isn’t an option. Instead, we can use a similar scheme under ip6.arpa. This is reserved for “reverse DNS lookups”, where you can turn IPv6 addresses into domain names, instead of the other way around. However, nothing in the specification stops us from using it for other purposes, so let’s do so!

Hurricane Electric offers really simple registration for an IPv6 address and its ip6.arpa records through tunnelbroker.net, so let’s use them. Their site is a bit of a relic, but it is fully functional.

Hurricane Electric Tunnelbroker home page

Sign up for a new account, feel free to provide fake information as it doesn’t verify any of it. Verify your email, and then in the left sidebar select “Create Regular Tunnel”.

Tunnelbroker dashboard

It will ask for an IPv4 endpoint, though for our goal it doesn’t matter which address we choose. The IP needs to respond to ICMP Echoes (a.k.a. pings), but there’s no verification that you control the provided IPv4 address. Just use ping -4 domainname.com on a few websites until you find an IPv4 address that it will accept. It seems most sites that are behind CDNs don’t work, so try older sites first. Here I pinged news.ycombinator.com and received the ip address 209.216.230.207.

Terminal pinging news.ycombinator.com

This seemed to pass Hurricane Electric’s form validation, so that’s all that matters. It also asks you to select a Tunnel Server, but similarly this doesn’t matter for our purposes - any will do.

Tunnelbroker create new tunnel form

Once you’ve created a tunnel, take note of the “Routed IPv6 Prefix”. Here mine is 2001:470:1f09:140::/64, but the only part we need is 2001:470:1f09:140 before the trailing colons.

Tunnelbroker tunnel details

Pad each section with zeroes to get four groups of four characters: 2001:0470:1f09:0140.

Then place a dot between each character: 2.0.0.1.0.4.7.0.1.f.0.9.0.1.4.0.

Finally, reverse the characters and append .ip6.arpa to get your own domain name: 0.4.1.0.9.0.f.1.0.7.4.0.1.0.0.2.ip6.arpa!

Next, we need to set up DNS records for the domain. When I last tried this, Cloudflare didn’t seem to accept the domain, but deSEC handled it perfectly, so that is what we’ll be using. Sign up for a deSEC account and provide the .ip6.arpa address you calculated from earlier.

deSEC signup form

Once added, return to Tunnelbroker and change your rDNS delegations to that of deSEC.

Tunnelbroker rDNS delegations

We have a domain, we have DNS, so the very last step is a web host. Out of the options, Surge is very straightforward and doesn’t enforce HTTPS. This is handy because many (though not all) certificate authorities refuse to serve .arpa domains, hence getting HTTPS working can be quite challenging. It isn’t impossible, though, but it is beyond the scope of this guide.

Create a new directory and an index.html file. You can put whatever content you’d like inside the index.html, I decided to put a bare-bones replica of this blog post (opens in a new tab).

Install npm or bun if you haven’t already, and run surge.

bunx surge . subdomain.domain.ip6.arpa
# or alternatively
npx surge . subdomain.domain.ip6.arpa

Here, “subdomain” is a subdomain of your choice, and “domain” is the ip6.arpa address you calculated earlier. If it asks, make a free account as part of signup. Make note of the address it gives near the end of its output.

Surge command bunx

Surge command response

Lastly, return to deSEC and create a CNAME record pointing to the surge.sh address.

deSEC creating CNAME record

Once DNS finishes propagating, you can now visit your domain and see your site! You now have a fully functional website running off a reserved infrastructure TLD.

联系我们 contact @ memedata.com