近期联华世纪收到不少有关淘宝网访问限制的客户反馈,即使用BGP_IP时访问淘宝天猫网站的店铺时会出现“访问被拒绝”的提示。联华世纪将在这里为大家分享一些解决的思路和具体方法。
针对客户反馈的这些访问限制问题,联华世纪首先尝试使用多家供应商提供的BGP出口进行测试,均出现该提示,并向上游同步反馈,得到类似的答复:“访问阿里系平台被拦截,需要向阿里申诉,目前华为云端解决不了对端的访问限制”。
至此可以得出相关判断:阿里云平台可能出于某种安全性的考虑对国内BGP_IP进行了访问限制。由于联华世纪部分客户的网络已经稳定运行,且客户内网未使用防火墙等相关设备,可以考虑在联华世纪部署的ROS路由器进行操作。
在与客户沟通后,联华世纪提供相应的解决方案,以下选一种解决思路进行演示分享,供大家参考:将访问淘宝天猫的流量进行nat成电信拨号去访问。
以下是解决故障的步骤分享。
首先将查找访问天猫淘宝网站时会使用的站点资源和IP。
经过排查,访问淘宝天猫时会使用到*.taobao.com;alicdn.com;tmall.com的资源和阿里云的IP。由于使用了CDN加速技术就会导致每个人访问同个网站时所访问IP均不一样,所以无法靠单独的去抓取IP进行匹配。
这时我们从网上找到了阿里云的IP表并进行了去重和归纳。
将IP表导入
也可以添加一些单独的网站采用dns缓存并行的方式。
配置dns
使用脚本抓取catch里的IP并添加到地址库中
local namestr {'*.item.taobao.com';'*.market.m.taobao.com';'*.market.taobao.com';'*.taobao.com';'*.tianyancha.com';'*.tmall.com';'*.www.taobao.com';'*.www.taobao.com.danuoyi.tbcache.com';'*.www.tianyancha.com';'*.www.tmall.com';'*.www.tmall.com.danuoyi.tbcache.com';'*.alicdn.com'}
:local n [:len $namestr]
:for i from=0 to=($n-1) do={
:local websit [:pick $namestr $i]
:foreach i in=[/ip dns cache find name~'$websit' type=A] do={
:local ipadd [/ip dns cache get $i data]
:do {/ip firewall address-list add address=$ipadd list=aliyun } on-error={}
}
}
配置脚本计划
流量匹配
配置到拨号的路由
配置到拨号的NAT
至此,配置完成,客户访问淘宝天猫正常,无异常反馈。
这里附上整理的ROS的阿里源IP地址表:
/ip firewall address-list
add address= 5.181.224.0/23 disabled=no list=aliyun
add address= 8.129.0.0/16 disabled=no list=aliyun
add address= 8.130.0.0/15 disabled=no list=aliyun
add address= 8.132.0.0/15 disabled=no list=aliyun
add address= 8.134.0.0/16 disabled=no list=aliyun
add address= 8.135.0.0/16 disabled=no list=aliyun
add address= 8.136.0.0/16 disabled=no list=aliyun
add address= 8.140.0.0/14 disabled=no list=aliyun
add address= 8.144.0.0/14 disabled=no list=aliyun
add address= 8.208.0.0/16 disabled=no list=aliyun
add address= 8.209.0.0/16 disabled=no list=aliyun
add address= 8.210.0.0/16 disabled=no list=aliyun
add address= 8.211.0.0/17 disabled=no list=aliyun
add address= 8.212.0.0/17 disabled=no list=aliyun
add address= 8.214.0.0/16 disabled=no list=aliyun
add address= 8.215.0.0/16 disabled=no list=aliyun
add address= 8.216.0.0/17 disabled=no list=aliyun
add address= 39.96.0.0/13 disabled=no list=aliyun
add address= 39.104.0.0/14 disabled=no list=aliyun
add address= 39.108.0.0/16 disabled=no list=aliyun
add address= 42.96.128.0/17 disabled=no list=aliyun
add address= 42.120.0.0/16 disabled=no list=aliyun
add address= 42.121.0.0/16 disabled=no list=aliyun
add address= 42.156.128.0/17 disabled=no list=aliyun
add address= 43.227.188.0/22 disabled=no list=aliyun
add address= 45.113.40.0/22 disabled=no list=aliyun
add address= 45.158.183.0/24 disabled=no list=aliyun
add address= 47.52.0.0/16 disabled=no list=aliyun
add address= 47.56.0.0/15 disabled=no list=aliyun
add address= 47.56.0.0/16 disabled=no list=aliyun
add address= 47.57.0.0/16 disabled=no list=aliyun
add address= 47.74.0.0/15 disabled=no list=aliyun
add address= 47.76.0.0/14 disabled=no list=aliyun
add address= 47.80.0.0/13 disabled=no list=aliyun
add address= 47.88.0.0/14 disabled=no list=aliyun
add address= 47.92.0.0/14 disabled=no list=aliyun
add address= 47.96.0.0/14 disabled=no list=aliyun
add address= 47.100.0.0/14 disabled=no list=aliyun
add address= 47.104.0.0/13 disabled=no list=aliyun
add address= 47.112.0.0/15 disabled=no list=aliyun
add address= 47.114.0.0/15 disabled=no list=aliyun
add address= 47.116.0.0/14 disabled=no list=aliyun
add address= 47.120.0.0/13 disabled=no list=aliyun
add address= 47.235.0.0/16 disabled=no list=aliyun
add address= 47.236.0.0/14 disabled=no list=aliyun
add address= 47.240.0.0/14 disabled=no list=aliyun
add address= 47.244.0.0/15 disabled=no list=aliyun
add address= 47.246.0.0/16 disabled=no list=aliyun
add address= 47.252.0.0/15 disabled=no list=aliyun
add address= 47.90.0.0/17 disabled=no list=aliyun
add address= 47.91.0.0/19 disabled=no list=aliyun
add address= 47.91.96.0/19 disabled=no list=aliyun
add address= 47.91.128.0/17 disabled=no list=aliyun
add address= 47.250.0.0/15 disabled=no list=aliyun
add address= 47.254.0.0/16 disabled=no list=aliyun
add address= 47.255.0.0/17 disabled=no list=aliyun
add address= 47.255.128.0/17 disabled=no list=aliyun
add address= 59.82.0.0/21 disabled=no list=aliyun
add address= 59.82.8.0/21 disabled=no list=aliyun
add address= 59.82.16.0/20 disabled=no list=aliyun
add address= 59.82.32.0/20 disabled=no list=aliyun
add address= 59.82.40.0/21 disabled=no list=aliyun
add address= 59.82.48.0/21 disabled=no list=aliyun
add address= 59.82.56.0/21 disabled=no list=aliyun
add address= 59.82.64.0/19 disabled=no list=aliyun
add address= 59.82.96.0/22 disabled=no list=aliyun
add address= 59.110.0.0/16 disabled=no list=aliyun
add address= 60.205.0.0/16 disabled=no list=aliyun
add address= 62.128.96.0/22 disabled=no list=aliyun
add address= 89.219.0.0/22 disabled=no list=aliyun
add address= 101.37.0.0/16 disabled=no list=aliyun
add address= 101.132.0.0/15 disabled=no list=aliyun
add address= 101.200.0.0/15 disabled=no list=aliyun
add address= 103.15.96.0/22 disabled=no list=aliyun
add address= 103.47.4.0/22 disabled=no list=aliyun
add address= 103.52.196.0/22 disabled=no list=aliyun
add address= 103.81.186.0/23 disabled=no list=aliyun
add address= 103.142.8.0/23 disabled=no list=aliyun
add address= 103.142.100.0/23 disabled=no list=aliyun
add address= 103.145.72.0/24 disabled=no list=aliyun
add address= 103.151.206.0/23 disabled=no list=aliyun
add address= 106.11.0.0/16 disabled=no list=aliyun
add address= 106.14.0.0/15 disabled=no list=aliyun
add address= 110.75.0.0/16 disabled=no list=aliyun
add address= 110.76.0.0/19 disabled=no list=aliyun
add address= 110.76.21.0/24 disabled=no list=aliyun
add address= 110.76.23.0/24 disabled=no list=aliyun
add address= 110.76.32.0/20 disabled=no list=aliyun
add address= 110.76.48.0/20 disabled=no list=aliyun
add address= 110.76.56.0/22 disabled=no list=aliyun
add address= 110.76.60.0/22 disabled=no list=aliyun
add address= 110.173.192.0/19 disabled=no list=aliyun
add address= 112.74.0.0/16 disabled=no list=aliyun
add address= 112.124.0.0/14 disabled=no list=aliyun
add address= 114.55.0.0/16 disabled=no list=aliyun
add address= 114.215.0.0/16 disabled=no list=aliyun
add address= 115.28.0.0/15 disabled=no list=aliyun
add address= 115.124.16.0/20 disabled=no list=aliyun
add address= 116.62.0.0/16 disabled=no list=aliyun
add address= 116.251.64.0/18 disabled=no list=aliyun
add address= 118.31.0.0/16 disabled=no list=aliyun
add address= 118.178.0.0/16 disabled=no list=aliyun
add address= 118.190.0.0/16 disabled=no list=aliyun
add address= 119.23.0.0/16 disabled=no list=aliyun
add address= 119.38.208.0/20 disabled=no list=aliyun
add address= 119.42.224.0/19 disabled=no list=aliyun
add address= 120.24.0.0/14 disabled=no list=aliyun
add address= 120.55.0.0/16 disabled=no list=aliyun
add address= 120.76.0.0/14 disabled=no list=aliyun
add address= 121.0.16.0/20 disabled=no list=aliyun
add address= 121.40.0.0/14 disabled=no list=aliyun
add address= 121.89.0.0/16 disabled=no list=aliyun
add address= 121.196.0.0/14 disabled=no list=aliyun
add address= 122.254.76.0/23 disabled=no list=aliyun
add address= 123.56.0.0/15 disabled=no list=aliyun
add address= 139.95.0.0/22 disabled=no list=aliyun
add address= 139.95.16.0/23 disabled=no list=aliyun
add address= 139.95.18.0/23 disabled=no list=aliyun
add address= 139.129.0.0/16 disabled=no list=aliyun
add address= 139.224.0.0/16 disabled=no list=aliyun
add address= 140.205.0.0/16 disabled=no list=aliyun
add address= 147.139.0.0/17 disabled=no list=aliyun
add address= 147.139.128.0/17 disabled=no list=aliyun
add address= 149.129.0.0/20 disabled=no list=aliyun
add address= 149.129.16.0/23 disabled=no list=aliyun
add address= 149.129.24.0/21 disabled=no list=aliyun
add address= 149.129.32.0/19 disabled=no list=aliyun
add address= 149.129.32.0/20 disabled=no list=aliyun
add address= 149.129.48.0/20 disabled=no list=aliyun
add address= 149.129.64.0/18 disabled=no list=aliyun
add address= 149.129.128.0/18 disabled=no list=aliyun
add address= 149.129.192.0/18 disabled=no list=aliyun
add address= 156.224.138.0/24 disabled=no list=aliyun
add address= 156.226.24.0/21 disabled=no list=aliyun
add address= 156.240.76.0/23 disabled=no list=aliyun
add address= 161.117.0.0/16 disabled=no list=aliyun
add address= 182.92.0.0/16 disabled=no list=aliyun
add address= 185.78.106.0/23 disabled=no list=aliyun
add address= 198.11.128.0/18 disabled=no list=aliyun
add address= 198.44.244.0/22 disabled=no list=aliyun
add address= 202.61.84.0/22 disabled=no list=aliyun
add address= 202.144.199.0/24 disabled=no list=aliyun
add address= 203.107.0.0/17 disabled=no list=aliyun
add address= 203.107.64.0/24 disabled=no list=aliyun
add address= 203.107.65.0/24 disabled=no list=aliyun
add address= 203.107.66.0/24 disabled=no list=aliyun
add address= 203.107.67.0/24 disabled=no list=aliyun
add address= 203.107.68.0/24 disabled=no list=aliyun
add address= 203.209.224.0/19 disabled=no list=aliyun
add address= 203.119.128.0/17 disabled=no list=aliyun
add address= 205.204.96.0/19 disabled=no list=aliyun
add address= 218.244.128.0/19 disabled=no list=aliyun
add address= 223.4.0.0/14 disabled=no list=aliyun
编辑:技术部曹经理
联系方式:jeff@linkchina.com.cn