Domain-Name-System

無法從 Mac OSX Lion 訪問站點,但可以從網路上的其他電腦訪問?

  • July 3, 2014

解決了:

問題出在 hamachi 客戶端,hamachi 正在劫持所有 5.0.0.0/8 地址塊

Mac 上的修復

  • LogMeIn Hamachi > 首選項 > 設置 > 高級 > 對等連接 > IP 協議模式 > 僅 IPv6(預設為兩者)

如果您只能通過 IPv4 連接到您的某些網路,則此“修復”對您不起作用

—–

幾週前,我開始使用一項服務 - https://semaphoreapp.com 我認為他們在一周前進行了 DNS 更改,因為我無法從我的 Mac OSX Lion (10.7.4) 機器(我的主要開發機器)訪問該站點)

但我可以從我網路上的其他機器訪問該站點

  • 平板電腦
  • 窗戶機
  • 麥迷你 (10.6.8)

經過一些Google搜尋後,我嘗試了這兩個

  • dscacheutil -flushcache
  • sudo killall -HUP mDNSResponder

但是不行,我也聯繫了 semaphoreapp,但到目前為止還沒有聯繫 - 同樣有趣的是,我的一位同事也遇到了完全相同的問題,無法通過 Mac OSX Lion 訪問,但可以通過 Windows 機器訪問,我們遠端工作並且不在同一個 ISP

一些附加資訊

Lion (10.7.4) 無法訪問網站

host semaphoreapp.com
semaphoreapp.com has address 5.9.53.16

ping semaphoreapp.com
PING semaphoreapp.com (5.9.53.16): 56 data bytes
Request timeout for icmp_seq 0
Request timeout for icmp_seq 1
Request timeout for icmp_seq 2
Request timeout for icmp_seq 3
ping: sendto: No route to host
Request timeout for icmp_seq 4
ping: sendto: Host is down
Request timeout for icmp_seq 5
ping: sendto: Host is down
Request timeout for icmp_seq 6
ping: sendto: Host is down
Request timeout for icmp_seq 7
....


traceroute semaphoreapp.com
traceroute to semaphoreapp.com (5.9.53.16), 64 hops max, 52 byte packets
1  * * *
2  * * *
traceroute: sendto: No route to host
3 traceroute: wrote semaphoreapp.com 52 chars, ret=-1
*traceroute: sendto: Host is down
traceroute: wrote semaphoreapp.com 52 chars, ret=-1
....

MacMini (10.6.8) 可以訪問它

host semaphoreapp.com
semaphoreapp.com has address 5.9.53.16

ping semaphoreapp.com
PING semaphoreapp.com (5.9.53.16): 56 data bytes
64 bytes from 5.9.53.16: icmp_seq=0 ttl=44 time=191.458 ms
64 bytes from 5.9.53.16: icmp_seq=1 ttl=44 time=202.923 ms
64 bytes from 5.9.53.16: icmp_seq=2 ttl=44 time=180.746 ms
64 bytes from 5.9.53.16: icmp_seq=3 ttl=44 time=200.616 ms
64 bytes from 5.9.53.16: icmp_seq=4 ttl=44 time=178.818 ms
....

traceroute semaphoreapp.com
traceroute to semaphoreapp.com (5.9.53.16), 64 hops max, 52 byte packets
1  192.168.0.1 (192.168.0.1)  1.677 ms  1.446 ms  1.445 ms
2  * LOCAL ISP  11.957 ms *
3  etc...  10.704 ms  14.183 ms  9.341 ms
4  etc...  32.641 ms  12.147 ms  10.850 ms
5  etc....  44.205 ms  54.563 ms  36.243 ms
6  vlan139.car1.seattle1.level3.net (4.53.145.165)  50.136 ms  45.873 ms  30.396 ms
7  ae-32-52.ebr2.seattle1.level3.net (4.69.147.182)  31.926 ms  40.507 ms  49.993 ms
8  ae-2-2.ebr2.denver1.level3.net (4.69.132.54)  78.129 ms  59.674 ms  49.905 ms
9  ae-3-3.ebr1.chicago2.level3.net (4.69.132.62)  99.019 ms  82.008 ms  76.074 ms
10  ae-1-100.ebr2.chicago2.level3.net (4.69.132.114)  96.185 ms  75.658 ms  75.662 ms
11  ae-6-6.ebr2.washington12.level3.net (4.69.148.145)  104.322 ms  105.563 ms  118.480 ms
12  ae-5-5.ebr2.washington1.level3.net (4.69.143.221)  93.646 ms  99.423 ms  96.067 ms
13  ae-41-41.ebr2.paris1.level3.net (4.69.137.49)  177.744 ms
ae-44-44.ebr2.paris1.level3.net (4.69.137.61)  199.363 ms  198.405 ms
14  ae-47-47.ebr1.frankfurt1.level3.net (4.69.143.141)  176.876 ms
ae-45-45.ebr1.frankfurt1.level3.net (4.69.143.133)  170.994 ms
ae-46-46.ebr1.frankfurt1.level3.net (4.69.143.137)  177.308 ms
15  ae-61-61.csw1.frankfurt1.level3.net (4.69.140.2)  176.769 ms
ae-91-91.csw4.frankfurt1.level3.net (4.69.140.14)  178.676 ms  173.644 ms
16  ae-2-70.edge7.frankfurt1.level3.net (4.69.154.75)  180.407 ms
ae-3-80.edge7.frankfurt1.level3.net (4.69.154.139)  174.861 ms  176.578 ms
17  as33891-net.edge7.frankfurt1.level3.net (195.16.162.94)  175.448 ms  185.658 ms  177.081 ms
18  hos-bb1.juniper4.rz16.hetzner.de (213.239.240.202)  188.700 ms  190.332 ms  188.196 ms
19  hos-tr4.ex3k14.rz16.hetzner.de (213.239.233.98)  199.632 ms
hos-tr3.ex3k14.rz16.hetzner.de (213.239.233.66)  185.938 ms
hos-tr2.ex3k14.rz16.hetzner.de (213.239.230.34)  182.378 ms
20  * * *
21  * * *
22  * * *

有任何想法嗎?

**編輯:**添加 tcpdump

MacMini(可以連接)在執行時 -ping semaphoreapp.com

sudo tcpdump -v -i en0 dst semaphoreapp.com
Password:
tcpdump: listening on en0, link-type EN10MB (Ethernet), capture size 65535 bytes
17:33:03.337165 IP (tos 0x0, ttl 64, id 20153, offset 0, flags [none], proto ICMP (1), length 84, bad cksum 0 (->3129)!)
   192.168.0.6 > static.16.53.9.5.clients.your-server.de: ICMP echo request, id 61918, seq 0, length 64
17:33:04.337279 IP (tos 0x0, ttl 64, id 26049, offset 0, flags [none], proto ICMP (1), length 84, bad cksum 0 (->1a21)!)
   192.168.0.6 > static.16.53.9.5.clients.your-server.de: ICMP echo request, id 61918, seq 1, length 64
17:33:05.337425 IP (tos 0x0, ttl 64, id 47854, offset 0, flags [none], proto ICMP (1), length 84, bad cksum 0 (->c4f3)!)
   192.168.0.6 > static.16.53.9.5.clients.your-server.de: ICMP echo request, id 61918, seq 2, length 64
17:33:06.337548 IP (tos 0x0, ttl 64, id 24772, offset 0, flags [none], proto ICMP (1), length 84, bad cksum 0 (->1f1e)!)
   192.168.0.6 > static.16.53.9.5.clients.your-server.de: ICMP echo request, id 61918, seq 3, length 64
17:33:07.337670 IP (tos 0x0, ttl 64, id 8171, offset 0, flags [none], proto ICMP (1), length 84, bad cksum 0 (->5ff7)!)
   192.168.0.6 > static.16.53.9.5.clients.your-server.de: ICMP echo request, id 61918, seq 4, length 64
17:33:08.337816 IP (tos 0x0, ttl 64, id 35810, offset 0, flags [none], proto ICMP (1), length 84, bad cksum 0 (->f3ff)!)
   192.168.0.6 > static.16.53.9.5.clients.your-server.de: ICMP echo request, id 61918, seq 5, length 64
17:33:09.337948 IP (tos 0x0, ttl 64, id 31120, offset 0, flags [none], proto ICMP (1), length 84, bad cksum 0 (->652)!)
   192.168.0.6 > static.16.53.9.5.clients.your-server.de: ICMP echo request, id 61918, seq 6, length 64
^C
7 packets captured
1047 packets received by filter
0 packets dropped by kernel

執行時 OSX Lion(無法連接)-ping semaphoreapp.com

# wireless
~ $ sudo tcpdump -v -i en1 dst semaphoreapp.com
Password:
tcpdump: listening on en1, link-type EN10MB (Ethernet), capture size 65535 bytes
^C
0 packets captured
262 packets received by filter
0 packets dropped by kernel

# wired
~ $ sudo tcpdump -v -i en0 dst semaphoreapp.com
tcpdump: listening on en0, link-type EN10MB (Ethernet), capture size 65535 bytes
^C
0 packets captured
219 packets received by filter
0 packets dropped by kernel

Request timeout for icmp_seqping 25 或 30 次後以上輸出。我對 tcpdump 了解不多,但對我來說,ping 請求似乎沒有離開我的機器?

您是否在無法連接到 semaphoreapp.com 的機器上執行 Hamachi?

如果是,我可以建議您禁用 Hamachi 並重試連接嗎?您可以在以下位置找到有關 Hamachi 街區的更多資訊:

http://en.wikipedia.org/wiki/Hamachi_(software)#Criticism

DNS 解析看起來不錯,因為您可以將名稱解析為正確的 IP 地址。我可以訪問 Lion 和 Mountain Lion 中的站點。

您可以嘗試重新啟動網路介面。

sudo ifconfig en0 down
sudo ifconfig en0 up

將 en0 替換為正在使用的網路介面。使用不帶參數的 ifconfig 來找出正確的介面。

如果您使用兩個網路介面——例如無線和有線——這可能會導致問題。

如果您使用的 VPN 可能會導致問題。基本上尋找您的 Lion 盒子上的網路配置可能與您的其他主機上不同的任何方式。

而且,儘管它可能很蹩腳,如果您還沒有嘗試過,可能需要重新啟動:)

引用自:https://serverfault.com/questions/412214