FedoraServer 在 IPv6 上的 ssh 流量被阻止

FedoraServer 在 IPv6 上的 ssh 流量被阻止

我的域名已针对 ipv6 和 ipv4 进行设置。访问 https 站点时一切正常。

但是当尝试通过 ipv6 连接到 ssh 时,它不起作用。您可以在下面的日志中看到,我的 ssh 客户端首先尝试 ipv6,然后切换到 ipv4。

OpenSSH_9.2p1, OpenSSL 3.0.8 7 Feb 2023
debug1: Reading configuration data /home/asd/.ssh/config
debug1: /home/asd/.ssh/config line 1: Applying options for 8wu.de
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to url.de [2fe4:4000:66:abc::1] port 22.
debug1: connect to address 2fe4:4000:66:abc::1 port 22: No route to host
debug1: Connecting to url.de [89.34.41.52] port 22.
debug1: Connection established.

但根据 lsof,我的服务器上的端口已打开。尝试连接到 ::1 时,我也收到了响应,因此 sshd 服务似乎运行正常。

sudo lsof -l | egrep 'LISTEN' | egrep ssh
sshd       43354                         0    3u     IPv6             179515       0t0        TCP *:ssh (LISTEN)
sshd       43354                         0    4u     IPv4             179517       0t0        TCP *:ssh (LISTEN)

如果我使用 nmap 映射我的服务器,端口将被关闭(正如 sshs 输出所预期的那样)

nmap -p22 -6 -Pn url.de                                   
Starting Nmap 7.93 ( https://nmap.org ) at 2023-03-05 18:15 CET
Nmap scan report for url.de (2fe4:4000:66:abc::1)
Host is up.
Other addresses for url.de (not scanned): 89.34.41.52

PORT   STATE    SERVICE
22/tcp filtered ssh

Nmap done: 1 IP address (1 host up) scanned in 2.16 seconds

我在服务器上使用了防火墙,但未发现任何与 ipv6 有关的信息。有什么信息可能阻碍了我的流量吗?

我做了一个 tracerout6:

sudo tcptraceroute6 -m 60 2a03:4000:66:cbd::1 22 
traceroute to 2a03:4000:66:cbd::1 (2a03:4000:66:cbd::1) from 2508:ed:4210:3109:9b92:89d:74db:ad8b, port 22, from port 16068, 60 hops max, 60 bytes packets
 1  abc.dip0.t-ipconnect.de (2003:af:4123:3109:1213:51ff:fecf:b5a8)  0.588 ms  0.375 ms  0.383 ms 
 2  2003:0:8004:5800::1 (2003:0:8004:5800::1)  10.816 ms  9.000 ms  8.563 ms 
 3  * * *         
 4  2003:0:1304:8032::1 (2003:0:1304:8032::1)  17.546 ms  63.950 ms  18.037 ms 
 5  2a00:11c0:47:1:47::140 (2a00:11c0:47:1:47::140)  20.733 ms  21.004 ms  20.215 ms 
 6  2a00:11c0:47:3::fb (2a00:11c0:47:3::fb)  21.080 ms  21.066 ms  21.206 ms 
 7  * * *         
 8  * * 2a03:4000:ff00:4::2 (2a03:4000:ff00:4::2)  2024.167 ms !H 

相关内容