Class: Tablomat::IPTables
- Inherits:
-
IPTablesBase
- Object
- IPTablesBase
- Tablomat::IPTables
- Defined in:
- lib/tablomat/iptables.rb
Overview
The IPTables interface
Instance Attribute Summary
Attributes inherited from IPTablesBase
#active, #builtin_chains, #iptables_bin, #tmp_chain
Instance Method Summary collapse
-
#initialize ⇒ IPTables
constructor
A new instance of IPTables.
Methods inherited from IPTablesBase
#activate, #append, #deactivate, #delete, #exec, #exists, #get_active_rules, #insert, #normalize, #parse_chain, #parse_data, #parse_output, #parse_table, #print, #switch_sources, #synchronize, #table
Methods included from Exec
Constructor Details
#initialize ⇒ IPTables
Returns a new instance of IPTables.
200 201 202 203 204 205 206 |
# File 'lib/tablomat/iptables.rb', line 200 def initialize super() # iptables must be in PATH @iptables_bin = 'iptables' @iptables_bin = "sudo #{@iptables_bin}" if Etc.getlogin != 'root' synchronize end |