v1.1.0
Simple IPTables helper/wrapper
Supports both IPv4 (iptables) and IPv6 (ip6tables) via family property of constructor options.
Documentation
https://gibme-npm.github.io/iptables/
Sample Code
import IPTables from '@gibme/iptables';
(async() => {
const firewall = new IPTables({
chain: 'INPUT' // dangerous during flush
});
await firewall.add('8.8.8.8', 'DROP');
await firewall.addInterface('eth2', 'DROP');
await firewall.delete('8.8.8.8');
await firewall.deleteInterface('eth2');
})();