Impossible d'ouvrir une sessoin RDP sur XRDP

bonjour,

j’ai installé XRDP sur une machine, sur laquele je ne veux que deux interfaces accessibles.
elles sont configurées en 192.168.1.254 et 192.168.4.254 en ipv4, fcc0:12b:ff55:1921:6810::fe et fcc0:12b:ff55:1921:6840::fe enipv6.

j’ai modifié mon xrdp.ini avec cette ligne:

port=tcp://192.168.1.254:3389 tcp://192.168.4.254:3389 tcp6://{fcc0:12b:ff55:1921:6810::fe}:3389 tcp6://{fcc0:12b:ff55:1921:6840::fe}:3389

rien pour session.ini
Quand je me connecte avec un client rdp, j’ai bien la mire, je rentre login et mdp correctement, mais la session se ferme immédiatement ou presque. Dans les logs je ne trouve rien d’interessant, voir que la connexion utilisateur est bonne. Alors je n’arrive pas à comprendre.
Il n’y a pas non plus de blocages du parefeu ni en ipv4 ni en ipv6.

Logs xrdp:

[20211030-09:51:06] [INFO ] Socket 15: AF_INET connection received from 192.168.4.52 port 1195
[20211030-09:51:06] [DEBUG] Closed socket 15 (AF_INET 192.168.1.254:3389)
[20211030-09:51:06] [DEBUG] Closed socket 11 (AF_INET 192.168.1.254:3389)
[20211030-09:51:06] [DEBUG] Closed socket 12 (AF_INET 192.168.4.254:3389)
[20211030-09:51:06] [DEBUG] Closed socket 13 (AF_INET6 fcc0:12b:ff55:1921:6810::fe port 3389)
[20211030-09:51:06] [DEBUG] Closed socket 14 (AF_INET6 fcc0:12b:ff55:1921:6840::fe port 3389)
[20211030-09:51:06] [INFO ] Using default X.509 certificate: /etc/xrdp/cert.pem
[20211030-09:51:06] [INFO ] Using default X.509 key file: /etc/xrdp/key.pem
[20211030-09:51:06] [ERROR] Cannot read private key file /etc/xrdp/key.pem: Permission denied
[20211030-09:51:06] [DEBUG] TLSv1.3 enabled
[20211030-09:51:06] [DEBUG] TLSv1.2 enabled
[20211030-09:51:06] [DEBUG] Security layer: requested 11, selected 0
[20211030-09:51:06] [DEBUG] Closed socket 15 (AF_INET 192.168.1.254:3389)
[20211030-09:51:07] [INFO ] Socket 15: AF_INET connection received from 192.168.4.52 port 1196
[20211030-09:51:07] [DEBUG] Closed socket 15 (AF_INET 192.168.1.254:3389)
[20211030-09:51:07] [DEBUG] Closed socket 11 (AF_INET 192.168.1.254:3389)
[20211030-09:51:07] [DEBUG] Closed socket 12 (AF_INET 192.168.4.254:3389)
[20211030-09:51:07] [DEBUG] Closed socket 13 (AF_INET6 fcc0:12b:ff55:1921:6810::fe port 3389)
[20211030-09:51:07] [DEBUG] Closed socket 14 (AF_INET6 fcc0:12b:ff55:1921:6840::fe port 3389)
[20211030-09:51:07] [INFO ] Using default X.509 certificate: /etc/xrdp/cert.pem
[20211030-09:51:07] [INFO ] Using default X.509 key file: /etc/xrdp/key.pem
[20211030-09:51:07] [ERROR] Cannot read private key file /etc/xrdp/key.pem: Permission denied
[20211030-09:51:07] [DEBUG] TLSv1.3 enabled
[20211030-09:51:07] [DEBUG] TLSv1.2 enabled
[20211030-09:51:07] [DEBUG] Security layer: requested 0, selected 0
[20211030-09:51:07] [INFO ] connected client computer name: TZUNKARS
[20211030-09:51:07] [INFO ] adding channel item name rdpdr chan_id 1004 flags 0x80800000
[20211030-09:51:07] [INFO ] adding channel item name rdpsnd chan_id 1005 flags 0xc0000000
[20211030-09:51:07] [INFO ] adding channel item name cliprdr chan_id 1006 flags 0xc0a00000
[20211030-09:51:07] [INFO ] adding channel item name drdynvc chan_id 1007 flags 0xc0800000
[20211030-09:51:07] [INFO ] Non-TLS connection established from 192.168.4.52 port 1196: encrypted with standard RDP security
[20211030-09:51:07] [DEBUG] xrdp_00003263_wm_login_mode_event_00000001
[20211030-09:51:07] [INFO ] Loading keymap file /etc/xrdp/km-0000040c.ini
[20211030-09:51:07] [WARN ] local keymap file for 0x0000040c found and doesn't match built in keymap, using local keymap file
[20211030-09:51:13] [DEBUG] xrdp_wm_log_msg: connecting to sesman ip 127.0.0.1 port 3350
[20211030-09:51:13] [INFO ] xrdp_wm_log_msg: sesman connect ok
[20211030-09:51:13] [DEBUG] xrdp_wm_log_msg: sending login info to session manager, please wait...
[20211030-09:51:13] [DEBUG] return value from xrdp_mm_connect 0
[20211030-09:51:13] [INFO ] xrdp_wm_log_msg: login successful for display 10
[20211030-09:51:13] [DEBUG] xrdp_wm_log_msg: started connecting
[20211030-09:51:14] [INFO ] lib_mod_log_peer: xrdp_pid=12899 connected to X11rdp_pid=12926 X11rdp_uid=1000 X11rdp_gid=1000 client_ip=192.168.4.52 client_port=1196
[20211030-09:51:14] [DEBUG] xrdp_wm_log_msg: connected ok
[20211030-09:51:14] [DEBUG] xrdp_mm_connect_chansrv: chansrv connect successful
[20211030-09:51:14] [DEBUG] Closed socket 16 (AF_INET6 ::1 port 57790)
[20211030-09:51:14] [DEBUG] Closed socket 15 (AF_INET 192.168.1.254:3389)
[20211030-09:51:14] [DEBUG] xrdp_mm_module_cleanup
[20211030-09:51:14] [DEBUG] Closed socket 17 (AF_UNIX)
[20211030-09:51:14] [DEBUG] Closed socket 18 (AF_UNIX)

logs xrdp-session:

[20211030-09:51:13] [INFO ] A connection received from ::1 port 57790
[20211030-09:51:13] [INFO ] ++ created session (access granted): username zargos, ip 192.168.4.52:1196 - socket: 15
[20211030-09:51:13] [INFO ] starting Xorg session...
[20211030-09:51:13] [DEBUG] Closed socket 9 (AF_INET6 :: port 5910)
[20211030-09:51:13] [DEBUG] Closed socket 9 (AF_INET6 :: port 6010)
[20211030-09:51:13] [DEBUG] Closed socket 9 (AF_INET6 :: port 6210)
[20211030-09:51:13] [DEBUG] Closed socket 8 (AF_INET6 ::1 port 3350)
[20211030-09:51:13] [INFO ] calling auth_start_session from pid 12924
[20211030-09:51:13] [DEBUG] Closed socket 7 (AF_INET6 ::1 port 3350)
[20211030-09:51:13] [DEBUG] Closed socket 8 (AF_INET6 ::1 port 3350)
[20211030-09:51:13] [INFO ] /usr/lib/xorg/Xorg :10 -auth .Xauthority -config xrdp/xorg.conf -noreset -nolisten tcp -logfile .xorgxrdp.%s.log
[20211030-09:51:14] [CORE ] waiting for window manager (pid 12925) to exit
[20211030-09:51:14] [CORE ] window manager (pid 12925) did exit, cleaning up session
[20211030-09:51:14] [INFO ] calling auth_stop_session and auth_end from pid 12924
[20211030-09:51:14] [DEBUG] cleanup_sockets:
[20211030-09:51:14] [DEBUG] cleanup_sockets: deleting /run/xrdp/sockdir/xrdpapi_10
[20211030-09:51:14] [INFO ] ++ terminated session:  username zargos, display :10.0, session_pid 12924, ip 192.168.4.52:1196 - socket: 15

Je suppose que tu as vu ça ?

Oui mais je ne comprends pas. Le window manager ne s’est pas arrêté sur la machine.

Sauf erreur de ma part, un window manager est lancé pour chaque session, non ?

Et cette ligne ?

Visiblement Xorg est lancé avec l’option -nolisten tcp

Au temps pour moi, c’est idiot… cf. réponse de @Almtesh

Pas besoin d’écouter en TCP, c’est XRDP qui transfert sur le réseau.

Tout à fait.

Tu es sur quelle version de Debian ?

les machines concernées sont toutes en Debian 11, l’une d’installation d’origine, les autres par migration, mais lors de la migration XRDP n’etait pas installé.