使用 Google 域动态 DNS API,如何创建 A 和 AAAA 记录(IPv4 和 IPv6)?
Using the Google Domains Dynamic DNS API, How Can I Create Both A and AAAA Records (IPv4 and IPv6)?
Google Domains 公开了一个 API to change Dynamic DNS synthetic records。通过使用方案 https://username:password@domains.google.com/nic/update?hostname=subdomain.yourdomain.com&myip=1.2.3.4
向特定 URL 发送 POST(或 GET)请求,Google 理论上将添加 A
记录或 AAAA
使用指定的 IP 地址记录...但不能同时记录。
我似乎无法同时创建 A
记录(针对 IPv4 流量)和 AAAA
记录(针对 IPv6 流量);我只是从一个切换到另一个,就像这样:
roger@computer:~$ curl -6 -X POST -d "hostname=<subdomain>&myip=<ipv4 address>" https://<username>:<password>@domains.google.com/nic/update
good <ipv4 address>
roger@computer:~$ curl -6 -X POST -d "hostname=<subdomain>&myip=<ipv6 address>" https://<username>:<password>@domains.google.com/nic/update
good <ipv6 address>
roger@computer:~$ curl -4 -X POST -d "hostname=<subdomain>&myip=<ipv6 address>" https://<username>:<password>@domains.google.com/nic/update
nochg <ipv6 address>
roger@computer:~$ curl -4 -X POST -d "hostname=<subdomain>&myip=<ipv4 address>" https://<username>:<password>@domains.google.com/nic/update
good <ipv4 address>
所有这些之后,剩下的记录是我的 IPv4 地址的 A
记录,没有 AAAA
记录。
有没有办法为双栈计算机创建两条记录?
看来你做不到。未记录但发布的 A 或 AAAA(或其中最新的一个)将被记录。但是,一旦一个存在,您就可以为另一个创建标准记录,尽管这当然不是动态的。在实际设置动态记录之前,您无法创建标准记录。
https://support.google.com/domains/answer/6147083
Google已经说过了:
Important: Dynamic DNS works with IPv4 and IPv6 addresses, but not at the same time.
Google Domains 公开了一个 API to change Dynamic DNS synthetic records。通过使用方案 https://username:password@domains.google.com/nic/update?hostname=subdomain.yourdomain.com&myip=1.2.3.4
向特定 URL 发送 POST(或 GET)请求,Google 理论上将添加 A
记录或 AAAA
使用指定的 IP 地址记录...但不能同时记录。
我似乎无法同时创建 A
记录(针对 IPv4 流量)和 AAAA
记录(针对 IPv6 流量);我只是从一个切换到另一个,就像这样:
roger@computer:~$ curl -6 -X POST -d "hostname=<subdomain>&myip=<ipv4 address>" https://<username>:<password>@domains.google.com/nic/update
good <ipv4 address>
roger@computer:~$ curl -6 -X POST -d "hostname=<subdomain>&myip=<ipv6 address>" https://<username>:<password>@domains.google.com/nic/update
good <ipv6 address>
roger@computer:~$ curl -4 -X POST -d "hostname=<subdomain>&myip=<ipv6 address>" https://<username>:<password>@domains.google.com/nic/update
nochg <ipv6 address>
roger@computer:~$ curl -4 -X POST -d "hostname=<subdomain>&myip=<ipv4 address>" https://<username>:<password>@domains.google.com/nic/update
good <ipv4 address>
所有这些之后,剩下的记录是我的 IPv4 地址的 A
记录,没有 AAAA
记录。
有没有办法为双栈计算机创建两条记录?
看来你做不到。未记录但发布的 A 或 AAAA(或其中最新的一个)将被记录。但是,一旦一个存在,您就可以为另一个创建标准记录,尽管这当然不是动态的。在实际设置动态记录之前,您无法创建标准记录。
https://support.google.com/domains/answer/6147083
Google已经说过了:
Important: Dynamic DNS works with IPv4 and IPv6 addresses, but not at the same time.