diff --git a/server/vino-dbus-listener.c b/server/vino-dbus-listener.c
index 6caf5b1..e1d34fc 100644
--- a/server/vino-dbus-listener.c
+++ b/server/vino-dbus-listener.c
@@ -123,7 +123,7 @@ get_local_hostname (VinoDBusListener *listener)
   getifaddrs (&myaddrs);
   for (ifa = myaddrs; ifa != NULL; ifa = ifa->ifa_next)
     {
-      if (ifa->ifa_addr == NULL || ifa->ifa_name == NULL || (ifa->ifa_flags & IFF_UP) == 0)
+      if (ifa->ifa_addr == NULL || ifa->ifa_name == NULL || (ifa->ifa_flags & IFF_UP) == 0 || (ifa->ifa_flags & IFF_RUNNING) == 0)
 	continue;
 
       switch (ifa->ifa_addr->sa_family)
@@ -160,6 +160,8 @@ get_local_hostname (VinoDBusListener *listener)
     {
       if (strncmp (key, "lo", 2) == 0)
 	continue;
+      if (strncmp (key, "vboxnet", 7) == 0)
+	continue;
       retval = g_strdup (value);
       goto the_end;
     }
@@ -169,6 +171,8 @@ get_local_hostname (VinoDBusListener *listener)
     {
       if (strncmp (key, "lo", 2) == 0)
 	continue;
+      if (strncmp (key, "vboxnet", 7) == 0)
+	continue;
       retval = g_strdup (value);
       goto the_end;
     }
