node package manager


Run iptables commands from node.js

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)