Class: Tablomat::IP6Tables

Inherits:
IPTablesBase show all
Defined in:
lib/tablomat/iptables.rb

Overview

The IP6Tables interface

Instance Attribute Summary

Attributes inherited from IPTablesBase

#active, #builtin_chains, #iptables_bin, #tmp_chain

Instance Method Summary collapse

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

exec

Constructor Details

#initializeIP6Tables

Returns a new instance of IP6Tables.



211
212
213
214
215
216
217
# File 'lib/tablomat/iptables.rb', line 211

def initialize
  super()
  # ip6tables must be in PATH
  @iptables_bin = 'ip6tables'
  @iptables_bin = "sudo #{@iptables_bin}" if Etc.getlogin != 'root'
  synchronize
end