How can I properly add basic network filters (clean-traffic or, at least, ip-spoofing prevention) to XEN (xend) guests managed by libvirt?
Or, in particular, can I manually execute libvirt's nwfilters from a script (for given parameters)?
I am using libvirt's network to create the bridge (default
, bridge virbr0
), but, apparently, the xen's vif-bridge
script is used to initialize the virtualized system's networking, and libvirt drops nwfilter
definitions in domain's xml (probably because it is converted to xen's native config).
I've also looked into that subject. Here is what Xen 4.x can offer, although it is not well documented and illustrated with sample scripts.
xend-config.sxp - Xen daemon configuration file
You may override global
vif-script
by usingscript
keyword inside avif
option value of any guest configuration.XL Network Configuration
For most Linux systems substitute XEN_SCRIPT_DIR with
/etc/xen/scripts
.There is also at least one more specific solution in the following Xen-users mailing list discussion: preventing Hwaddr spoofing on bridge