Skip to content
basic iptables control via nodejs
Branch: master
Clone or download
Pull request Compare This branch is even with wkronmiller:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Forked version of npm 'iptables' package with the ability to specify a table when listing rules.

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.