Bug 812441
Summary: | Libvirt with NAT setup nukes port forwarding into the internal network | ||
---|---|---|---|
Product: | [Community] Virtualization Tools | Reporter: | David Kovalsky <dkovalsk> |
Component: | libvirt | Assignee: | Laine Stump <laine> |
Status: | CLOSED DEFERRED | QA Contact: | |
Severity: | high | Docs Contact: | |
Priority: | high | ||
Version: | unspecified | CC: | benl, crobinso, cwei, dyuan, laine, mavit, mzhan, rbalakri, shyu |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2016-03-23 21:46:43 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
David Kovalsky
2012-04-13 18:00:39 UTC
(In reply to comment #0) > Perhaps libvirt should append instead of insert? > libvirt-0.9.4-23.el6_2.7.x86_64 If libvirt were to append instead of insert, a *large* number of installations would lose network connectivity on their next update, because libvirt's rules would suddenly be behind system-wide rules that overrode them. It's an unfortunate fact of the current state of iptables management that there is no central controlling authority that coordinates which rules are placed before/after which other rules. The firewalld (http://fedoraproject.org/wiki/FirewallD/) project is trying to remedy this, but I haven't heard of any plans to try and get it into RHEL6. Strictly from the point of view of libvirt config (regardless of the underlying implementation), I think the proper way to solve this type of problem is for libvirt's nwfilter to support "port-forward" rules that will end up putting the necessary DNAT and ACCEPT rules into iptables at the appropriate place whenever the guest is started. nwfilter already does this for standard ACCEPT rules. There's a proposal upstream to add a <forward> element to interfaces that use qemu's "user mode" networking (in this case, the port to be forwarded, and port to forward to, etc, are all just added to the qemu commandline): https://www.redhat.com/archives/libvir-list/2012-May/msg00849.html https://www.redhat.com/archives/libvir-list/2012-May/msg00850.html We may be able to use the same XML as an indicator to write iptables NAT rules for the guest. Of course it would be nice if we didn't need to know the guest's IP address beforehand, but that would require using the new dhcp snooping support, and I think that may only be usable from within nwfilter. Reporter is gone, and this isn't causing many other complaints, so just closing. There's enough other network stuff that needs handling :) |