node package manager


Lightweight Connect Middleware access control with ip addresses


ipsentry is a lightweight piece of Connect Middleware to provide access control based on a ip addresses.

via npm

npm install ipsentry

ipsentry expects an array of ip addresses. These are whitelisted for access.

If a client tries to connect from an invalid ip address a 403 response will be returned.

For connect

var connect = require('connect'),
  http = require('http')
  ipsentry = require('ipsentry');

function accessGranted(req, res){
  res.end('ipsentry says yes!');
var app = connect()

For express

var express = require('express'),
  ipsentry = require('ipsentry'),
  app = express();


app.get('/', function(req, res){
  res.send('ipsentry says yes!');