Skip to content
basic iptables control via nodejs
Branch: master
Clone or download
Latest commit ac5979d Feb 2, 2012
Type Name Latest commit message Commit time
Failed to load latest commit information.
index.js added .list() that returns all rules in the given chain Jun 26, 2011
package.json update package json Feb 1, 2012
readme.txt add twitter handle to readme Apr 3, 2011


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:

Peteris Krumins (twitter: @pkrumins)

You can’t perform that action at this time.