Index: trunk/src/VBox/Devices/Network/slirp/libalias/alias_dns.c
===================================================================
--- trunk/src/VBox/Devices/Network/slirp/libalias/alias_dns.c	(revision 39774)
+++ trunk/src/VBox/Devices/Network/slirp/libalias/alias_dns.c	(revision 39775)
@@ -377,4 +377,12 @@
 
 #ifdef VBOX_WITH_DNSMAPPING_IN_HOSTRESOLVER
+static bool isDnsMappingEntryMatchOrEqual2Str(const PDNSMAPPINGENTRY pDNSMapingEntry, const char *pcszString)
+{
+    return (    (   pDNSMapingEntry->pszCName
+                 && !strcmp(pDNSMapingEntry->pszCName, pcszString))
+            || (   pDNSMapingEntry->pszPattern
+                && RTStrSimplePatternMatch(pDNSMapingEntry->pszPattern, pcszString)));
+}
+
 static void alterHostentWithDataFromDNSMap(PNATState pData, struct hostent *pHostent)
 {
@@ -384,5 +392,5 @@
     {
         char **pszAlias = NULL;
-        if (!strcmp(pDNSMapingEntry->pszCName, pHostent->h_name))
+        if (isDnsMappingEntryMatchOrEqual2Str(pDNSMapingEntry, pHostent->h_name))
         {
             fMatch = true;
@@ -392,5 +400,5 @@
         for (pszAlias = pHostent->h_aliases; *pszAlias && !fMatch; pszAlias++)
         {
-            if (!strcmp(pDNSMapingEntry->pszCName, *pszAlias))
+            if (isDnsMappingEntryMatchOrEqual2Str(pDNSMapingEntry, *pszAlias))
             {
 
Index: trunk/src/VBox/Devices/Network/slirp/libslirp.h
===================================================================
--- trunk/src/VBox/Devices/Network/slirp/libslirp.h	(revision 39774)
+++ trunk/src/VBox/Devices/Network/slirp/libslirp.h	(revision 39775)
@@ -149,5 +149,5 @@
 
 #ifdef VBOX_WITH_DNSMAPPING_IN_HOSTRESOLVER
-void  slirp_add_host_resolver_mapping(PNATState pData, const char *pszHostName, uint32_t u32HostIP);
+void  slirp_add_host_resolver_mapping(PNATState pData, const char *pszHostName, const char *pszHostNamePattern, uint32_t u32HostIP);
 #endif
 
Index: trunk/src/VBox/Devices/Network/slirp/slirp.c
===================================================================
--- trunk/src/VBox/Devices/Network/slirp/slirp.c	(revision 39774)
+++ trunk/src/VBox/Devices/Network/slirp/slirp.c	(revision 39775)
@@ -2159,10 +2159,14 @@
 }
 #ifdef VBOX_WITH_DNSMAPPING_IN_HOSTRESOLVER
-void  slirp_add_host_resolver_mapping(PNATState pData, const char *pszHostName, uint32_t u32HostIP)
-{
-    LogFlowFunc(("ENTER: pszHostName:%s, u32HostIP:%RTnaipv4\n", pszHostName, u32HostIP));
-    if (   pszHostName
-        || u32HostIP != INADDR_ANY
-        || u32HostIP != INADDR_BROADCAST)
+void  slirp_add_host_resolver_mapping(PNATState pData, const char *pszHostName, const char *pszHostNamePattern, uint32_t u32HostIP)
+{
+    LogFlowFunc(("ENTER: pszHostName:%s, pszHostNamePattern:%s u32HostIP:%RTnaipv4\n",
+                pszHostName ? pszHostName : "(null)",
+                pszHostNamePattern ? pszHostNamePattern : "(null)",
+                u32HostIP));
+    if (   (   pszHostName
+            || pszHostNamePattern)
+        && u32HostIP != INADDR_ANY
+        && u32HostIP != INADDR_BROADCAST)
     {
         PDNSMAPPINGENTRY pDnsMapping = RTMemAllocZ(sizeof(DNSMAPPINGENTRY));
@@ -2174,8 +2178,12 @@
         }
         pDnsMapping->u32IpAddress = u32HostIP;
-        pDnsMapping->pszCName = RTStrDup(pszHostName);
-        if (!pDnsMapping->pszCName)
-        {
-            LogFunc(("Can't allocate enough room for %s\n", pszHostName));
+        if (pszHostName)
+            pDnsMapping->pszCName = RTStrDup(pszHostName);
+        else if (pszHostNamePattern)
+            pDnsMapping->pszPattern = RTStrDup(pszHostNamePattern);
+        if (   !pDnsMapping->pszCName
+            && !pDnsMapping->pszPattern)
+        {
+            LogFunc(("Can't allocate enough room for %s\n", pszHostName ? pszHostName : pszHostNamePattern));
             RTMemFree(pDnsMapping);
             LogFlowFuncLeave();
Index: trunk/src/VBox/Devices/Network/slirp/slirp_state.h
===================================================================
--- trunk/src/VBox/Devices/Network/slirp/slirp_state.h	(revision 39774)
+++ trunk/src/VBox/Devices/Network/slirp/slirp_state.h	(revision 39775)
@@ -69,5 +69,11 @@
 typedef struct DNSMAPPINGENTRY
 {
+    /*
+     * host name to map
+     * Note: if pszCName isn't null pszPattern won't be used (see alias_dns.c for details)
+     */
     char        *pszCName;
+    /* pattern of hostnames to map to specifaied IP */
+    char        *pszPattern;
     uint32_t    u32IpAddress;
     LIST_ENTRY(DNSMAPPINGENTRY) MapList;
