How do I prevent libvirt from adding iptables rules for guest NAT networks?

Posted by Jack Douglas on Server Fault See other posts from Server Fault or by Jack Douglas
Published on 2012-12-10T11:30:44Z Indexed on 2012/12/10 23:06 UTC
Read the original article Hit count: 304

Similar to this old request on BugZilla for Fedora 8, I'm hoping something has changed since then or someone knows another way.

I want to manage the iptables rules by hand—the one-size-fits-all automatic rules don't suit me at all. These rules seem to be added and removed when a network is started and destroyed. Is there a way of either preventing these rules being added at all or hooking a script into the network start that restores the default rules afterwards.

For now, I'm using a very crude method with cron, but I hope there is a better way:

  *  *  *  *  * root    iptables-restore < /etc/sysconfig/iptables

© Server Fault or respective owner

Related posts about iptables

Related posts about kvm-virtualization