From b7b7dc77ae3fcb96bd4f57eba5eb87776e953aa4 Mon Sep 17 00:00:00 2001 From: Simon Kobyda Date: Tue, 23 May 2023 14:43:15 +0200 Subject: [PATCH] VNC/SPICE should listen on all interfaces Until now, we only allowed VNC/SPICE console to listen on connections coming from localhost. This however breaks "Desktop viewer" use case where user wants to download a virt-viewer file to a client computer and open a VNC/SPICE console connected to a remote VNC server. Fixes #1078 --- src/scripts/install_machine.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/scripts/install_machine.py b/src/scripts/install_machine.py index 8b75cb9c8..92998b015 100644 --- a/src/scripts/install_machine.py +++ b/src/scripts/install_machine.py @@ -46,8 +46,8 @@ def get_graphics_capabilies(connection): def prepare_graphics_params(connection): graphics_config = { - 'spice': {'listen': '127.0.0.1'}, - 'vnc': {'listen': '127.0.0.1'} + 'spice': {'listen': '0.0.0.0'}, + 'vnc': {'listen': '0.0.0.0'} } try: # Configparser needs a default section @@ -57,12 +57,12 @@ def prepare_graphics_params(connection): config = configparser.ConfigParser() config.read_string(config_string) - graphics_config['spice']['listen'] = config['dummy_section'].get('spice_listen', '127.0.0.1') + graphics_config['spice']['listen'] = config['dummy_section'].get('spice_listen', '0.0.0.0') spice_password = config['dummy_section'].get('spice_password', None) if spice_password is not None: graphics_config['spice']['password'] = spice_password - graphics_config['vnc']['listen'] = config['dummy_section'].get('vnc_listen', '127.0.0.1') + graphics_config['vnc']['listen'] = config['dummy_section'].get('vnc_listen', '0.0.0.0') vnc_password = config['dummy_section'].get('vnc_password', None) if vnc_password is not None: graphics_config['vnc']['password'] = vnc_password