From 8242e6fc5baa61d9bc1ce295ab05ed0d3a9a32c3 Mon Sep 17 00:00:00 2001 From: Joanna Rutkowska Date: Thu, 18 Aug 2011 15:49:49 +0200 Subject: [PATCH] vm: allow user-define hook for IP change event This is especially useful for proxy VMs that e.g. run some transparent proxy service such as tor, and need to rebind it upon IP change (of course this assumes iptables-based transparent redirection such as DNAT). --- common/setup_ip | 1 + 1 file changed, 1 insertion(+) diff --git a/common/setup_ip b/common/setup_ip index ad42cf4..43d1439 100755 --- a/common/setup_ip +++ b/common/setup_ip @@ -19,6 +19,7 @@ if [ x$ip != x ]; then echo "NS1=$gateway" > /var/run/qubes/qubes_ns echo "NS2=$secondary_dns" >> /var/run/qubes/qubes_ns /usr/lib/qubes/qubes_setup_dnat_to_ns + [ -x /rw/config/qubes_ip_change_hook ] && /rw/config/qubes_ip_change_hook fi fi