node package manager
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org ยป


This is a node.js module for controlling iptables. It's very basic just for what we need at

It was written by Peteris Krumins (, @pkrumins on twitter). His blog is at -- good coders code, great reuse.

Here is an example usage:

var iptables = require('iptables');

    protocol : tcp,
    src : '',
    dport : 34567,
    sudo : true

    protocol : 'tcp',
    dport : 34567,
    sudo : true

This allows connections to port 34567 from and drops connections from the same port from everyone else.

Ps. I once wrote an article on iptables on my blog, check it out:

Sincerely, Peteris Krumins (twitter: @pkrumins)