{"_id":"netfilter","_rev":"33-f8f181a5ab300d0e3a6486b889861727","name":"netfilter","description":"Packet filtering framework. Wrapper to provide netfilter capabilities from Node.js","dist-tags":{"latest":"0.3.3"},"versions":{"0.1.0":{"name":"netfilter","version":"0.1.0","description":"Packet filtering framework. Wrapper to provide netfilter capabilities from Node.js","main":"index.js","keywords":["stateless","stateful","packet","filter","filtering","network address translation","nat","napt","pat","network address translation","port address translation","iptables","ipset","conntrack","firewall","masquerade","masquerading","policy","mangle","mangling"],"dependencies":{"async":"*"},"engines":{"node":">=0.8.0"},"homepage":"https://github.com/diosney/node-netfilter","bugs":{"url":"https://github.com/diosney/node-netfilter/issues"},"author":{"name":"Diosney Sarmiento","email":"diosney.s@gmail.com"},"license":"MIT","repository":{"type":"git","url":"https://github.com/diosney/node-netfilter.git"},"_id":"netfilter@0.1.0","dist":{"shasum":"89664ba90430b5ffe7a5cde326b5964eb664cb55","tarball":"https://registry.npmjs.org/netfilter/-/netfilter-0.1.0.tgz","integrity":"sha512-SGTHhWc9ezDofVwE7YIQkEaIKzivZOcurjeMph8yBSxeSL9jP28MBkw1IG+jWWoi4gv1RIr2HFSwtOnaqhQwxA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAXwqcII4XywHYjjrZNsQ6hx4L6d1IFcqly3PQKfMpN1AiBYbZziAyIRBJYra4ub0UcbweeXAKLMWwkP642m28lUBg=="}]},"_from":".","_npmVersion":"1.3.24","_npmUser":{"name":"diosney","email":"diosney.s@gmail.com"},"maintainers":[{"name":"diosney","email":"diosney.s@gmail.com"}]},"0.2.0":{"name":"netfilter","version":"0.2.0","description":"Packet filtering framework. Wrapper to provide netfilter capabilities from Node.js","main":"index.js","keywords":["stateless","stateful","packet","filter","filtering","network address translation","nat","napt","pat","network address translation","port address translation","iptables","ipset","conntrack","firewall","masquerade","masquerading","policy","mangle","mangling","alias","set"],"dependencies":{"async":"*"},"engines":{"node":">=0.8.0"},"homepage":"https://github.com/diosney/node-netfilter","bugs":{"url":"https://github.com/diosney/node-netfilter/issues"},"author":{"name":"Diosney Sarmiento","email":"diosney.s@gmail.com"},"license":"MIT","repository":{"type":"git","url":"https://github.com/diosney/node-netfilter.git"},"_id":"netfilter@0.2.0","dist":{"shasum":"13512e7943146eefbd528cedcdcd067088830b59","tarball":"https://registry.npmjs.org/netfilter/-/netfilter-0.2.0.tgz","integrity":"sha512-3MJzjoqoO4+rr6BpXq+V4wyOQVsR3TnTDjlZKHCkavr6fFIE+AFaulQPb8yv9dWSop0+W6NPf+oARH9KevOQhw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCeXXmCRDcSc8otK2zws9BoiOBaqP6zZkvEZCV1sFuAiwIhANuuGyvcMpl5PfZLShTshsJQSqz2FL6EFNjpWFW/M7Ze"}]},"_from":".","_npmVersion":"1.3.10","_npmUser":{"name":"diosney","email":"diosney.s@gmail.com"},"maintainers":[{"name":"diosney","email":"diosney.s@gmail.com"}]},"0.2.1":{"name":"netfilter","version":"0.2.1","description":"Packet filtering framework. Wrapper to provide netfilter capabilities from Node.js","main":"index.js","keywords":["stateless","stateful","packet","filter","filtering","network address translation","nat","napt","pat","network address translation","port address translation","iptables","ipset","conntrack","firewall","masquerade","masquerading","policy","mangle","mangling","alias","set"],"dependencies":{"async":"*"},"engines":{"node":">=0.8.0"},"homepage":"https://github.com/diosney/node-netfilter","bugs":{"url":"https://github.com/diosney/node-netfilter/issues"},"author":{"name":"Diosney Sarmiento","email":"diosney.s@gmail.com"},"license":"MIT","repository":{"type":"git","url":"https://github.com/diosney/node-netfilter.git"},"_id":"netfilter@0.2.1","dist":{"shasum":"c5ecea22cd3d57aaf9f3436d818517979e4002dd","tarball":"https://registry.npmjs.org/netfilter/-/netfilter-0.2.1.tgz","integrity":"sha512-y0JgwpxfKPt7AjdERnBQLkODSv4dT9zMkE/ls0O87aF/1cnHBvq9d35tgu8dXUq4EJu2viBXPPyW72YQM1U/+g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIErF9DurCtnITAflRIoI7d7/49WF32mnc5pebW/UHXJaAiBrUYf9QALZvUJMknD+KfoueCF1fUBzQN3hqzgAOEQg5g=="}]},"_from":".","_npmVersion":"1.3.10","_npmUser":{"name":"diosney","email":"diosney.s@gmail.com"},"maintainers":[{"name":"diosney","email":"diosney.s@gmail.com"}]},"0.2.2":{"name":"netfilter","version":"0.2.2","description":"Packet filtering framework. Wrapper to provide netfilter capabilities from Node.js","main":"index.js","keywords":["stateless","stateful","packet","filter","filtering","network address translation","nat","napt","pat","network address translation","port address translation","iptables","ipset","conntrack","firewall","masquerade","masquerading","policy","mangle","mangling","alias","set"],"dependencies":{"async":"*"},"engines":{"node":">=0.8.0"},"homepage":"https://github.com/diosney/node-netfilter","bugs":{"url":"https://github.com/diosney/node-netfilter/issues"},"author":{"name":"Diosney Sarmiento","email":"diosney.s@gmail.com"},"license":"MIT","repository":{"type":"git","url":"https://github.com/diosney/node-netfilter.git"},"_id":"netfilter@0.2.2","dist":{"shasum":"d07cc9391bde91d4bf7372aa187875237b32d519","tarball":"https://registry.npmjs.org/netfilter/-/netfilter-0.2.2.tgz","integrity":"sha512-PzKLfCfsxaVcQlcynyDIspP7WB7juPm2h2C2m3H+vXo5qA7kN8zS/7JDtClOZHIyhzEJefw45+GExTyFSnsdgQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD7/1t8Mj+65QxEKC0j3e2TwtL8WhT4yPoGNklsOexSWwIhAN5ry+EABp3Z/0/iPeppwF1jVVQzaBlooP65TyJYJ2O3"}]},"_from":".","_npmVersion":"1.3.10","_npmUser":{"name":"diosney","email":"diosney.s@gmail.com"},"maintainers":[{"name":"diosney","email":"diosney.s@gmail.com"}]},"0.2.3":{"name":"netfilter","version":"0.2.3","description":"Packet filtering framework. Wrapper to provide netfilter capabilities from Node.js","main":"index.js","keywords":["stateless","stateful","packet","filter","filtering","network address translation","nat","napt","pat","network address translation","port address translation","iptables","ipset","conntrack","firewall","masquerade","masquerading","policy","mangle","mangling","alias","set"],"dependencies":{"async":"*"},"engines":{"node":">=0.8.0"},"homepage":"https://github.com/diosney/node-netfilter","bugs":{"url":"https://github.com/diosney/node-netfilter/issues"},"author":{"name":"Diosney Sarmiento","email":"diosney.s@gmail.com"},"license":"MIT","repository":{"type":"git","url":"https://github.com/diosney/node-netfilter.git"},"_id":"netfilter@0.2.3","dist":{"shasum":"1d33c0e0bb70bba3720253e0abf8d756350ac9b4","tarball":"https://registry.npmjs.org/netfilter/-/netfilter-0.2.3.tgz","integrity":"sha512-n4kY/Jub7DiVRsLbigr4YFpgM+sCBmKBNzNmneoyC4U8xz5tdZoPwQBeYsBzx+hpFsac1HYmRBxvLil49wX7dQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDDnwIT/bFNze+TjtQxXY7p1GjjVzD0Ks7da5UMY8jpwAiEA5BHYpQY4XzvmZm9ybUdNkfkzeGOx5+u5+Qu1kK8UoFM="}]},"_from":".","_npmVersion":"1.3.10","_npmUser":{"name":"diosney","email":"diosney.s@gmail.com"},"maintainers":[{"name":"diosney","email":"diosney.s@gmail.com"}]},"0.3.0":{"name":"netfilter","version":"0.3.0","description":"Packet filtering framework. Wrapper to provide netfilter capabilities from Node.js","main":"index.js","keywords":["stateless","stateful","packet","filter","filtering","network address translation","nat","napt","pat","network address translation","port address translation","iptables","ipset","conntrack","firewall","masquerade","masquerading","policy","mangle","mangling","alias","set"],"dependencies":{"async":"~0.9.0","process-queue":"^1.0.1","shell-quote":"^1.4.2"},"devDependencies":{"should":"~4.0.4","mocha":"~1.20.1"},"engines":{"node":">=0.8.0"},"homepage":"https://github.com/diosney/node-netfilter","bugs":{"url":"https://github.com/diosney/node-netfilter/issues"},"author":{"name":"Diosney Sarmiento","email":"diosney.s@gmail.com"},"license":"MIT","repository":{"type":"git","url":"https://github.com/diosney/node-netfilter.git"},"scripts":{"test":"node test/*.js"},"_id":"netfilter@0.3.0","dist":{"shasum":"d298c4287efbdc1449dffe7b08c84987a4b5b4ba","tarball":"https://registry.npmjs.org/netfilter/-/netfilter-0.3.0.tgz","integrity":"sha512-+FLQWsw7qPEJjCUnHt58y2jXNjd9W7v8vfOJp4jxewv7pSAjP59G0fcmgPhBOuOPLXbeuyPSzNA2+w+y2/GB5w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDV5m4roIiB9qtwfkmXNRxNw9b+ZaL34vAD+G0413FrIwIgaeYKiynihaAsnTSBYDmusymL3TEnPcVwBpKokH2R+oE="}]},"_from":".","_npmVersion":"1.3.10","_npmUser":{"name":"diosney","email":"diosney.s@gmail.com"},"maintainers":[{"name":"diosney","email":"diosney.s@gmail.com"}]},"0.3.1":{"name":"netfilter","version":"0.3.1","description":"Packet filtering framework. Wrapper to provide netfilter capabilities from Node.js","main":"index.js","keywords":["stateless","stateful","packet","filter","filtering","network address translation","nat","napt","pat","network address translation","port address translation","iptables","ipset","conntrack","firewall","masquerade","masquerading","policy","mangle","mangling","alias","set"],"dependencies":{"async":"~0.9.0","has":"0.0.1","process-queue":"^1.0.1","shell-quote":"^1.4.2"},"devDependencies":{"mocha":"^1.21.4","should":"^4.0.4"},"engines":{"node":">=0.8.0"},"homepage":"https://github.com/diosney/node-netfilter","bugs":{"url":"https://github.com/diosney/node-netfilter/issues"},"author":{"name":"Diosney Sarmiento","email":"diosney.s@gmail.com"},"license":"MIT","repository":{"type":"git","url":"https://github.com/diosney/node-netfilter.git"},"scripts":{"test":"mocha --recursive --timeout 5000 --reporter spec test/"},"_id":"netfilter@0.3.1","dist":{"shasum":"f499a77ab6ab230dd9d85cf40abc8f90b60187ce","tarball":"https://registry.npmjs.org/netfilter/-/netfilter-0.3.1.tgz","integrity":"sha512-T4ZlWqrcgHYQiV8JS6Ue8YJdsfmVobgSH2dm++rXlrw/kpCO7jyszJ3ZuSQo4SbOj5W5krPKZ1yNVA8I0YqcQg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDO+SyqmamkIZouw31zWnYyMYcpXl5qDrS3HB96StN6eAiAIiPb2IE9wpat2PUFgOPuz5ToZWXCjlnbMk9isOj1jyg=="}]},"_from":".","_npmVersion":"1.3.10","_npmUser":{"name":"diosney","email":"diosney.s@gmail.com"},"maintainers":[{"name":"diosney","email":"diosney.s@gmail.com"}]},"0.3.2":{"name":"netfilter","version":"0.3.2","description":"Packet filtering framework. Wrapper to provide netfilter capabilities from Node.js","main":"index.js","keywords":["stateless","stateful","packet","filter","filtering","network address translation","nat","napt","pat","network address translation","port address translation","iptables","ipset","conntrack","firewall","masquerade","masquerading","policy","mangle","mangling","alias","set"],"dependencies":{"async":"~0.9.0","has":"0.0.1","process-queue":"^1.0.1","shell-quote":"^1.4.2"},"devDependencies":{"mocha":"^1.21.4","should":"^4.0.4"},"engines":{"node":">=0.8.0"},"homepage":"https://github.com/diosney/node-netfilter","bugs":{"url":"https://github.com/diosney/node-netfilter/issues"},"author":{"name":"Diosney Sarmiento","email":"diosney.s@gmail.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/diosney/node-netfilter.git"},"scripts":{"test":"mocha --recursive --timeout 5000 --reporter spec test/"},"gitHead":"c31702ac15062ead0e7c054752afa63c13cb2971","_id":"netfilter@0.3.2","_shasum":"de94eea67884db3ad100a10010dbd67c3a1fc32e","_from":".","_npmVersion":"3.9.5","_nodeVersion":"6.2.2","_npmUser":{"name":"diosney","email":"diosney.s@gmail.com"},"dist":{"shasum":"de94eea67884db3ad100a10010dbd67c3a1fc32e","tarball":"https://registry.npmjs.org/netfilter/-/netfilter-0.3.2.tgz","integrity":"sha512-JlAYVCTQC7+g6RoCUkp8quaOQLH/nCYq6mrqDNFh8sv/L6iPSefCPgVYgsHwQceG4Ep8S0JjLaQzpJEeT7SaKA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDhkoS5/njSkjes2zDtnrC/fjAX0PBTUm4jERQwcXLk8QIhAMqxOsFSTSp3CLqi3o9Y3sxwQpWGmv9/J9ixF5eKoJto"}]},"maintainers":[{"name":"diosney","email":"diosney.s@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/netfilter-0.3.2.tgz_1467653889980_0.8893546720501035"}},"0.3.3":{"name":"netfilter","version":"0.3.3","description":"Packet filtering framework. Wrapper to provide netfilter capabilities from Node.js","main":"index.js","keywords":["stateless","stateful","packet","filter","filtering","network address translation","nat","napt","pat","network address translation","port address translation","iptables","ipset","conntrack","firewall","masquerade","masquerading","policy","mangle","mangling","alias","set"],"dependencies":{"async":"~0.9.0","has":"0.0.1","process-queue":"^1.0.1","shell-quote":"^1.4.2"},"devDependencies":{"mocha":"^1.21.4","should":"^4.0.4"},"engines":{"node":">=0.8.0"},"homepage":"https://github.com/diosney/node-netfilter","bugs":{"url":"https://github.com/diosney/node-netfilter/issues"},"author":{"name":"Diosney Sarmiento","email":"diosney.s@gmail.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/diosney/node-netfilter.git"},"scripts":{"test":"mocha --recursive --timeout 5000 --reporter spec test/"},"gitHead":"b94f5bba7cac48cfe9801b40cfee3d4ce0de2ff8","_id":"netfilter@0.3.3","_shasum":"d6723271fdf8039fe57392d98d41ce900026911a","_from":".","_npmVersion":"3.9.5","_nodeVersion":"6.2.2","_npmUser":{"name":"diosney","email":"diosney.s@gmail.com"},"dist":{"shasum":"d6723271fdf8039fe57392d98d41ce900026911a","tarball":"https://registry.npmjs.org/netfilter/-/netfilter-0.3.3.tgz","integrity":"sha512-79BB2QhG4irP7FdMT0hsEziMSUKvR1G8VQ9P1rNQddiAYwdRs57C7NCxK4G86z74HJr5MibG7P7u6rihoGEjbg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFqBu1vSp/PUP0+TUTLtsAfsO4Hrt6t6RyAVbNnIN3d2AiEAkWr3TNRaCPduw2fqU3qmiL2fDZWdl/Kt1d+01CrAjFM="}]},"maintainers":[{"name":"diosney","email":"diosney.s@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/netfilter-0.3.3.tgz_1467654605641_0.03513986780308187"}}},"readme":"# node-netfilter\n\nPacket filtering framework.\n\nWrapper around native **netfilter** suite to port its functionality to be used in the Node.js space.\n\n## Installation\n\n\t$ npm install netfilter\n\n## Supported functionality\n\n- `iptables`    Administration tool for IPv4 packet filtering and NAT (among other capabilities).\n- `ip6tables`   IPv6 packet filter administration (among other capabilities).\n- `ipsets`      Administration tool for IP sets.\n\n## Requirements\n\nBasically the only system requirement is that the **netfilter** framework have to be present in your system, which almost\nsure is installed by default in Linux based OSes.\n\nOther requirement is about permission levels. To properly execute the provided methods the application that uses the\nmodule must have the proper `sudo` privileges. One way to do it could be by adding a custom user to the system:\n\n`sudo adduser --no-create-home netfilter`\n\nthen add its permissions at `/etc/sudoers` file:\n\n`netfilter ALL=NOPASSWD: /sbin/iptables, /sbin/ip6tables, /sbin/ipset`\n\nand then execute the commands with `sudo: true`:\n\n\tiptables.flush({\n\t\tsudo: true\n\t}, function (error) {\n\t\tif (error) {\n\t\t\tconsole.log(error);\n\t\t}\n\t});\n\n## Issues\n\nThe source is available for download from [GitHub](https://github.com/diosney/node-netfilter)\nand there is a [issue tracker](https://github.com/diosney/node-netfilter/issues) so you can report bugs there.\n\n## Usage\n\nThe package is a collection of utilities that `netfilter` provides, such as `iptables` and `ip6tables`, among others.\nYou can get access to such utilities by issuing:\n\n\tvar iptables = require('netfilter').iptables;\n\nBesides, as a general rule of thumb, all the parameters identifiers are the same that `netfilter` provides, so you\ncan easily use the module with basic knowledge.\n\nThe specific utilities readme are located at:\n\n- [README-iptables](https://github.com/diosney/node-netfilter/blob/master/docs/README-iptables.md)\n- [README-ipset](https://github.com/diosney/node-netfilter/blob/master/docs/README-ipset.md)\n\n## Concurrent commands\n\nThe **netfilter** suite sets a lock when a write operation is already in process, so concurrent\noperations will fail if they hit the lock. To overcome this, a queueing system was implemented with\na default concurrency of one command at a time. If you ever needs to change the queue options or\nincrease the concurrent commands, you can add an `options.queue` parameter to the hash passed to the\ncommand, like:\n\n\tiptables.new({\n\t\tqueue: custom_queue,\n\n\t\ttable: 'filter', // default: filter\n\t\tchain: 'new-user-chain',\n\t}, function (error) {\n\t\tif (error) {\n\t\t\tconsole.log(error);\n\t\t}\n\t});\n\nThis `custom_queue` must be a valid [process-queue](https://www.npmjs.org/package/process-queue) queue.\n\n## Tests\n\nTo run the tests just execute:\n\n\tmake test\n\nand they will run. Note that you have to somehow execute the commands with `sudo` privileges.\n\n**Important:** Some of the commands are destructive, like `flush` and `delete`, and since some tests\nwill try to clear all rules and/or chains, you have to be careful to not have important custom\nrules and/or chains in the testing system if you don't want them to be removed.\n\n## Contributing\n\nJust maintain the overall code style and add or change the respective tests.\n\n## License\n\nThe MIT License (MIT)\n\nCopyright (c) Diosney Sarmiento\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.","maintainers":[{"name":"diosney","email":"diosney.s@gmail.com"}],"time":{"modified":"2022-06-21T00:56:37.353Z","created":"2014-03-27T14:37:36.241Z","0.1.0":"2014-03-27T14:37:36.241Z","0.2.0":"2014-06-09T12:46:25.909Z","0.2.1":"2014-06-30T15:19:42.639Z","0.2.2":"2014-07-03T15:25:33.577Z","0.2.3":"2014-07-03T20:49:17.092Z","0.3.0":"2014-09-26T19:13:39.076Z","0.3.1":"2014-10-08T12:39:19.741Z","0.3.2":"2016-07-04T17:38:12.156Z","0.3.3":"2016-07-04T17:50:08.352Z"},"homepage":"https://github.com/diosney/node-netfilter","keywords":["stateless","stateful","packet","filter","filtering","network address translation","nat","napt","pat","network address translation","port address translation","iptables","ipset","conntrack","firewall","masquerade","masquerading","policy","mangle","mangling","alias","set"],"repository":{"type":"git","url":"git+https://github.com/diosney/node-netfilter.git"},"author":{"name":"Diosney Sarmiento","email":"diosney.s@gmail.com"},"bugs":{"url":"https://github.com/diosney/node-netfilter/issues"},"license":"MIT","readmeFilename":"README.md","users":{"iostat42":true}}