diff --git a/daemon/face/tcp-channel.cpp b/daemon/face/tcp-channel.cpp
index bb47ab3..34b734a 100644
--- a/daemon/face/tcp-channel.cpp
+++ b/daemon/face/tcp-channel.cpp
@@ -124,7 +124,7 @@
   tcp::Endpoint remoteEndpoint = socket->remote_endpoint();
 
   shared_ptr<Face> face;
-  if (is_loopback(socket->local_endpoint().address()))
+  if (socket->local_endpoint().address().is_loopback())
     face = make_shared<TcpLocalFace>(boost::cref(socket));
   else
     face = make_shared<TcpFace>(boost::cref(socket));
diff --git a/daemon/face/tcp-face.hpp b/daemon/face/tcp-face.hpp
index 21b13f2..1686403 100644
--- a/daemon/face/tcp-face.hpp
+++ b/daemon/face/tcp-face.hpp
@@ -41,32 +41,6 @@
   TcpLocalFace(const shared_ptr<protocol::socket>& socket);
 };
 
-//
-
-inline bool
-is_loopback(const boost::asio::ip::address& address)
-{
-#if BOOST_VERSION < 104700
-  if (address.is_v4())
-    {
-      return (address.to_v4().to_ulong() & 0xFF000000) == 0x7F000000;
-    }
-  else
-    {
-      boost::asio::ip::address_v6::bytes_type v6_addr = address.to_v6().to_bytes();
-      return ((v6_addr[0] == 0) && (v6_addr[1] == 0)
-              && (v6_addr[2] == 0) && (v6_addr[3] == 0)
-              && (v6_addr[4] == 0) && (v6_addr[5] == 0)
-              && (v6_addr[6] == 0) && (v6_addr[7] == 0)
-              && (v6_addr[8] == 0) && (v6_addr[9] == 0)
-              && (v6_addr[10] == 0) && (v6_addr[11] == 0)
-              && (v6_addr[12] == 0) && (v6_addr[13] == 0)
-              && (v6_addr[14] == 0) && (v6_addr[15] == 1));
-    }
-#else
-  return address.is_loopback();
-#endif
-}
 
 /** \brief Class validating use of TcpLocalFace
  */
@@ -80,8 +54,8 @@
   static void
   validateSocket(boost::asio::ip::tcp::socket& socket)
   {
-    if (!is_loopback(socket.local_endpoint().address()) ||
-        !is_loopback(socket.remote_endpoint().address()))
+    if (!socket.local_endpoint().address().is_loopback() ||
+        !socket.remote_endpoint().address().is_loopback())
       {
         throw Face::Error("TcpLocalFace can be created only on loopback interface");
       }
diff --git a/daemon/face/unix-stream-channel-factory.cpp b/daemon/face/unix-stream-channel-factory.cpp
index cc86333..ededecd 100644
--- a/daemon/face/unix-stream-channel-factory.cpp
+++ b/daemon/face/unix-stream-channel-factory.cpp
@@ -6,9 +6,7 @@
 
 #include "unix-stream-channel-factory.hpp"
 
-#if BOOST_VERSION >= 104800
 #include <boost/filesystem.hpp> // for canonical()
-#endif
 
 namespace nfd {
 
@@ -20,13 +18,9 @@
 shared_ptr<UnixStreamChannel>
 UnixStreamChannelFactory::create(const std::string& unixSocketPath)
 {
-#if BOOST_VERSION >= 104800
   boost::filesystem::path p(unixSocketPath);
   p = boost::filesystem::canonical(p.parent_path()) / p.filename();
   unix_stream::Endpoint endpoint(p.string());
-#else
-  unix_stream::Endpoint endpoint(unixSocketPath);
-#endif
 
   shared_ptr<UnixStreamChannel> channel = find(endpoint);
   if (channel)
diff --git a/wscript b/wscript
index 8591b35..c46c2d0 100644
--- a/wscript
+++ b/wscript
@@ -53,8 +53,10 @@
     conf.check_boost(lib=boost_libs)
         
     boost_version = conf.env.BOOST_VERSION.split('_')
-    if int(boost_version[0]) < 1 or int(boost_version[1]) < 42:
-        Logs.error ("Minumum required boost version is 1.42")
+    if int(boost_version[0]) < 1 or int(boost_version[1]) < 48:
+        Logs.error ("Minimum required boost version is 1.48")
+        Logs.error ("Please upgrade your distribution or install custom boost libraries" +
+                    " (http://redmine.named-data.net/projects/nfd/wiki/Boost_FAQ)")
         return
 
     conf.load('unix-socket')
