use*_*492 2 domain-name-system ipv6 bind nameserver
我目前有 2001:1973:2303::/48 分配给我,我将分配 /64 给客户
我想为 /48 设置 1 个区域文件,我可以在其中将查询指向/重定向到不同的名称服务器。
示例(预期效果)
2001:1973:2303:1234::/64 -> ns1.example.com, ns2.example.com
2001:1973:2303:2345::/64 -> ns99.example2.com, ns100.example2.com
2001:1973:2303:4321::/64 -> ns1.cust1.com, ns2.cust1.com
Run Code Online (Sandbox Code Playgroud)
当前的 /48 区域文件
$TTL 3h
$ORIGIN 3.0.3.2.3.7.9.1.1.0.0.2.ip6.arpa.
@ IN SOA ns3.example.ca. ns4.example.ca. (
2011071030 ; serial
3h ; refresh after 3 hours
1h ; retry after 1 hour
1w ; expire after 1 week
1h ) ; negative caching TTL of 1 hour
IN NS ns3.example.ca.
IN NS ns4.example.ca.
1234 IN NS ns1.example.com.
NS ns2.example.com.
2345 IN NS ns99.example2.com.
NS ns100.example2.com.
4321 IN NS ns1.cust1.com.
NS ns2.cust1.com.
Run Code Online (Sandbox Code Playgroud)
我哪里错了?我的要求至少对我来说很简单。就防火墙而言,我想重定向流量
客户端查询 2001:1973:2303:4321::1 -> ns3.example.ca 看到请求并将查询重定向到 ns1.cust1.com -> ns1.cust1.com 用 omg.itworks.ca 回答查询(提供ns1.cust1.com 已正确配置。
在您的示例中,您将地址的最后一部分写为一个数字。在反向 DNS 中,您必须单独写入每个十六进制数字(并在必要时包括前导零。
要更正和扩展您的示例:
$TTL 3h
$ORIGIN 3.0.3.2.3.7.9.1.1.0.0.2.ip6.arpa.
@ IN SOA ns3.example.ca. ns4.example.ca. (
2011071030 ; serial
3h ; refresh after 3 hours
1h ; retry after 1 hour
1w ; expire after 1 week
1h ) ; negative caching TTL of 1 hour
NS ns3.example.ca.
NS ns4.example.ca.
4.3.2.1 IN NS ns1.example.com.
NS ns2.example.com.
5.4.3.2 IN NS ns99.example2.com.
NS ns100.example2.com.
1.2.3.4 IN NS ns1.cust1.com.
NS ns2.cust1.com.
; This would be for 2001:1973:2303:1::/64
1.0.0.0 IN NS ns1.example.org.
NS ns2.example.org.
; This would be for 2001:1973:2303:10::/64
0.1.0.0 IN NS ns1.example.org.
NS ns2.example.org.
; This would be for 2001:1973:2303:100::/64
0.0.1.0 IN NS ns1.example.org.
NS ns2.example.org.
; This would be for 2001:1973:2303:1000::/64
0.0.0.1 IN NS ns1.example.org.
NS ns2.example.org.
Run Code Online (Sandbox Code Playgroud)
确定地址的完整反向 DNS 名称的一个非常有用的工具是sipcalc
:
$ sipcalc -r 2001:1973:2303:ab::cafe
-[ipv6 : 2001:1973:2303:ab::cafe] - 0
[IPV6 DNS]
Reverse DNS (ip6.arpa) -
e.f.a.c.0.0.0.0.0.0.0.0.0.0.0.0.b.a.0.0.3.0.3.2.3.7.9.1.1.0.0.2.ip6.arpa.
-
Run Code Online (Sandbox Code Playgroud)