升级后我的 ubuntu 20.04 没有 HTTPS

升级后我的 ubuntu 20.04 没有 HTTPS

由于某种原因,升级到 20.04 LTS 后,虚拟机不再有任何互联网。只有 https。http 有效。

wget http作品

wget https没有

它托管在 vSphere 上,网络配置也很好,因为 http 可以工作。我也无法编辑设置应用中与网络相关的任何选项

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

#source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto ens160
iface ens160 inet static
        address 192.168.100.38
        netmask 255.255.255.0
        gateway 192.168.100.254
        dns-nameserver 8.8.8.8 8.8.4.4

wget https 的输出

root@hllin8:/home/user# wget https://google.com
--2022-02-28 11:15:23--  https://google.com/
Resolving google.com (google.com)... 172.217.168.46, 2a00:1450:400a:808::200e
Connecting to google.com (google.com)|172.217.168.46|:443... failed: Connection refused.
Connecting to google.com (google.com)|2a00:1450:400a:808::200e|:443... failed: Network is unreachable.
root@hllin8:/home/user#

输出sudo ufw status numbered

root@hllin8:/home/user# sudo ufw status numbered
Status: inactive

输出openssl s_client -connect google.com:443 < /dev/null

root@hllin8:/home/user# openssl s_client -connect google.com:443 < /dev/null
140081291314496:error:0200206F:system library:connect:Connection refused:../crypto/bio/b_sock2.c:110:
140081291314496:error:2008A067:BIO routines:BIO_connect:connect error:../crypto/bio/b_sock2.c:111:
140081291314496:error:02002065:system library:connect:Network is unreachable:../crypto/bio/b_sock2.c:110:
140081291314496:error:2008A067:BIO routines:BIO_connect:connect error:../crypto/bio/b_sock2.c:111:
connect:errno=101

输出tracepath -4 google.com

root@hllin8:/home/user# tracepath -4 google.com
 1?: [LOCALHOST]                      pmtu 1500
 1:  public ip (censored)                        2.538ms
 1:  public ip (censored)                         1.707ms
 2:  no reply
 3:  46.140.4.125                                         12.009ms
 4:  ch-otf01b-rc2-ae-51-0.aorta.net                      16.933ms asymm  6
 5:  ch-zrh01b-ra1-ae-9-0.aorta.net                       13.183ms
 6:  72.14.221.112                                        11.635ms
 7:  no reply
 8:  no reply
 9:  no reply
10:  no reply
11:  no reply
12:  no reply
13:  no reply
14:  no reply
15:  no reply
16:  no reply
17:  no reply
18:  no reply
19:  no reply
20:  no reply
21:  no reply
22:  no reply
23:  no reply
24:  no reply
25:  no reply
26:  no reply
27:  no reply
28:  no reply
29:  no reply
30:  no reply
     Too many hops: pmtu 1500
     Resume: pmtu 1500

答案1

这是防火墙问题。防火墙配置错误,不允许端口 443 通过……

相关内容