无法从 Mac OSX Lion 访问网站,但可以从网络上的其他机器访问?

无法从 Mac OSX Lion 访问网站,但可以从网络上的其他机器访问?

解决了:

问题出在 Hamachi 客户端,Hamachi 劫持了所有 5.0.0.0/8 地址块

Mac 上的修复

  • LogMeIn Hamachi > 首选项 > 设置 > 高级 > 对等连接 > IP 协议模式 > 仅 IPv6(默认为两者)

如果你只能通过 IPv4 连接到部分网络,则此“修复”对你不起作用

-----

几周前我开始使用一项服务 -https://semaphoreapp.com 我认为他们在一周前更改了 DNS,从那时起我就无法从我的 Mac OSX Lion (10.7.4) 机器(我的主要开发机器)访问该网站

但我可以从我网络上的其他机器访问该网站

  • iPad
  • 窗户机器
  • MacMini(10.6.8)

经过谷歌搜索后,我尝试了这两个

  • dscacheutil-刷新缓存
  • 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

ping 25 或 30 次后输出上述内容Request timeout for icmp_seq。我对 tcpdump 了解不多,但对我来说,ping 请求似乎没有离开我的机器?

答案1

您是否在无法连接到 semaphoreapp.com 的机器上运行 Hamachi?

如果是,我建议您禁用 Hamachi 并重试连接;您可以在此找到有关 Hamachi 阻止的更多信息:

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

答案2

我很高兴您解决了问题,但是我发现 Mac OSX 网络的一个问题是,在 /etc/hosts 文件中的一行上放置多个域可能会导致网络堆栈发生随机事件。我希望这可以帮助其他人通过 Google 找到这个问题。

所以不要这样做:

127.0.0.1 mylocalsite myotherlocalsite localhost eviladnetworksite.com

你必须把它们单独放在一行上

127.0.0.1 mylocalsite
127.0.0.1 myotherlocalsite
127.0.0.1 localhost
127.0.0.1 eviladnetworksite.com

进行此更改后您必须重新启动才能获得未损坏的网络堆栈。

参考:http://stevegrunwell.com/blog/quick-tip-troubleshooting-etchosts-issues/

答案3

DNS 解析看起来不错,因为您可以将名称解析为正确的 IP 地址。我能够在 Lion 和 Mountain Lion 中访问该网站。

您可以尝试重新启动网络接口。

sudo ifconfig en0 down
sudo ifconfig en0 up

将 en0 替换为正在使用的网络接口。使用不带参数的 ifconfig 来找出正确的接口。

如果您使用两个网络接口(例如无线和有线),则可能会导致问题。

如果您使用 VPN,则可能会引起问题。基本上,查找 Lion box 上的网络配置是否与其他主机上的网络配置不同。

尽管这可能不太好,但如果你还没有尝试过,可能需要重新启动 :)

答案4

是的,我见过这个问题。有时是 MTU 问题;特别是 PMTU 检测...

你能顺利访问其他 https 站点吗?你可以尝试在系统偏好设置 -> 网络 -> 接口 -> 高级 -> 硬件 -> 手动配置中降低 MTU。也许可以设置为 1460 或更低,而不是默认的 1500。

另请参阅:

https://apple.stackexchange.com/questions/39226/https-not-working-on-macbook-pro

https://superuser.com/questions/413285/os-x-failure-in-path-maximum-transmission-unit-pmtu-black-hole-router-detectio

相关内容