
有人有設定 Cisco AnyConnect VPN 的經驗嗎?透過 VPN 連線時,我們遇到客戶端 DNS 名稱解析問題。
對我來說,Cisco AnyConnect VPN 用戶端似乎攔截了來自用戶端的 DNS 查詢。
- 有人可以確認 AnyConnect VPN 用戶端確實執行此操作(攔截 DNS 流量)嗎?
- 這是在 VPN 伺服器上哪裡配置的?
編輯:
以下是當我連接到 VPN 時路由表的變化:
[~]
$ diff -u /tmp/route_normal /tmp/route_vpn
--- /tmp/route_normal 2010-01-20 19:23:47.000000000 +0100
+++ /tmp/route_vpn 2010-01-20 19:24:46.000000000 +0100
@@ -1,6 +1,10 @@
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
+xxx.xxx.xx.xx.i 10.0.0.1 255.255.255.255 UGH 0 0 0 ath0
172.16.53.0 * 255.255.255.0 U 0 0 0 vmnet1
10.0.0.0 * 255.255.255.0 U 0 0 0 ath0
+172.17.20.0 * 255.255.255.0 U 0 0 0 cscotun
0
+192.168.111.0 172.17.20.212 255.255.255.0 UG 0 0 0 cscotun
0
172.16.140.0 * 255.255.255.0 U 0 0 0 vmnet8
+172.16.0.0 172.17.20.212 255.255.0.0 UG 0 0 0 cscotun
0
default 10.0.0.1 0.0.0.0 UG 0 0 0 ath0
編輯2:
IT 人員在 VPN 端點上做了「某事」。現在我在執行時得到“遞歸不可用” nslookup
。 DNS 伺服器啟用了遞迴。所以一定是 Cisco VPN DNS 攔截造成的。
ubuntu@domU-12-31-39-00-ED-14:~$ /opt/cisco/vpn/bin/vpn connect xxx.xxxxxx.xx
...
>> Please enter your username and password
...
>> notice: Establishing VPN...
>> state: Connected
>> notice: VPN session established to ...
ubuntu@domU-12-31-39-00-ED-14:~$ nslookup www.vg.no
;; Got recursion not available from ..., trying next server
;; Got recursion not available from ..., trying next server
;; Got recursion not available from ..., trying next server
;; Got recursion not available from ..., trying next server
Server: 172.16.0.23
Address: 172.16.0.23#53
** server can't find www.vg.no.compute-1.internal: REFUSED
ubuntu@domU-12-31-39-00-ED-14:~$ ping 195.88.55.16
PING 195.88.55.16 (195.88.55.16) 56(84) bytes of data.
64 bytes from 195.88.55.16: icmp_seq=1 ttl=240 time=110 ms
64 bytes from 195.88.55.16: icmp_seq=2 ttl=240 time=111 ms
64 bytes from 195.88.55.16: icmp_seq=3 ttl=240 time=109 ms
^C
--- 195.88.55.16 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2017ms
rtt min/avg/max/mdev = 109.953/110.379/111.075/0.496 ms
答案1
正如評論中提到的,首先弄清楚你的分割隧道(路由)。端點(集中器、ASA、PIX 等)管理員通常可以完全控制客戶端如何處理此問題;有些公司只會在其網路上建立隧道(因此您的用戶端的 DNS 將通過 ISP),而有些公司則需要透過連結對所有流量進行隧道(因此 DNS 將透過連結到達公司)。大多時候這是商業/IT 決策。
查看客戶端上的路由表,查看網關等的外觀以及流量在其特定實例中的路由位置,為調試提供起點。然後,您可以嘗試從客戶端對公共資源(即Google 的新DNS 事物)進行直接DNS 查詢,以查看結果是什麼,同時使用TCPview(如果您的客戶端是Windows)類型的軟體來觀察資料的傳輸。
答案2
當您的 DNS 請求到達內部 DNS 伺服器時,檢查正在使用的表觀來源 IP 位址。
伺服器可能已配置為僅提供遞迴的為已知內部 IP 位址的請求提供服務,否則僅提供權威性為託管在同一伺服器上的某些網域提供服務。
如果您的 DNS 請求似乎來自網外 IP 位址,那麼它們只會獲得權威答案,而不會獲得遞歸答案。