Skip to main content


Showing posts from July, 2017

Setting up the HOOK mechanism in libvirt for KVM/QEMU to manage customized networking requirements

This post is a belated follow-up to a post I did 3 years ago about configuring Linux KVM networking to use IP forwarding when IP spoofing is disallowed by your dedicated Linux server provider.  Such as 1and1 in my case.

For further context and reference please refer to the original post here:

Refer to:

A small bash script file that can be used to test the more complex hook script below

# Location/File: ~/fixnet
#Quick Fix IP Tables
echo 'default' is usually 'virbr0' and this is assumed!
sudo /etc/libvirt/hooks/network default started end

Content of the bash script file located at /etc/libvirt/hooks/network

# Location/File: /etc/libvirt/hooks/network
# Sep2014 Created by Rod Dines rod<at>
# Feb2016 edited by Rod Dines to refine scripting
# July2017 edited by Rod Dines to setup for new server IPs

# Note: This file must be set with exe…