IPv6设置支持IOS审核

https://www.tunnelbroker.net/




点击创建以后出现如下界面


检查服务器是否开启IPv6(表示没有开启)http://www.jianshu.com/p/2f6620e5a4f0

vim /etc/sysctl.conf #添加如下三行 sysctl -p
net.ipv6.conf.all.disable_ipv6 = 0
net.ipv6.conf.default.disable_ipv6 = 0
net.ipv6.conf.lo.disable_ipv6 = 0
vim /etc/modprobe.d/disable_ipv6.conf #options ipv6 disable=1改为options ipv6 disable=0
alias net-pf-10 off
options ipv6 disable=0

vim /etc/sysconfig/network 添加
NETWORKING_IPV6=yes
重启网络systemctl restart network 可以看出已经支持IPv6

服务器执行如下命令上面获取的:
modprobe ipv6
ip tunnel add he-ipv6 mode sit remote 216.218.221.6 local 39.107.13.70 ttl 255
ip link set he-ipv6 up
ip addr add 2001:470:18:107b::2/64 dev he-ipv6
ip route add ::/0 dev he-ipv6
ip -f inet6 addr

DNS控制台解析

测试可以看出已经解析

然后在这台服务器上面大家nginx支持IPv6代理即可
user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log;
pid /run/nginx.pid;
include /usr/share/nginx/modules/.conf;
events {
worker_connections 1024;
}
http {
log_format main '$remote_addr - $remote_user [$time_local] "$http_host" "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" $http_x_forwarded_for '
'"$upstream_addr" "$upstream_status" "$upstream_response_time" "$request_time"';
access_log /etc/nginx/logs/access.log main;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
include /etc/nginx/mime.types;
default_type application/octet-stream;
include /etc/nginx/conf.d/
.conf;
}
stream {
upstream tcp_proxy {
hash $remote_addr consistent; #远程地址做个hash
server slbIP:80;
}
upstream tcp_proxy_443 {
hash $remote_addr consistent; #远程地址做个hash
server slbIP:443;
}
server {
listen [::]:80;
listen 80;
proxy_connect_timeout 1s;
proxy_timeout 10s; #后端连接超时时间
proxy_pass tcp_proxy;
}
server {
listen [::]:443;
listen 443;
proxy_connect_timeout 1s;
proxy_timeout 10s; #后端连接超时时间
proxy_pass tcp_proxy_443;
}
}

https://help.aliyun.com/document_detail/74271.html

###############
ipv6测试
dig +nocmd +nostats ipv6.n-orange.com AAAA

¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥
就是代码里面的域名需要解析4A记录
默认一个域名是可以解析A记录和4A记录的


另外一种方案:
slb(ipv6地址) 代理nginx 即可
然后4A记录解析到ipv6的地址

转载于:https://blog.51cto.com/wsxxsl/2044131

你可能感兴趣的:(IPv6设置支持IOS审核)