Verbindung auf einen Server über IPv6 funktioniert mit Debian 11, aber nicht mit Debian 12

HayKer

Cadet 3rd Year
Registriert
Feb. 2009
Beiträge
57
Hallo zusammen,

ich stehe aktuell wieder vor einem Problem, bei dem ich wieder das Gefühl habe, der einzige zu sein, der das Problem hat bzw. auffällt.
Ich bin mir auch nicht sicher, wo der Thread besser aufgehoben wäre. Netzwerk oder Linux. Aber für mich sieht das eher nach einem Problem bei Debian 12 aus.

Systeme:
Firewall: OpnSense (macht DHCP für IPv4 und IPv6)
DEV1: Debian 12
DEV2: Debian 11
DEV3: Debian 11

Alle Systeme sind komplett identisch.

Vorwort:
Wir möchten unser Webhosting über IPv6 bereitstellen.
Soweit kein Problem, mit Debian 11 hat alles wunderbar funktioniert.
Nach einem Upgrade auf Debian 12 funktionieren ausgehende Verbindungen zu SSH oder SQL nicht mehr.
Gleiches Problem mit einem Frisch installieren Debian 12 System.

Problem:
Es ist uns seit Debian 12 nicht mehr möglich über IPv6 Verbindungen zu anderen Diensten wie z. B. SSH herzustellen.
Debian 12 scheint ein Problem bei ausgehenden Verbindungen über gewisse Dienste / Ports über IPv6 zu haben.
Aufgefallen ist es uns als Erstes bei SSH, danach bei MariaDB.

DEV1 ⇒ SSH IPv4 DEV3 = Funktioniert
Bash:
root@dev1 ~ $ ssh -vvv -4 root@dev3 -p2222
OpenSSH_9.2p1 Debian-2+deb12u1, OpenSSL 3.0.11 19 Sep 2023
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files
debug1: /etc/ssh/ssh_config line 21: Applying options for *
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts' -> '/root/.ssh/known_hosts'
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts2' -> '/root/.ssh/known_hosts2'
debug2: resolving "dev3" port 2222
debug3: resolve_host: lookup dev3:2222
debug3: ssh_connect_direct: entering
debug1: Connecting to dev3 [xxx.xxx.xxx.xxx] port 2222.
debug3: set_sock_tos: set socket 3 IP_TOS 0x10
debug1: Connection established.
debug1: identity file /root/.ssh/id_rsa type -1
debug1: identity file /root/.ssh/id_rsa-cert type -1
debug1: identity file /root/.ssh/id_ecdsa type -1
debug1: identity file /root/.ssh/id_ecdsa-cert type -1
debug1: identity file /root/.ssh/id_ecdsa_sk type -1
debug1: identity file /root/.ssh/id_ecdsa_sk-cert type -1
debug1: identity file /root/.ssh/id_ed25519 type -1
debug1: identity file /root/.ssh/id_ed25519-cert type -1
debug1: identity file /root/.ssh/id_ed25519_sk type -1
debug1: identity file /root/.ssh/id_ed25519_sk-cert type -1
debug1: identity file /root/.ssh/id_xmss type -1
debug1: identity file /root/.ssh/id_xmss-cert type -1
debug1: identity file /root/.ssh/id_dsa type -1
debug1: identity file /root/.ssh/id_dsa-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_9.2p1 Debian-2+deb12u1
debug1: Remote protocol version 2.0, remote software version OpenSSH_8.4p1 Debian-5+deb11u2
debug1: compat_banner: match: OpenSSH_8.4p1 Debian-5+deb11u2 pat OpenSSH* compat 0x04000000
debug2: fd 3 setting O_NONBLOCK
debug1: Authenticating to dev3:2222 as 'root'
debug3: put_host_port: [dev3]:2222
debug1: load_hostkeys: fopen /root/.ssh/known_hosts: No such file or directory
debug1: load_hostkeys: fopen /root/.ssh/known_hosts2: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory
debug3: order_hostkeyalgs: no algorithms matched; accept original
debug3: send packet: type 20
debug1: SSH2_MSG_KEXINIT sent
debug3: receive packet: type 20
debug1: SSH2_MSG_KEXINIT received
debug2: local client KEXINIT proposal
debug2: KEX algorithms: sntrup761x25519-sha512@openssh.com,curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256,ext-info-c
debug2: host key algorithms: ssh-ed25519-cert-v01@openssh.com,ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,sk-ssh-ed25519-cert-v01@openssh.com,sk-ecdsa-sha2-nistp256-cert-v01@openssh.com,rsa-sha2-512-cert-v01@openssh.com,rsa-sha2-256-cert-v01@openssh.com,ssh-ed25519,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,sk-ssh-ed25519@openssh.com,sk-ecdsa-sha2-nistp256@openssh.com,rsa-sha2-512,rsa-sha2-256
debug2: ciphers ctos: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com
debug2: ciphers stoc: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com
debug2: MACs ctos: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: MACs stoc: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: compression ctos: none,zlib@openssh.com,zlib
debug2: compression stoc: none,zlib@openssh.com,zlib
debug2: languages ctos:
debug2: languages stoc:
debug2: first_kex_follows 0
debug2: reserved 0
debug2: peer server KEXINIT proposal
debug2: KEX algorithms: curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256
debug2: host key algorithms: rsa-sha2-512,rsa-sha2-256,ssh-rsa,ecdsa-sha2-nistp256,ssh-ed25519
debug2: ciphers ctos: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com
debug2: ciphers stoc: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com
debug2: MACs ctos: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: MACs stoc: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: compression ctos: none,zlib@openssh.com
debug2: compression stoc: none,zlib@openssh.com
debug2: languages ctos:
debug2: languages stoc:
debug2: first_kex_follows 0
debug2: reserved 0
debug1: kex: algorithm: curve25519-sha256
debug1: kex: host key algorithm: ssh-ed25519
debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug3: send packet: type 30
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug3: receive packet: type 31
debug1: SSH2_MSG_KEX_ECDH_REPLY received
debug1: Server host key: ssh-ed25519 SHA256:DLbZhC76mSMrEKnSNfND3ws3cRXcW9zwVosV+qoHu2M
debug3: put_host_port: [xxx.xxx.xxx.xxx]:2222
debug3: put_host_port: [dev3]:2222
debug1: load_hostkeys: fopen /root/.ssh/known_hosts: No such file or directory
debug1: load_hostkeys: fopen /root/.ssh/known_hosts2: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory
debug1: checking without port identifier
debug1: load_hostkeys: fopen /root/.ssh/known_hosts: No such file or directory
debug1: load_hostkeys: fopen /root/.ssh/known_hosts2: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory
debug3: hostkeys_find_by_key_hostfile: trying user hostfile "/root/.ssh/known_hosts"
debug1: hostkeys_find_by_key_hostfile: hostkeys file /root/.ssh/known_hosts does not exist
debug3: hostkeys_find_by_key_hostfile: trying user hostfile "/root/.ssh/known_hosts2"
debug1: hostkeys_find_by_key_hostfile: hostkeys file /root/.ssh/known_hosts2 does not exist
debug3: hostkeys_find_by_key_hostfile: trying system hostfile "/etc/ssh/ssh_known_hosts"
debug1: hostkeys_find_by_key_hostfile: hostkeys file /etc/ssh/ssh_known_hosts does not exist
debug3: hostkeys_find_by_key_hostfile: trying system hostfile "/etc/ssh/ssh_known_hosts2"
debug1: hostkeys_find_by_key_hostfile: hostkeys file /etc/ssh/ssh_known_hosts2 does not exist
The authenticity of host '[dev3]:2222 ([xxx.xxx.xxx.xxx]:2222)' can't be established.
ED25519 key fingerprint is SHA256:DLbZhC76mSMrEKnSNfND3ws3cRXcW9zwVosV+qoHu2M.
This key is not known by any other names.
Are you sure you want to continue connecting (yes/no/[fingerprint])?

DEV1 ⇒ SSH IPv6 DEV3 = Funktioniert nicht (Es wird kein Fehler angezeigt und auf dem DEV3 ist auch keine eingehende Verbindung zu sehen. Der Verbindungsaufbau bleibt einfach stehen.)
Bash:
root@v-db ~ $ ssh -vvv -6 root@dev3 -p2222
OpenSSH_9.2p1 Debian-2+deb12u1, OpenSSL 3.0.11 19 Sep 2023
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files
debug1: /etc/ssh/ssh_config line 21: Applying options for *
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts' -> '/root/.ssh/known_hosts'
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts2' -> '/root/.ssh/known_hosts2'
debug2: resolving "dev3" port 2222
debug3: resolve_host: lookup dev3:2222
debug3: ssh_connect_direct: entering
debug1: Connecting to dev3 [xxxx:xxxx:xxxx:xxxx:xxxx::xxxx] port 2222.
debug3: set_sock_tos: set socket 3 IPV6_TCLASS 0x10

DEV2 ⇒ SSH IPv4 DEV3 = Funktioniert
Bash:
root@dev2 ~ $ ssh -vvv -4 root@dev3 -p2222
OpenSSH_8.4p1 Debian-5+deb11u2, OpenSSL 1.1.1w  11 Sep 2023
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files
debug1: /etc/ssh/ssh_config line 21: Applying options for *
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts' -> '/root/.ssh/known_hosts'
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts2' -> '/root/.ssh/known_hosts2'
debug2: resolving "dev3" port 2222
debug2: ssh_connect_direct
debug1: Connecting to dev3 [xxx.xxx.xxx.xxx] port 2222.
debug1: Connection established.
debug1: identity file /root/.ssh/id_rsa type -1
debug1: identity file /root/.ssh/id_rsa-cert type -1
debug1: identity file /root/.ssh/id_dsa type -1
debug1: identity file /root/.ssh/id_dsa-cert type -1
debug1: identity file /root/.ssh/id_ecdsa type -1
debug1: identity file /root/.ssh/id_ecdsa-cert type -1
debug1: identity file /root/.ssh/id_ecdsa_sk type -1
debug1: identity file /root/.ssh/id_ecdsa_sk-cert type -1
debug1: identity file /root/.ssh/id_ed25519 type -1
debug1: identity file /root/.ssh/id_ed25519-cert type -1
debug1: identity file /root/.ssh/id_ed25519_sk type -1
debug1: identity file /root/.ssh/id_ed25519_sk-cert type -1
debug1: identity file /root/.ssh/id_xmss type -1
debug1: identity file /root/.ssh/id_xmss-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_8.4p1 Debian-5+deb11u2
debug1: Remote protocol version 2.0, remote software version OpenSSH_8.4p1 Debian-5+deb11u2
debug1: match: OpenSSH_8.4p1 Debian-5+deb11u2 pat OpenSSH* compat 0x04000000
debug2: fd 3 setting O_NONBLOCK
debug1: Authenticating to dev3:2222 as 'root'
debug3: put_host_port: [dev3]:2222
debug3: send packet: type 20
debug1: SSH2_MSG_KEXINIT sent
debug3: receive packet: type 20
debug1: SSH2_MSG_KEXINIT received
debug2: local client KEXINIT proposal
debug2: KEX algorithms: curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256,ext-info-c
debug2: host key algorithms: ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,sk-ecdsa-sha2-nistp256-cert-v01@openssh.com,ssh-ed25519-cert-v01@openssh.com,sk-ssh-ed25519-cert-v01@openssh.com,rsa-sha2-512-cert-v01@openssh.com,rsa-sha2-256-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,sk-ecdsa-sha2-nistp256@openssh.com,ssh-ed25519,sk-ssh-ed25519@openssh.com,rsa-sha2-512,rsa-sha2-256,ssh-rsa
debug2: ciphers ctos: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com
debug2: ciphers stoc: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com
debug2: MACs ctos: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: MACs stoc: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: compression ctos: none,zlib@openssh.com,zlib
debug2: compression stoc: none,zlib@openssh.com,zlib
debug2: languages ctos:
debug2: languages stoc:
debug2: first_kex_follows 0
debug2: reserved 0
debug2: peer server KEXINIT proposal
debug2: KEX algorithms: curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256
debug2: host key algorithms: rsa-sha2-512,rsa-sha2-256,ssh-rsa,ecdsa-sha2-nistp256,ssh-ed25519
debug2: ciphers ctos: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com
debug2: ciphers stoc: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com
debug2: MACs ctos: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: MACs stoc: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: compression ctos: none,zlib@openssh.com
debug2: compression stoc: none,zlib@openssh.com
debug2: languages ctos:
debug2: languages stoc:
debug2: first_kex_follows 0
debug2: reserved 0
debug1: kex: algorithm: curve25519-sha256
debug1: kex: host key algorithm: ecdsa-sha2-nistp256
debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug3: send packet: type 30
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug3: receive packet: type 31
debug1: Server host key: ecdsa-sha2-nistp256 SHA256:TbguAHT0KAjgiL4rdlQ653Cq3BdKKuzLhh25/HBOlJ8
debug3: put_host_port: [xxx.xxx.xxx.xxx]:2222
debug3: put_host_port: [dev3]:2222
debug1: checking without port identifier
The authenticity of host '[dev3]:2222 ([xxx.xxx.xxx.xxx]:2222)' can't be established.
ECDSA key fingerprint is SHA256:TbguAHT0KAjgiL4rdlQ653Cq3BdKKuzLhh25/HBOlJ8.
Are you sure you want to continue connecting (yes/no/[fingerprint])?

DEV2 ⇒ SSH IPv6 DEV3 = Funktioniert
Bash:
root@dev2 ~ $ ssh -vvv -6 root@dev3 -p2222
OpenSSH_8.4p1 Debian-5+deb11u2, OpenSSL 1.1.1w  11 Sep 2023
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files
debug1: /etc/ssh/ssh_config line 21: Applying options for *
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts' -> '/root/.ssh/known_hosts'
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts2' -> '/root/.ssh/known_hosts2'
debug2: resolving "dev3" port 2222
debug2: ssh_connect_direct
debug1: Connecting to dev3 [xxxx:xxxx:xxxx:xxxx:xxxx::xxxx] port 2222.
debug1: Connection established.
debug1: identity file /root/.ssh/id_rsa type -1
debug1: identity file /root/.ssh/id_rsa-cert type -1
debug1: identity file /root/.ssh/id_dsa type -1
debug1: identity file /root/.ssh/id_dsa-cert type -1
debug1: identity file /root/.ssh/id_ecdsa type -1
debug1: identity file /root/.ssh/id_ecdsa-cert type -1
debug1: identity file /root/.ssh/id_ecdsa_sk type -1
debug1: identity file /root/.ssh/id_ecdsa_sk-cert type -1
debug1: identity file /root/.ssh/id_ed25519 type -1
debug1: identity file /root/.ssh/id_ed25519-cert type -1
debug1: identity file /root/.ssh/id_ed25519_sk type -1
debug1: identity file /root/.ssh/id_ed25519_sk-cert type -1
debug1: identity file /root/.ssh/id_xmss type -1
debug1: identity file /root/.ssh/id_xmss-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_8.4p1 Debian-5+deb11u2
debug1: Remote protocol version 2.0, remote software version OpenSSH_8.4p1 Debian-5+deb11u2
debug1: match: OpenSSH_8.4p1 Debian-5+deb11u2 pat OpenSSH* compat 0x04000000
debug2: fd 3 setting O_NONBLOCK
debug1: Authenticating to dev3:2222 as 'root'
debug3: put_host_port: [dev3]:2222
debug3: send packet: type 20
debug1: SSH2_MSG_KEXINIT sent
debug3: receive packet: type 20
debug1: SSH2_MSG_KEXINIT received
debug2: local client KEXINIT proposal
debug2: KEX algorithms: curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256,ext-info-c
debug2: host key algorithms: ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,sk-ecdsa-sha2-nistp256-cert-v01@openssh.com,ssh-ed25519-cert-v01@openssh.com,sk-ssh-ed25519-cert-v01@openssh.com,rsa-sha2-512-cert-v01@openssh.com,rsa-sha2-256-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,sk-ecdsa-sha2-nistp256@openssh.com,ssh-ed25519,sk-ssh-ed25519@openssh.com,rsa-sha2-512,rsa-sha2-256,ssh-rsa
debug2: ciphers ctos: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com
debug2: ciphers stoc: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com
debug2: MACs ctos: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: MACs stoc: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: compression ctos: none,zlib@openssh.com,zlib
debug2: compression stoc: none,zlib@openssh.com,zlib
debug2: languages ctos:
debug2: languages stoc:
debug2: first_kex_follows 0
debug2: reserved 0
debug2: peer server KEXINIT proposal
debug2: KEX algorithms: curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256
debug2: host key algorithms: rsa-sha2-512,rsa-sha2-256,ssh-rsa,ecdsa-sha2-nistp256,ssh-ed25519
debug2: ciphers ctos: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com
debug2: ciphers stoc: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com
debug2: MACs ctos: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: MACs stoc: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: compression ctos: none,zlib@openssh.com
debug2: compression stoc: none,zlib@openssh.com
debug2: languages ctos:
debug2: languages stoc:
debug2: first_kex_follows 0
debug2: reserved 0
debug1: kex: algorithm: curve25519-sha256
debug1: kex: host key algorithm: ecdsa-sha2-nistp256
debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug3: send packet: type 30
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug3: receive packet: type 31
debug1: Server host key: ecdsa-sha2-nistp256 SHA256:TbguAHT0KAjgiL4rdlQ653Cq3BdKKuzLhh25/HBOlJ8
debug3: put_host_port: [xxxx:xxxx:xxxx:xxxx:xxxx::xxxx]:2222
debug3: put_host_port: [dev3]:2222
debug1: checking without port identifier
The authenticity of host '[dev3]:2222 ([xxxx:xxxx:xxxx:xxxx:xxxx::xxxx]:2222)' can't be established.
ECDSA key fingerprint is SHA256:TbguAHT0KAjgiL4rdlQ653Cq3BdKKuzLhh25/HBOlJ8.
Are you sure you want to continue connecting (yes/no/[fingerprint])?

gegenseitig können sich alle Systeme über IPv6 erreichen, Ping läuft durch.
Eingehende Verbindungen funktionieren auch alle auf Debian 12. Nur komme ich scheinbar nicht raus.
IPv6 ist auf allen Systemen korrekt konfiguriert.
Es ist keine Alternative für uns intern nur über IPv4 zu kommunizieren, es muss auch intern alles über IPv6 erreichbar sein.

Weitere Informationen:
  • Es sind keine Software Firewalls auf den Debian Systemen im Einsatz.
DEV1:
Bash:
root@dev1 ~ $ ip6tables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
DEV2:
Bash:
root@dev2 ~ $ ip6tables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
DEV3:
Bash:
root@dev3 ~ $ ip6tables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
  • Ping auf allen Systemen zu allen Systemen funktioniert. Auch nach Extern kein Problem
DEV1 zu DEV3
Bash:
root@dev1 ~ $ ping -6 dev3
PING dev3(xxxx:xxxx:xxxx:xxxx:xxxx::xxxx (xxxx:xxxx:xxxx:xxxx:xxxx::xxxx)) 56 data bytes
64 bytes from xxxx:xxxx:xxxx:xxxx:xxxx::xxxx (xxxx:xxxx:xxxx:xxxx:xxxx::xxxx): icmp_seq=1 ttl=63 time=0.254 ms
64 bytes from xxxx:xxxx:xxxx:xxxx:xxxx::xxxx (xxxx:xxxx:xxxx:xxxx:xxxx::xxxx): icmp_seq=2 ttl=63 time=0.178 ms
^C
--- dev3 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1026ms
rtt min/avg/max/mdev = 0.178/0.216/0.254/0.038 ms
DEV1 zu Google
Bash:
root@dev1 ~ $ ping -6 google.de
PING google.de(arn11s12-in-x03.1e100.net (2a00:1450:400f:805::2003)) 56 data bytes
64 bytes from arn11s12-in-x03.1e100.net (2a00:1450:400f:805::2003): icmp_seq=1 ttl=117 time=8.39 ms
64 bytes from arn11s12-in-x03.1e100.net (2a00:1450:400f:805::2003): icmp_seq=2 ttl=117 time=8.68 ms
^C
--- google.de ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1002ms
rtt min/avg/max/mdev = 8.389/8.534/8.679/0.145 ms

DEV2 zu DEV3
Bash:
root@dev2 ~ $ ping -6 dev3
PING dev3(xxxx:xxxx:xxxx:xxxx:xxxx::xxxx (xxxx:xxxx:xxxx:xxxx:xxxx::xxxx)) 56 data bytes
64 bytes from xxxx:xxxx:xxxx:xxxx:xxxx::xxxx (xxxx:xxxx:xxxx:xxxx:xxxx::xxxx): icmp_seq=1 ttl=63 time=0.242 ms
64 bytes from xxxx:xxxx:xxxx:xxxx:xxxx::xxxx (xxxx:xxxx:xxxx:xxxx:xxxx::xxxx): icmp_seq=2 ttl=63 time=0.320 ms
^C
--- dev3 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1019ms
rtt min/avg/max/mdev = 0.242/0.281/0.320/0.039 ms
  • Curl funktioniert auf dem DEV1 interessanterweise nur nach extern auf dem DEV2 komme ich auch intern drauf.
DEV1 zu DEV3
Bash:
root@dev1 ~ $ curl -vvv -6 https://dev3
*   Trying [xxxx:xxxx:xxxx:xxxx:xxxx::xxxx]:443...
* connect to xxxx:xxxx:xxxx:xxxx:xxxx::xxxx port 443 failed: Die Wartezeit für die Verbindung ist abgelaufen
* Failed to connect to dev3 port 443 after 129482 ms: Couldn't connect to server
* Closing connection 0
curl: (28) Failed to connect to dev3 port 443 after 129482 ms: Couldn't connect to server
DEV1 zu Google
Bash:
root@dev1 ~ $ curl -6 https://google.de
<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
<TITLE>302 Moved</TITLE></HEAD><BODY>
<H1>302 Moved</H1>
The document has moved
<A HREF="https://www.google.com/sorry/index?continue=https://google.de/&amp;q=EhAqAQT5MFFPjwABAAAAAAJSGLGT3aoGIjA5iwS_8ZM2uQiaq5rBLDrfr2YOlTpy7fW4UXaeRQIycfsMUa-TGCXFvciIVXbkZ8cyAXJKGVNPUlJZX0FCVVNJVkVfTkVUX01FU1NBR0VaAUM">here</A>.
</BODY></HTML>

DEV2 zu DEV3
Bash:
root@dev2 ~ $ curl -6 https://dev3

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Apache2 Debian Default Page: It works</title>
    <style type="text/css" media="screen">
  * {
    margin: 0px 0px 0px 0px;
    padding: 0px 0px 0px 0px;
  }

[...]

        <div class="section_header">
            <div id="docroot"></div>
                Document Roots
        </div>

        <div class="content_section_text">
            <p>
                By default, Debian does not allow access through the web browser to
                <em>any</em> file apart of those located in <tt>/var/www</tt>,
                <a href="http://httpd.apache.org/docs/2.4/mod/mod_userdir.html" rel="nofollow">public_html</a>
                directories (when enabled) and <tt>/usr/share</tt> (for web
                applications). If your site is using a web document root
                located elsewhere (such as in <tt>/srv</tt>) you may need to whitelist your
                document root directory in <tt>/etc/apache2/apache2.conf</tt>.
            </p>
            <p>
                The default Debian document root is <tt>/var/www/html</tt>. You
                can make your own virtual hosts under /var/www. This is different
                to previous releases which provides better security out of the box.
            </p>
        </div>

        <div class="section_header">
          <div id="bugs"></div>
                Reporting Problems
        </div>
        <div class="content_section_text">
          <p>
                Please use the <tt>reportbug</tt> tool to report bugs in the
                Apache2 package with Debian. However, check <a
                href="http://bugs.debian.org/cgi-bin/pkgreport.cgi?ordering=normal;archive=0;src=apache2;repeatmerged=0"
                rel="nofollow">existing bug reports</a> before reporting a new bug.
          </p>
          <p>
                Please report bugs specific to modules (such as PHP and others)
                to respective packages, not to the web server itself.
          </p>
        </div>




      </div>
    </div>
    <div class="validator">
    </div>
  </body>
</html>
  • Die übergeordnete Firewall lässt alle Verbindungen nach aussen zu. (Problem tritt im Internen netz sowie auch auf externen Systemen auf.)
  • An der OpnSense liegt es auch nicht, da ansonsten das alles über Debian 11 Systeme auch nicht funktionieren würde.
  • Wenn ich den gleichen Test über Debian 11 auf dem DEV1 mache (Gleiche IP's), funktioniert alles problemlos.
Ich bin an der Stelle jetzt mit meinem latein am ende.
Ich hoffe hier kann mir jemand bei dem Problem helfen.
 
Ich habe da jetzt auch keine Patentlösung, aber vielleicht hilft das ja bei der weiteren Recherche.

HayKer schrieb:
debug3: set_sock_tos: set socket 3 IPV6_TCLASS 0x10
https://askubuntu.com/questions/1415021/cannot-ssh-to-server-linux-machine/1418608#1418608

Ich habe einfach mal nach dieser Exception geschaut und bin auf Threads gestoßen, die den Parameter:
Bash:
ssh -o IPQoS=none -6 -vvv deb12@dev1

Oder in die /etc/ssh_config:
Bash:
IPQoS none

nahelegten, da hier wohl der Router mit QoS (Quality of Service), also der Paketpriorisierung Probleme hat.

Ansonsten haben sich ja Kernelversion und die Paketversion von Debian 11 auf 12 geändert, also entweder neue "Features" in den Programmen, bzw. dem Kernel oder eben Bugs, was ich bei Debian mit stable releases eher für ausgeschlossen halte. Sollte es doch daran liegen, kann man den Paketmanager apt auf Debian Backports konfigurieren und mit:

Bash:
apt install -t bookworm-backports <package>

Eine ältere Version von openssh und/ oder openssl installieren. ---> Das wäre nur ein Workaround und keine wirkliche Lösung.
 
Zuletzt bearbeitet:
Danke dir schon mal für die Antwort und den Denkanstoß.

Ich habe das mal getestet und habe leider keinen Erfolg damit gehabt. Also am QoS liegt es nicht.
Aber ich habe mir dann die Verbindungen noch mit "tcpdump" angesehen und dabei folgendes herausfinden können:

DEV1 IP: xxxx:xxxx:xxxx:xxxx:1::252
DEV3 IP: xxxx:xxxx:xxxx:xxxx:1::2

root@dev1 ~ $ tcpdump host xxxx:xxxx:xxxx:xxxx:1::2
tcpdump: verbose output suppressed, use -v[v]... for full protocol decode
listening on ens18, link-type EN10MB (Ethernet), snapshot length 262144 bytes
14:04:17.522609 IP6 xxxx:xxxx:xxxx:xxxx:1::252.37730 > xxxx:xxxx:xxxx:xxxx:1::2.2222: Flags [ S ], seq 3407613362, win 64800, options [mss 1440,nop,nop,sackOK,nop,wscale 7], length 0
14:04:18.535443 IP6 xxxx:xxxx:xxxx:xxxx:1::252.37730 > xxxx:xxxx:xxxx:xxxx:1::2.2222: Flags [ S ], seq 3407613362, win 64800, options [mss 1440,nop,nop,sackOK,nop,wscale 7], length 0
14:04:20.551438 IP6 xxxx:xxxx:xxxx:xxxx:1::252.37730 > xxxx:xxxx:xxxx:xxxx:1::2.2222: Flags [ S ], seq 3407613362, win 64800, options [mss 1440,nop,nop,sackOK,nop,wscale 7], length 0
14:04:24.683432 IP6 xxxx:xxxx:xxxx:xxxx:1::252.37730 > xxxx:xxxx:xxxx:xxxx:1::2.2222: Flags [ S ], seq 3407613362, win 64800, options [mss 1440,nop,nop,sackOK,nop,wscale 7], length 0
14:04:29.799422 IP6 fe80::8cb9:141:7f34:c830 > xxxx:xxxx:xxxx:xxxx:1::2: ICMP6, neighbor solicitation, who has xxxx:xxxx:xxxx:xxxx:1::2, length 32
14:04:29.799702 IP6 xxxx:xxxx:xxxx:xxxx:1::2 > fe80::8cb9:141:7f34:c830: ICMP6, neighbor advertisement, tgt is xxxx:xxxx:xxxx:xxxx:1::2, length 24
14:04:32.871426 IP6 xxxx:xxxx:xxxx:xxxx:1::252.37730 > xxxx:xxxx:xxxx:xxxx:1::2.2222: Flags [ S ], seq 3407613362, win 64800, options [mss 1440,nop,nop,sackOK,nop,wscale 7], length 0
14:04:48.999445 IP6 xxxx:xxxx:xxxx:xxxx:1::252.37730 > xxxx:xxxx:xxxx:xxxx:1::2.2222: Flags [ S ], seq 3407613362, win 64800, options [mss 1440,nop,nop,sackOK,nop,wscale 7], length 0
^C
8 packets captured
8 packets received by filter
0 packets dropped by kernel
root@dev3 ~ $ tcpdump host xxxx:xxxx:xxxx:xxxx:1::252
tcpdump: verbose output suppressed, use -v[v]... for full protocol decode
listening on ens18, link-type EN10MB (Ethernet), snapshot length 262144 bytes
13:59:02.197254 IP6 xxxx:xxxx:xxxx:xxxx:1::252.45764 > xxxx:xxxx:xxxx:xxxx:1::2.2222: Flags [ S ], seq 162263300, win 64800, options [mss 1440,nop,nop,sackOK,nop,wscale 7], length 0
13:59:02.197277 IP6 xxxx:xxxx:xxxx:xxxx:1::2.2222 > xxxx:xxxx:xxxx:xxxx:1::252.45764: Flags [S.], seq 769303181, ack 162263301, win 64800, options [mss 1440,nop,nop,sackOK,nop,wscale 7], length 0
13:59:03.207951 IP6 xxxx:xxxx:xxxx:xxxx:1::252.45764 > xxxx:xxxx:xxxx:xxxx:1::2.2222: Flags [ S ], seq 162263300, win 64800, options [mss 1440,nop,nop,sackOK,nop,wscale 7], length 0
13:59:03.207977 IP6 xxxx:xxxx:xxxx:xxxx:1::2.2222 > xxxx:xxxx:xxxx:xxxx:1::252.45764: Flags [S.], seq 769303181, ack 162263301, win 64800, options [mss 1440,nop,nop,sackOK,nop,wscale 7], length 0
13:59:04.213128 IP6 xxxx:xxxx:xxxx:xxxx:1::2.2222 > xxxx:xxxx:xxxx:xxxx:1::252.45764: Flags [S.], seq 769303181, ack 162263301, win 64800, options [mss 1440,nop,nop,sackOK,nop,wscale 7], length 0
13:59:05.223941 IP6 xxxx:xxxx:xxxx:xxxx:1::252.45764 > xxxx:xxxx:xxxx:xxxx:1::2.2222: Flags [ S ], seq 162263300, win 64800, options [mss 1440,nop,nop,sackOK,nop,wscale 7], length 0
13:59:05.223963 IP6 xxxx:xxxx:xxxx:xxxx:1::2.2222 > xxxx:xxxx:xxxx:xxxx:1::252.45764: Flags [S.], seq 769303181, ack 162263301, win 64800, options [mss 1440,nop,nop,sackOK,nop,wscale 7], length 0
13:59:07.253102 IP6 xxxx:xxxx:xxxx:xxxx:1::2.2222 > xxxx:xxxx:xxxx:xxxx:1::252.45764: Flags [S.], seq 769303181, ack 162263301, win 64800, options [mss 1440,nop,nop,sackOK,nop,wscale 7], length 0
13:59:09.287946 IP6 xxxx:xxxx:xxxx:xxxx:1::252.45764 > xxxx:xxxx:xxxx:xxxx:1::2.2222: Flags [ S ], seq 162263300, win 64800, options [mss 1440,nop,nop,sackOK,nop,wscale 7], length 0
13:59:09.287969 IP6 xxxx:xxxx:xxxx:xxxx:1::2.2222 > xxxx:xxxx:xxxx:xxxx:1::252.45764: Flags [S.], seq 769303181, ack 162263301, win 64800, options [mss 1440,nop,nop,sackOK,nop,wscale 7], length 0
13:59:13.525112 IP6 xxxx:xxxx:xxxx:xxxx:1::2.2222 > xxxx:xxxx:xxxx:xxxx:1::252.45764: Flags [S.], seq 769303181, ack 162263301, win 64800, options [mss 1440,nop,nop,sackOK,nop,wscale 7], length 0
13:59:17.479957 IP6 xxxx:xxxx:xxxx:xxxx:1::252.45764 > xxxx:xxxx:xxxx:xxxx:1::2.2222: Flags [ S ], seq 162263300, win 64800, options [mss 1440,nop,nop,sackOK,nop,wscale 7], length 0
13:59:17.480011 IP6 xxxx:xxxx:xxxx:xxxx:1::2.2222 > xxxx:xxxx:xxxx:xxxx:1::252.45764: Flags [S.], seq 769303181, ack 162263301, win 64800, options [mss 1440,nop,nop,sackOK,nop,wscale 7], length 0
^C
13 packets captured
13 packets received by filter
0 packets dropped by kernel

Dabei ist mir dann aufgefallen, dass offenbar die Pakete an den DEV3 ankommen und DEV3 auch Pakete zurückschickt, diese aber nicht beim DEV1 ankommen.
Dann habe ich mir die Logs in der OpnSense Firewall angesehen und festgestellt, dass die Pakete, die zurückkommen sollten, geblockt werden (Default deny / state violation rule).
Interface Time Source Destination Proto Label
lan 2023-11-17T14:07:59 [xxxx:xxxx:xxxx:xxxx:1::2]:2222 [xxxx:xxxx:xxxx:xxxx:1::252]:56976 tcp Default deny / state violation rule
lan 2023-11-17T14:07:41 [xxxx:xxxx:xxxx:xxxx:1::2]:2222 [xxxx:xxxx:xxxx:xxxx:1::252]:56976 tcp Default deny / state violation rule
lan 2023-11-17T14:07:25 [xxxx:xxxx:xxxx:xxxx:1::2]:2222 [xxxx:xxxx:xxxx:xxxx:1::252]:56976 tcp Default deny / state violation rule
lan 2023-11-17T14:07:17 [xxxx:xxxx:xxxx:xxxx:1::2]:2222 [xxxx:xxxx:xxxx:xxxx:1::252]:56976 tcp Default deny / state violation rule
lan 2023-11-17T14:07:09 [xxxx:xxxx:xxxx:xxxx:1::2]:2222 [xxxx:xxxx:xxxx:xxxx:1::252]:56976 tcp Default deny / state violation rule
lan 2023-11-17T14:07:05 [xxxx:xxxx:xxxx:xxxx:1::2]:2222 [xxxx:xxxx:xxxx:xxxx:1::252]:56976 tcp Default deny / state violation rule
lan 2023-11-17T14:07:01 [xxxx:xxxx:xxxx:xxxx:1::2]:2222 [xxxx:xxxx:xxxx:xxxx:1::252]:56976 tcp Default deny / state violation rule
lan 2023-11-17T14:06:59 [xxxx:xxxx:xxxx:xxxx:1::2]:2222 [xxxx:xxxx:xxxx:xxxx:1::252]:56976 tcp Default deny / state violation rule
lan 2023-11-17T14:06:57 [xxxx:xxxx:xxxx:xxxx:1::2]:2222 [xxxx:xxxx:xxxx:xxxx:1::252]:56976 tcp Default deny / state violation rule
lan 2023-11-17T14:06:55 [xxxx:xxxx:xxxx:xxxx:1::2]:2222 [xxxx:xxxx:xxxx:xxxx:1::252]:56976 tcp Default deny / state violation rule
lan 2023-11-17T14:06:55 [xxxx:xxxx:xxxx:xxxx:1::2]:2222 [xxxx:xxxx:xxxx:xxxx:1::252]:56976 tcp Default deny / state violation rule
lan 2023-11-17T14:06:54 [xxxx:xxxx:xxxx:xxxx:1::2]:2222 [xxxx:xxxx:xxxx:xxxx:1::252]:56976 tcp Default deny / state violation rule
lan 2023-11-17T14:05:05 [xxxx:xxxx:xxxx:xxxx:1::2]:2222 [xxxx:xxxx:xxxx:xxxx:1::252]:37730 tcp Default deny / state violation rule
lan 2023-11-17T14:04:49 [xxxx:xxxx:xxxx:xxxx:1::2]:2222 [xxxx:xxxx:xxxx:xxxx:1::252]:37730 tcp Default deny / state violation rule
lan 2023-11-17T14:04:40 [xxxx:xxxx:xxxx:xxxx:1::2]:2222 [xxxx:xxxx:xxxx:xxxx:1::252]:37730 tcp Default deny / state violation rule
lan 2023-11-17T14:04:36 [xxxx:xxxx:xxxx:xxxx:1::2]:2222 [xxxx:xxxx:xxxx:xxxx:1::252]:33146 tcp Default deny / state violation rule
lan 2023-11-17T14:04:33 [xxxx:xxxx:xxxx:xxxx:1::2]:2222 [xxxx:xxxx:xxxx:xxxx:1::252]:37730 tcp Default deny / state violation rule
lan 2023-11-17T14:04:29 [xxxx:xxxx:xxxx:xxxx:1::2]:2222 [xxxx:xxxx:xxxx:xxxx:1::252]:37730 tcp Default deny / state violation rule
lan 2023-11-17T14:04:24 [xxxx:xxxx:xxxx:xxxx:1::2]:2222 [xxxx:xxxx:xxxx:xxxx:1::252]:37730 tcp Default deny / state violation rule
lan 2023-11-17T14:04:22 [xxxx:xxxx:xxxx:xxxx:1::2]:2222 [xxxx:xxxx:xxxx:xxxx:1::252]:37730 tcp Default deny / state violation rule
lan 2023-11-17T14:04:20 [xxxx:xxxx:xxxx:xxxx:1::2]:2222 [xxxx:xxxx:xxxx:xxxx:1::252]:37730 tcp Default deny / state violation rule
lan 2023-11-17T14:04:20 [xxxx:xxxx:xxxx:xxxx:1::2]:2222 [xxxx:xxxx:xxxx:xxxx:1::252]:33146 tcp Default deny / state violation rule
lan 2023-11-17T14:04:19 [xxxx:xxxx:xxxx:xxxx:1::2]:2222 [xxxx:xxxx:xxxx:xxxx:1::252]:37730 tcp Default deny / state violation rule
lan 2023-11-17T14:04:18 [xxxx:xxxx:xxxx:xxxx:1::2]:2222 [xxxx:xxxx:xxxx:xxxx:1::252]:37730 tcp Default deny / state violation rule
lan 2023-11-17T14:04:17 [xxxx:xxxx:xxxx:xxxx:1::2]:2222 [xxxx:xxxx:xxxx:xxxx:1::252]:37730 tcp Default deny / state violation rule
lan 2023-11-17T14:04:12 [xxxx:xxxx:xxxx:xxxx:1::2]:2222 [xxxx:xxxx:xxxx:xxxx:1::252]:33146 tcp Default deny / state violation rule

Nach einer kurzen Recherche habe ich herausgefunden das es eventuell an der "State Type" Option in der Default LAN Regel für den Internen verkehr liegt.
Daraufhin habe ich unter "Firewall" ⇒ "Rules" ⇒ "LAN" ⇒ "Default allow LAN IPv6 to any rule" ⇒ "Advanced features" ⇒ "State Type" auf "none" gestellt.

Siehe da, die Verbindungen werden nicht mehr blockiert und die Verbindungen über IPv6 funktionieren wieder alle.

ABER:
Ich sehe das als eher bedenklich an die State Inspection zu deaktivieren.
Es muss doch einen Grund haben, warum in Debian 11 alles problemlos läuft und unter Debian 12 anscheinend die States nicht mehr korrekt zugeordnet werden. (Oder verstehe ich da was falsch?)
 
Nachtrag:
Leider hat auch die Umstellung des State Types keine dauerhafte Besserung gebracht.
Es wird auf der Firewall zwar wirklich nichts mehr blockiert aber warum auch immer funktioniert es weiterhin nicht.
Zum einen konnten dann die Debian 11 Systeme einander nicht mehr erreichen und nach einem Neustart aller Systeme war alles wie vorher. Debian 12 kann sich weiterhin nicht mit Debian 11 Systemen über IPv6 verbinden.
 
Hi, anscheinend hat sich einiges geändert zwischen 11 und 12, eventuell versteht Debian 11 das ssh vom Debian 12 nicht. In dem Changelog hier steht was von einer anderen default key exchange method ... ich könnte mir vorstellen, dass es hier zu einem Kommunikationsprotokoll zwischen den unterschiedlichen Protokollen kommt.

Von hier: You'll need to use -vv when running SSH to figure out what the server offers in ciphers, and probably manually enable one of these

Kann es sein, dass man auf 12 ein cipher nutzen muss, das Debian 11 unterstützt?

Nachtrag:
Running ssh with debug enabled shows this error (ssh -vvvv [host name]):
debug1: send_pubkey_test: no mutual signature algorithm

It looks like ssh version included in Bookworm deprecated ssh-rsa key exchange algorithm (because of hash function vulnerabilities?)
If you need to use that particular algorithm add this line to your ~/.ssh/config file:
PubkeyAcceptedKeyTypes +ssh-rsa
 
Der Weg mit tcpdump war trotzdem der Richtige. Damit hast du das erste Hindernis ja schon mal identifiziert. Da ja jetzt keine Pakete mehr auf der Firewall blockiert werden, ist es nun an der Zeit herauszufinden, was danach passiert. Vergleiche vielleicht auch mal funktionierende mit nicht funktionierenden Verbindungsaufbauten. Hinweis: Man kann tcpdump Mitschnitte auch sehr komfortabel in Wireshark laden und dort analysieren. Das wird vor allem bei der Betrachtung der tieferen Protokollschichten sonst sehr unübersichtlich (und die tieferen Schichten halte ich durchaus für beachtenswert in diesem Fall, vor allem in Bezug auf MTU, MSS, und Portauswahl).
 
@frabron Danke für den Ansatz, das kann es an der Stelle aber leider nicht sein, da der Schlüsselaustausch noch gar nicht stattfindet. Zumal das Problem auch auf anderen Ports wie 3306 mit MariaDB existiert.
Die Verbindung kommt zwischen den Parteien gar nicht erst zustande.

@riversource Letztendlich habe ich mir alles noch mal genau mit tcpdump angesehen, auch Danke für den Tipp mit Wireshark, so haben wir das durchaus besser sehen können.

Folgendes:
Ich habe mir die Pakete bei den Verbindungen, die Funktionieren und nicht Funktionieren, angesehen und habe Folgendes feststellen können.
Bei den funktionierenden Verbindungen wird ganz normal der Verbindungsaufbau initiiert. SYN ⇒ SYN, ACK ⇒ ACK usw.
Bei den nicht funktionierenden Verbindungen wurde die Verbindung unterbrochen. SYN ⇒ SYN, ACK ⇒ RST
Beim SYN, ACK ist mir aufgefallen, dass plötzlich nicht der Server die Antwort gegeben hat, sondern die Firewall. Ich vermute schwer, dass dadurch der Server RST zurückgegeben hat, da er die Antwort nicht von der Firewall erwartet hat.

Lange Rede kurzer Sinn, es lag an den Port Forwarding Regeln für IPv6, die ich eigentlich gar nicht brauche. Wir betreiben ja auch kein NAT für IPv6. Der Aufbau hat also schon mal keinen Sinn ergeben.


So, nun kam ich aber auf die Idee den State Type für das LAN Interface wieder auf "keep state" zurückzustellen.
Jetzt habe ich wieder genau das Problem, das ich bei #3 geschildert habe.
Debian 12 Systeme können über IPv6 untereinander kommunizieren. Aber Debian 12 nicht mit Debian 11 Systemen.
Klar kann ich Quick and Dirty jetzt auf dem LAN Interface das einfach auf "none" gestellt lassen. Mich interessiert es jetzt aber, warum Debian 12 in die Default Deny Regel rennt und Debian 11 aber nicht.
 
HayKer schrieb:
Lange Rede kurzer Sinn, es lag an den Port Forwarding Regeln für IPv6, die ich eigentlich gar nicht brauche. Wir betreiben ja auch kein NAT für IPv6. Der Aufbau hat also schon mal keinen Sinn ergeben.
Also du hattest IPv6 Portforwarding Regeln drin, die sich auch auf Quell-Adressen aus dem LAN auswirkten, und seit du sie gelöscht hast, ist das Problem weg, und du kannst Verbindungen aufbauen?

HayKer schrieb:
Mich interessiert es jetzt aber, warum Debian 12 in die Default Deny Regel rennt und Debian 11 aber nicht.
Alle Werkzeuge dafür hast du ja nun. Schau dir die Pakete an, identifiziere die Unterschiede, und gleiche sie mit den Regeln ab: Welcher Parameter könnte zuschlagen?
 
Zurück
Oben