HostHatch IPv6 配置

并不需要用面板的配置,那个配置有局限性,比如末段IP只能是四位,不过不在面板做不了RDNS.

HostHatch的IPv6网关都是BGP网段的第1个地址即2a01:6f0:ffff::1 (阿姆斯特丹),其他地域也能推断出来,而分配给你的地址是/64,比如我是2a01:6f0:ffff:d6::/64,那么我的地址可用范围就是2a01:06f0:ffff:00d6:0000:0000:0000:0000->2a01:06f0:ffff:00d6:ffff:ffff:ffff:ffff之间,为了固定且规范,可以用EUI64,看起来会更舒服.

通过CURL大法,可以提交出他规定格式的IP.

添加IP:

curl 'https://manage.hosthatch.com/api/v1/server/[服务器ID]/addipv6' \
  -H 'authorization: Bearer [浏览器F12提取]' \
  -H 'content-type: application/json;charset=UTF-8' \
  --data-raw '{"subnet":"2a01:6f0:ffff:d6::/64","ipaddress":":aaaa:bbbb:cccc:dddd"}' 

添加RDNS(不设置domain就是删除):

curl 'https://manage.hosthatch.com/api/v1/server/[服务器ID]/reversedns' \
  -H 'authorization: Bearer [浏览器F12提取]' \
  -H 'content-type: application/json;charset=UTF-8' \
  --data-raw '{"subnet":"2a01:6f0:ffff:d6::/64","ipaddress":"2a01:6f0:ffff:d6:aaaa:bbbb:cccc:dddd/64","domain":"example.com"}'

BUG Time:

reversedns 并没有完整的鉴权,所以,他可以给任意IP进行RDNS设置.

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注