forked from pkrumins/node-iptables
-
Notifications
You must be signed in to change notification settings - Fork 0
/
readme.txt
39 lines (26 loc) · 1.05 KB
/
readme.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
This is a node.js module for controlling iptables. It's very basic just for
what we need at http://browserling.com.
It was written by Peteris Krumins ([email protected], @pkrumins on twitter).
His blog is at http://www.catonmat.net -- good coders code, great reuse.
------------------------------------------------------------------------------
Here is an example usage:
var iptables = require('iptables');
iptables.allow({
protocol : tcp,
src : '10.1.1.5',
dport : 34567,
sudo : true
});
iptables.drop({
protocol : 'tcp',
dport : 34567,
sudo : true
});
This allows connections to port 34567 from 10.1.1.5 and drops connections from
the same port from everyone else.
------------------------------------------------------------------------------
Ps. I once wrote an article on iptables on my blog, check it out:
http://www.catonmat.net/blog/traffic-accounting-with-iptables
Sincerely,
Peteris Krumins (twitter: @pkrumins)
http://www.catonmat.net