本帖最后由 新手710605 于 2020-3-4 10:18 编辑
我公司用的是easyconnect,用的是Win10系统。
但是发现,如果连上easyconnect后,WSL1就只能解析内网域名了,不能解析外网域名
输出如下:
- C:\> wsl
- robert@DESKTOP-AGRNTTU:/mnt/c$ nslookup www.baidu.com
- Server: 192.168.124.1
- Address: 192.168.124.1#53
- Non-authoritative answer:
- www.baidu.com canonical name = www.a.shifen.com.
- Name: www.a.shifen.com
- Address: 180.101.49.11
- Name: www.a.shifen.com
- Address: 180.101.49.12
- robert@DESKTOP-AGRNTTU:/mnt/c$ # 连接EasyConnect
- robert@DESKTOP-AGRNTTU:/mnt/c$ nslookup igit.58corp.com #内网域名
- ;; Got recursion not available from 127.0.0.1, trying next server
- ;; Got recursion not available from 127.0.0.1, trying next server
- ^C
- robert@DESKTOP-AGRNTTU:/mnt/c$ ping igit.58corp.com -c 1
- PING igit.58corp.com (10.128.219.59) 56(84) bytes of data.
- 64 bytes from 10.128.219.59: icmp_seq=1 ttl=57 time=30.7 ms
- --- igit.58corp.com ping statistics ---
- 1 packets transmitted, 1 received, 0% packet loss, time 0ms
- rtt min/avg/max/mdev = 30.744/30.744/30.744/0.000 ms
- robert@DESKTOP-AGRNTTU:/mnt/c$ ping www.baidu.com -c 4
- ping: www.baidu.com: Temporary failure in name resolution
- robert@DESKTOP-AGRNTTU:/mnt/c$
复制代码需要说明的是连接上了之后,通过原生的cmd,是可以访问外网和内网的,就是通过wsl不行。
连接上了之后ipconfig输出如下: - Wireless LAN adapter Wi-Fi:
- // 我的wifi
- Connection-specific DNS Suffix . :
- Description . . . . . . . . . . . : Realtek RTL8822BE 802.11ac PCIe Adapter
- Physical Address. . . . . . . . . : xxxxx
- DHCP Enabled. . . . . . . . . . . : Yes
- Autoconfiguration Enabled . . . . : Yes
- Link-local IPv6 Address . . . . . : xxxxx(Preferred)
- IPv4 Address. . . . . . . . . . . : 192.168.124.20(Preferred)
- Subnet Mask . . . . . . . . . . . : 255.255.255.0
- Lease Obtained. . . . . . . . . . : Wednesday, March 4, 2020 09:32:02
- Lease Expires . . . . . . . . . . : Thursday, March 5, 2020 09:32:03
- Default Gateway . . . . . . . . . : 192.168.124.1
- DHCP Server . . . . . . . . . . . : 192.168.124.1
- DHCPv6 IAID . . . . . . . . . . . : 249340518
- DHCPv6 Client DUID. . . . . . . . : 00-0xxxxxx
- DNS Servers . . . . . . . . . . . : 127.0.0.1
- 192.168.124.1
- NetBIOS over Tcpip. . . . . . . . : Enabled
- Ethernet adapter 以太网 3:
- //深信服VPN
- Connection-specific DNS Suffix . :
- Description . . . . . . . . . . . : Sangfor SSL VPN CS Support System VNIC
- Physical Address. . . . . . . . . : 00-FF-AE-xxxxx
- DHCP Enabled. . . . . . . . . . . : No
- Autoconfiguration Enabled . . . . : Yes
- Link-local IPv6 Address . . . . . : fe80::7d1b:xxxxxx(Preferred)
- IPv4 Address. . . . . . . . . . . : 2.0.2.161(Preferred)
- Subnet Mask . . . . . . . . . . . : 255.255.255.0
- Default Gateway . . . . . . . . . :
- DHCPv6 IAID . . . . . . . . . . . : 112413xxxx
- DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-xxxxxx
- DNS Servers . . . . . . . . . . . : 127.0.0.1
- NetBIOS over Tcpip. . . . . . . . : Enabled
复制代码
|