Bash script implementating libvirt hooks for settiing up iptable port-forwading rules for NATed networking. Port-forwarding rules are stored in a JSON file.
jq for parsing JSON files.
To install the hook script and it's configuration files, simply use the Makefile_:
$ sudo make install
Afterwards customize /etc/libvirt/hooks/hooks.json to your needs and restart libvirt service. This Makefile target can be invoked multiple times, already installed configuration files won't be touched. The files can be removed again with:
$ sudo make uninstall
This project is licensed under the GPL v3.0 - see the LICENSE file for details
- The basic function of hooks for libvirt is documented on the libvirt webpage
- The idea for this script is based on an entry in the libvirt-wiki