Skip to main content

Posts

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: http://roddines.blogspot.com/2014/09/how-to-configure-dedicated-server.html Refer to: https://www.libvirt.org/hooks.html A small bash script file that can be used to test the more complex hook script below #!/bin/bash # 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 #!/bin/bash # Location/File: /etc/libvirt/hooks/network # Sep2014 Created by Rod Dines rod<at>roddines.com # Feb2016 edited by Rod Dines to refine scripting # July2017 edited by Rod Dines to setup for new server IPs