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.
Bug 1084367 - Service firewalld stops virt-viewer --direct work
Summary: Service firewalld stops virt-viewer --direct work
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: firewalld
Version: 7.1
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Thomas Woerner
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-04-04 08:16 UTC by tingting zheng
Modified: 2014-04-08 02:31 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-04-08 02:31:42 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description tingting zheng 2014-04-04 08:16:41 UTC
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.

Comment 2 Jiri Popelka 2014-04-07 14:24:56 UTC
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 ?

Comment 3 Daniel Berrangé 2014-04-07 14:46:41 UTC
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.

Comment 4 tingting zheng 2014-04-08 02:31:42 UTC
(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.


Note You need to log in before you can comment on or make changes to this bug.