提示
X
本案例来自tskb,请前往tskb修改源内容:立即前往
'>

基础排查-步骤三:查看访问域名资源解析是否正常以及代理网关访问资源连通性是否正常

|

问题描述

查看访问域名资源解析是否正常以及代理网关访问资源连通性是否正常

解决方案

一:查看访问域名资源解析是否正常
1、查看DNS解析
Hostname is 表示请求解析的的域名, isNoNeedProxy ret: true 表示不需要代理,直接由系统进行DNS解析,这种情况一般是因为sdk还未上线。

2022-05-11 +8.0 17:16:08.695[I][16640:17009][SFSDK-getaddrinfo] [getaddrinfo.cpp:isNoNeedProxy:313]isNoNeedProxy ret: true.


isNoNeedProxy ret: false 表示由sdk来进行dns解析了,一般是SDK以上登录上线

2022-05-11 +8.0 17:16:44.591[I][16640:17393][SFSDK-getaddrinfo] [getaddrinfo.cpp:isNoNeedProxy:316]isNoNeedProxy ret: false.



2、资源域名解析的日志分析

2022-05-11 +8.0 17:16:44.592[I][16640:17307][SFSDK-DnsProxyExecution] [DnsProxyExecution.cpp:OnRequest:214]recive dns request, domain:log.tbs.qq.com id:1 dnstype:1

日志解析:收到DNS请求,域名为log.tbs.qq.com 。 ID = 1,这里的id是dns头的id,默认递增(下一个dns包的id就是2了),dns服务器回包时也会同一个id,所以找dns解析结果需要找到 id=1 的,dns结果。


2022-05-11 +8.0 17:16:44.592[I][16640:17307][SFSDK-dns-cache] [cache.cpp:Search:256]DnsCache::Search failed,domain not exist

日志解析:查找DNS缓存,没有缓存结果


2022-05-11 +8.0 17:16:44.592[I][16640:17307][SFSDK-DnsProxyExecution] [DnsProxyExecution.cpp:OnRequest:318]isAuthSuc:1, dontmatch:0 isVpnRuleMatch:0
2022-05-11 +8.0 17:16:44.592[I][16640:17307][SFSDK-DnsProxyExecution] [DnsProxyExecution.cpp:OnRequest:321]Request not match the inner rule, request dns to internet!(do not math - 0, vpn rule match - 0)

日志解析:Request not match the inner rule  表示不符合内网dns解析规则,将通过公网解析



2022-05-11 +8.0 17:16:44.624[I][16640:17307][SFSDK-DNSClientExecution] [DnsClientExecution.cpp:OnRead:46]recvfrom is call. recvResult:64
2022-05-11 +8.0 17:16:44.624[I][16640:17307][SFSDK-VPNSERVICE-packet] [packet.cpp:GetResolveResults:333]GetResolveResults, ans:2
2022-05-11 +8.0 17:16:44.624[I][16640:17307][SFSDK-VPNSERVICE-packet] [packet.cpp:GetResolveResults:351]GetResolveResults is call. ipv4 result:120.232.196.242
2022-05-11 +8.0 17:16:44.624[I][16640:17307][SFSDK-VPNSERVICE-packet] [packet.cpp:GetResolveResults:351]GetResolveResults is call. ipv4 result:120.232.196.180
2022-05-11 +8.0 17:16:44.624[I][16640:17307][SFSDK-dns] [cache.cpp:AddEntry:164]dns cache add domain log.tbs.qq.com.
2022-05-11 +8.0 17:16:44.624[I][16640:17307][SFSDK-DnsProxyExecution] [DnsProxyExecution.cpp:OnResponse:440]DNSPacket id:1

日志解析:ID = 1 说明 recvfrom 读到的数据是 log.tbs.qq.com 的dns解析结果, ipv4 result:120.232.196.242 表示结果为:120.232.196.242

3、查看资源访问过程
1)、通过aTrust代理的访问,PackType is 2, send to vpn

2022-05-11 +8.0 17:21:32.576[I][22825:23098][SFSDK-connect.cpp] [connect.cpp:my_connect:328]my_connect in ,dumpaddr
2022-05-11 +8.0 17:21:32.576[I][22825:23098][SFSDK-IpTool] [IpTool.cpp:dumpSockAddr:145]dumpSockAddr over,dumpSockAddr ip:172.21.52.115 port:8080 family:AF_INET
2022-05-11 +8.0 17:21:32.576[I][22825:23098][SFSDK-connect.cpp] [connect.cpp:is_sslvpn_addr:279]is_sslvpn_addr in
2022-05-11 +8.0 17:21:32.576[I][22825:23098][SFSDK-IpTool] [IpTool.cpp:dumpSockAddr:145]dumpSockAddr over,dumpSockAddr ip:172.21.52.115 port:8080 family:AF_INET
2022-05-11 +8.0 17:21:32.576[I][22825:23098][SFSDK-connect.cpp] [connect.cpp:is_sslvpn_addr:283]LE port:36895 vpnport:47873
2022-05-11 +8.0 17:21:32.576[I][22825:23098][SFSDK-connect.cpp] [connect.cpp:is_sslvpn_addr:290]is_sslvpn_addr no.
2022-05-11 +8.0 17:21:32.576[I][22825:23098][SFSDK-connect.cpp] [connect.cpp:is_sock_stream:298]sock_stream type:SOCK_STREAM
2022-05-11 +8.0 17:21:32.576[I][22825:23098][SFSDK-connect.cpp] [connect.cpp:my_connect:371]PackType is 2, send to vpn



2)、未经过aTrust代理的访问,通过公网访问。PackType is 2, send to vpn

2022-05-11 +8.0 17:16:08.672[I][16640:17012][SFSDK-connect.cpp] [connect.cpp:my_connect:328]my_connect in ,dumpaddr
2022-05-11 +8.0 17:16:08.672[I][16640:17012][SFSDK-IpTool] [IpTool.cpp:dumpSockAddr:145]dumpSockAddr over,dumpSockAddr ip:172.21.52.115 port:8080 family:AF_INET
2022-05-11 +8.0 17:16:08.672[I][16640:17012][SFSDK-connect.cpp] [connect.cpp:is_sslvpn_addr:279]is_sslvpn_addr in
2022-05-11 +8.0 17:16:08.672[I][16640:17012][SFSDK-IpTool] [IpTool.cpp:dumpSockAddr:145]dumpSockAddr over,dumpSockAddr ip:172.21.52.115 port:8080 family:AF_INET
2022-05-11 +8.0 17:16:08.672[I][16640:17012][SFSDK-connect.cpp] [connect.cpp:is_sslvpn_addr:283]LE port:36895 vpnport:47873
2022-05-11 +8.0 17:16:08.672[I][16640:17012][SFSDK-connect.cpp] [connect.cpp:is_sslvpn_addr:290]is_sslvpn_addr no.
2022-05-11 +8.0 17:16:08.672[I][16640:17012][SFSDK-connect.cpp] [connect.cpp:is_sock_stream:298]sock_stream type:SOCK_STREAM
2022-05-11 +8.0 17:16:08.673[I][16640:17012][SFSDK-connect.cpp] [connect.cpp:my_connect:374]PackType is 4, send to Internet

二:
检查资源OA服务器的地址,在代理网关的webconsel,开启抓包在访问异常后同步下载数据包查看数据的交互是否正常






我要分享
文档编号: 224873
作者: admin
更新时间: 2023-01-05 17:29
适用版本: