Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description
Service firewalld stops virt-viewer --direct work,refer to bug 1079211 comment 3,filed the bug,not sure whether it is the right component,pls move it to the right component if I am wrong.
Version:
virt-viewer-0.5.7-7.el7.x86_64
libvirt-1.1.1-29.el7.x86_64
firewalld-0.3.9-7.el7.noarch
How reproducible:
100%
Steps to Reproduce:
1.On host A(ip:10.66.5.145),prepare a vnc guest.
# virsh dumpxml demo-vnc
<graphics type='vnc' port='-1' autoport='yes' listen='10.66.5.145'/>
2.On host A(ip:10.66.5.145),virt-viewer --direct can launch the demo-vnc successfully.
3.On host B(ip:10.66.5.7)
3.1 If enable service firewalld,--direct fails with the blow error:
# systemctl status firewalld.service
firewalld.service - firewalld - dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled)
Active: active (running) since Fri 2014-04-04 02:45:37 EDT; 1h 24min ago
Main PID: 490 (firewalld)
CGroup: /system.slice/firewalld.service
└─490 /usr/bin/python -Es /usr/sbin/firewalld --nofork --nopid
Apr 04 02:45:33 localhost.localdomain systemd[1]: Starting firewalld - dynamic firewall daemon...
Apr 04 02:45:37 localhost.localdomain systemd[1]: Started firewalld - dynamic firewall daemon.
# virt-viewer --direct -c qemu+ssh://10.66.5.145/system demo-vnc
"Unable to connect to the graphic server 10.66.5.145:5900"
3.2 If I disable service sfirewalld,then I can use --direct to connect demo-vnc successfully.
# systemctl stop firewalld.service
# systemctl status firewalld.service
firewalld.service - firewalld - dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled)
Active: inactive (dead) since Fri 2014-04-04 04:11:25 EDT; 2min 59s ago
Process: 490 ExecStart=/usr/sbin/firewalld --nofork --nopid $FIREWALLD_ARGS (code=exited, status=0/SUCCESS)
Main PID: 490 (code=exited, status=0/SUCCESS)
# virt-viewer --direct -c qemu+ssh://10.66.5.145/system demo-vnc
Actual results:
As described.
Expected results:
step 3.1,guest can be launched successfully.
Additional info:
The above issue can be reproduced on spice guest.
I've been able to reproduce it using (per bug #1079211, comment #3)
# remote-viewer vnc://<host-A>:5900
IMHO one needs to explicitly allow port 5900/tcp (i.e. vnc-server service in firewalld) on the host machine if (s)he wants to access guests via vnc from remote machine.
Can you confirm that (on host A)
# firewall-cmd --add-service=vnc-server
# firewall-cmd --permanent --add-service=vnc-server
fixes the problem ?
IMHO there's no bug here, just admin config error. The --direct flag to virt-viewer requires that the VNC/SPICE server is listening on a public IP addr and the firewall ports be open. It has always been the admin's responsibility to configure their firewall to allow these ports. Neither libvirt or virt-viewer will touch the firewall for this.
(In reply to Jiri Popelka from comment #2)
> I've been able to reproduce it using (per bug #1079211, comment #3)
> # remote-viewer vnc://<host-A>:5900
>
> IMHO one needs to explicitly allow port 5900/tcp (i.e. vnc-server service in
> firewalld) on the host machine if (s)he wants to access guests via vnc from
> remote machine.
>
> Can you confirm that (on host A)
> # firewall-cmd --add-service=vnc-server
> # firewall-cmd --permanent --add-service=vnc-server
> fixes the problem ?
Yes,after do the above command,the issue has been fixed,so I closed the bug.