diff --git a/src/vpn-manager/nm-vpn-connection.c b/src/vpn-manager/nm-vpn-connection.c
index cb07c7f..33d450d 100644
--- a/src/vpn-manager/nm-vpn-connection.c
+++ b/src/vpn-manager/nm-vpn-connection.c
@@ -44,6 +44,7 @@
 #include "nm-agent-manager.h"
 #include "nm-core-internal.h"
 #include "nm-default-route-manager.h"
+#include "nm-dns-manager.h"
 
 #include "nm-vpn-connection-glue.h"
 
@@ -958,6 +959,20 @@ nm_vpn_connection_apply_config (NMVpnConnection *connection)
 	return TRUE;
 }
 
+#define CLEAR_IP4_CONFIG(config) \
+{ \
+	if (config) \
+		nm_dns_manager_remove_ip4_config (nm_dns_manager_get (), config); \
+	g_clear_object (&config); \
+}
+
+#define CLEAR_IP6_CONFIG(config) \
+{ \
+	if (config) \
+		nm_dns_manager_remove_ip6_config (nm_dns_manager_get (), config); \
+	g_clear_object (&config); \
+}
+
 static void
 nm_vpn_connection_config_maybe_complete (NMVpnConnection *connection,
                                          gboolean         success)
@@ -987,8 +1002,8 @@ nm_vpn_connection_config_maybe_complete (NMVpnConnection *connection,
 			return;
 	}
 
-	g_clear_object (&priv->ip4_config);
-	g_clear_object (&priv->ip6_config);
+	CLEAR_IP4_CONFIG (priv->ip4_config);
+	CLEAR_IP6_CONFIG (priv->ip6_config);
 
 	nm_log_warn (LOGD_VPN, "VPN connection '%s' did not receive valid IP config information.",
 	             nm_connection_get_id (priv->connection));
@@ -1107,7 +1122,7 @@ nm_vpn_connection_config_get (DBusGProxy *proxy,
 		else
 			LOG_INVALID_ARG (NM_VPN_PLUGIN_CONFIG_HAS_IP4);
 	}
-	g_clear_object (&priv->ip4_config);
+	CLEAR_IP4_CONFIG (priv->ip4_config);
 
 	val = g_hash_table_lookup (config_hash, NM_VPN_PLUGIN_CONFIG_HAS_IP6);
 	priv->has_ip6 = FALSE;
@@ -1117,7 +1132,7 @@ nm_vpn_connection_config_get (DBusGProxy *proxy,
 		else
 			LOG_INVALID_ARG (NM_VPN_PLUGIN_CONFIG_HAS_IP6);
 	}
-	g_clear_object (&priv->ip6_config);
+	CLEAR_IP6_CONFIG (priv->ip6_config);
 }
 
 guint32
