My *nix world

Disable libvirt nwfilter rules

By default the libvirt daemon will create some iptables rules for its NAT virtual network (if any). Those rules may not be exactly what you want, so the question is "how to disable libvirt nwfilter rules?".

One possible solution (by the book) is to create a bridged virtual network instead of the NAT one.

If that is too complicated for you then you can hack the init script of libvirtd daemon (/etc/init.d/libvirtd) like I did.

All you have to do is to change the start() function from this one:

to the following one:

By flushing the iptables chain/rules you just disabled libvirt nwfilter rules. Simple, right? Maybe it's not the most orthodox way of doing it but it always works.

Now, if you think that this article was interesting don't forget to rate it. It shows me that you care and thus I will continue write about these things.

The following two tabs change content below.
Disable libvirt nwfilter rules

Eugen Mihailescu

Founder/programmer/one-man-show at Cubique Software
Always looking to learn more about *nix world, about the fundamental concepts of math, physics, electronics. I am also passionate about programming, database and systems administration. 16+ yrs experience in software development, designing enterprise systems, IT support and troubleshooting.

Leave a Reply

Your email address will not be published. Required fields are marked *


Get every new post on this blog delivered to your Inbox.

Join other followers: