Skip to content

Instantly share code, notes, and snippets.

@cbluth
Last active June 1, 2018 08:28
Show Gist options
  • Save cbluth/61753e8b2568d08294efe556e55246bf to your computer and use it in GitHub Desktop.
Save cbluth/61753e8b2568d08294efe556e55246bf to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
# /etc/libvirt/hooks/network
# https://www.libvirt.org/hooks.html
if [[ "$2" == "started" || "$2" == "plugged" || "$2" == "updated" ]] ; then
/sbin/iptables -D FORWARD -o virbr0 -j REJECT --reject-with icmp-port-unreachable || true
/sbin/iptables -D FORWARD -i virbr0 -j REJECT --reject-with icmp-port-unreachable || true
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment