title: How to do whitelist of IP's in Express?
body: <p>I need to block every IP address from accessing my site except one or two IP's provided by myself. I have tried many modules but nothing seems to work. </p>
  
  <pre><code>var express = require('express')
  var AccessControl = require('express-ip-access-control');
  var app = express()
  
  app.get('/', function (req, res) {
    res.send('Hello World!')
  })
  
  var middleware = AccessControl(options);
   app.use(AccessControl(options));
  
  var options = {
      mode: 'deny',
      denys: [],
      allows: ['**8.1**.1.**'],
      forceConnectionAddress: false,
      log: function(clientIp, access) {
          console.log(clientIp + (access ? ' accessed.' : ' denied.'));
      },
  
      statusCode: 401,
      redirectTo: '',
      message: 'Unauthorized'
  };
  
  app.listen(3000, function () {
    console.log(' app listening on port 3000!')
  })
  </code></pre>
  
  <p>on running and accessing my site from my above code i am getting the console message as </p>
  
  <pre><code>::ffff:127.0.0.1 accessed.
  ::ffff:127.0.0.1 accessed.
  ::ffff:127.0.0.1 accessed.
  ::ffff:127.0.0.1 accessed.
  </code></pre>
  
  <p>any help?</p>