Permalink
Browse files

INPUT is now the default chain

  • Loading branch information...
1 parent 98518fb commit aa0a65e9556899460ff4f43557cbbd712f07c078 @pkrumins committed Apr 1, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −0 index.js
  2. +0 −2 readme.txt
View
@@ -14,6 +14,8 @@ function iptables (rule) {
var cmd = 'iptables';
var args = [];
+ if (!rule.chain) rule.chain = 'INPUT';
+
if (rule.chain) args = args.concat(["-I", rule.chain]);
if (rule.protocol) args = args.concat(["-p", rule.protocol]);
if (rule.src) args = args.concat(["--src", rule.src]);
View
@@ -11,15 +11,13 @@ Here is an example usage:
var iptables = require('iptables');
iptables.allow({
- chain : 'INPUT',
protocol : tcp,
src : '10.1.1.5',
dport : 34567,
sudo : true
});
iptables.deny({
- chain : 'INPUT',
protocol : 'tcp',
dport : 34567,
sudo : true

0 comments on commit aa0a65e

Please sign in to comment.