Index: /trunk/src/VBox/Devices/Network/slirp/ip_input.c
===================================================================
--- /trunk/src/VBox/Devices/Network/slirp/ip_input.c	(revision 19976)
+++ /trunk/src/VBox/Devices/Network/slirp/ip_input.c	(revision 19977)
@@ -45,4 +45,7 @@
 #include <slirp.h>
 #include "ip_icmp.h"
+#ifdef VBOX_WITH_SLIRP_ALIAS
+# include "alias.h"
+#endif
 
 
@@ -171,4 +174,11 @@
      * Switch out to protocol's input routine.
      */
+#ifdef VBOX_WITH_SLIRP_ALIAS
+    {
+        int rc;
+        rc = LibAliasIn(LIST_FIRST(&instancehead), mtod(m, char *), ip->ip_len);
+        Log2(("NAT: LibAlias return %d\n", rc));
+    }
+#endif
     ipstat.ips_delivered++;
     switch (ip->ip_p)
Index: /trunk/src/VBox/Devices/Network/slirp/slirp.c
===================================================================
--- /trunk/src/VBox/Devices/Network/slirp/slirp.c	(revision 19976)
+++ /trunk/src/VBox/Devices/Network/slirp/slirp.c	(revision 19977)
@@ -17,4 +17,7 @@
 # define _WINSOCK2API_
 # include <IPHlpApi.h>
+#endif
+#ifdef VBOX_WITH_SLIRP_ALIAS
+# include<alias.h>
 #endif
 
@@ -662,5 +665,5 @@
 #endif
 #ifdef VBOX_WITHOUT_SLIRP_CLIENT_ETHER
-    pData->slirp_ethaddr = &special_ethaddr;
+    pData->slirp_ethaddr = &special_ethaddr[0];
 #endif
     alias_addr.s_addr = special_addr.s_addr | htonl(CTL_ALIAS);
@@ -682,4 +685,18 @@
 
     getouraddr(pData);
+
+#ifdef VBOX_WITH_SLIRP_ALIAS
+    {
+        struct libalias *lib = NULL; 
+        lib = LibAliasInit(pData, NULL);
+        if (lib == NULL)
+        {
+            LogRel(("NAT: LibAlias default rule wasn't initialized\n"));
+            AssertMsgFailed(("NAT: LibAlias default rule wasn't initialized\n"));
+        }
+        LibAliasSetAddress(lib, special_addr);
+        
+    }
+#endif
     return fNATfailed ? VINF_NAT_DNS : VINF_SUCCESS;
 }
Index: /trunk/src/VBox/Devices/Network/slirp/slirp.h
===================================================================
--- /trunk/src/VBox/Devices/Network/slirp/slirp.h	(revision 19976)
+++ /trunk/src/VBox/Devices/Network/slirp/slirp.h	(revision 19977)
@@ -36,4 +36,5 @@
 #include <iprt/string.h>
 #include <iprt/dir.h>
+#include <iprt/rand.h>
 #include <VBox/types.h>
 
@@ -373,3 +374,21 @@
 AssertCompileSize(struct ethhdr, 14);
 # endif
-#endif
+#if defined(VBOX_WITH_SLIRP_ALIAS) && defined(VBOX_SLIRP_ALIAS)
+# define ip_next(ip) (uintptr_t)((uint8_t *)(ip) + ((ip)->ip_hl << 2))
+# define bcopy(src, dst, len) memcpy((dst), (src), (len)) 
+# define NO_FW_PUNCH
+# ifdef alias_addr
+#  error  alias_addr has already defined!!!
+# endif
+# define arc4random() RTRandU32()
+# undef malloc
+# undef calloc
+# undef free
+# define	malloc(x) RTMemAlloc((x))
+# define	calloc(x, n) RTMemAllocZ((x)*(n))
+# define	free(x)	RTMemFree((x))
+# ifndef __unused
+#  define __unused
+# endif
+#endif
+#endif
Index: /trunk/src/VBox/Devices/Network/slirp/slirp_state.h
===================================================================
--- /trunk/src/VBox/Devices/Network/slirp/slirp_state.h	(revision 19976)
+++ /trunk/src/VBox/Devices/Network/slirp/slirp_state.h	(revision 19977)
@@ -226,4 +226,7 @@
     bool use_dns_proxy;
 #endif
+#ifdef VBOX_WITH_SLIRP_ALIAS
+    LIST_HEAD(, libalias) instancehead;
+#endif
     STAMPROFILE StatFill;
     STAMPROFILE StatPoll;
@@ -308,5 +311,7 @@
 #define tt pData->tt
 #define our_addr pData->our_addr
-#define alias_addr pData->alias_addr
+#ifndef VBOX_SLIRP_ALIAS
+# define alias_addr pData->alias_addr
+#endif
 #define special_addr pData->special_addr
 #define dns_addr pData->dns_addr
@@ -665,3 +670,7 @@
 #endif
 
+#ifdef VBOX_WITH_SLIRP_ALIAS
+# define instancehead pData->instancehead
+#endif
+
 #endif /* !_slirp_state_h_ */
