1. 程式人生 > >蘋果稽核IPv6被拒,阿里雲伺服器配置

蘋果稽核IPv6被拒,阿里雲伺服器配置

蘋果上架要求:要求支援IPV6only(因為阿里雲主機沒有IPV6only)

確認IPV6是否開啟:

方式1:使用ifconfig檢視自己的IP地址是否含有IPv6地址。

方式2.檢視服務監聽的IP中是否有IPv6格式的地址。(netstat -tuln)

開啟IPV6:

vim /etc/sysctl.conf

vim /etc/modprobe.d/disable_ipv6.conf

 

vim /etc/sysconfig/network

至此ipv6的伺服器端支援已經完成,重啟伺服器測試是否支援ipv6,重啟後, ifconfig檢視ipv6的資訊,有看到有關IPV6的輸出就可以

 

新增ipv6隧道:

1. 註冊Tunnel broker

https://www.tunnelbroker.net/
註冊很容易,就不講了,註冊需要郵箱驗證,,gmail、163能收得到認證郵件,qq還是一樣收不到

 2.建立通道“Create Regular Tunnel”

填寫雲伺服器ip以及選擇預設的隧道節點,點選Create Tunnel建立。填寫ip都,如果出現“IP is a potential tunnel endpoint.”則證明可以新增ipv6隧道,一般隧道節點系統已經預設分配,可以手動選擇,大家可以在自己的雲伺服器上分別ping一下這些ip,選時延低的。

3.建立ipv6隧道及路由

到下一頁面切換到Example configurations選項卡,如果你的VPS是centOS/Debian這些常見Linux的話,下拉選單選擇Linux-route2,出現了設定的命令,複製到自己的雲伺服器上執行。

 

4.測試ipv6

新增ipv6的dns伺服器,在最後新增nameserver 2001:4860:4860::8888,nameserver 2001:4860:4860::8844谷歌的ipv6 dns伺服器

複製程式碼
# vim /etc/resolv.conf
options timeout:1 attempts:1 rotate
nameserver x.x.x.x
nameserver x.x.x.x
nameserver 2001:4860:4860::8888
nameserver 2001:4860:4860::8844
複製程式碼複製程式碼
# ping6 -c 5 ipv6.google.com
PING ipv6.google.com(tsa03s01
-in-x0e.1e100.net) 56 data bytes 64 bytes from tsa03s01-in-x0e.1e100.net: icmp_seq=1 ttl=55 time=25.5 ms 64 bytes from tsa03s01-in-x0e.1e100.net: icmp_seq=2 ttl=55 time=25.5 ms 64 bytes from tsa03s01-in-x0e.1e100.net: icmp_seq=3 ttl=55 time=33.1 ms 64 bytes from tsa03s01-in-x0e.1e100.net: icmp_seq=4 ttl=55 time=25.5 ms 64 bytes from tsa03s01-in-x0e.1e100.net: icmp_seq=5 ttl=55 time=25.4 ms --- ipv6.google.com ping statistics --- 5 packets transmitted, 5 received, 0% packet loss, time 4031ms rtt min/avg/max/mdev = 25.473/27.040/33.180/3.073 ms
複製程式碼

阿里雲服務配置

 代理配置好之後伺服器中執行ifconfig命令,找到he-ipv6虛擬網絡卡,找到scope為Global 的ipv6地址,在阿里雲後臺配置AAAA記錄為上面提到的ipv6地址

驗證是否生效:

http://ipv6-test.com/validate.php,輸入你的域名後,如果AAAA DNS record能正常解析到你的IPv6地址,說明一切OK。

原理:http://www.solve6.com