Sha256: 18473d300d849c876278a009a6db258d086ae025fba1f1542c9fbd7a59c095f5

Contents?: true

Size: 338 Bytes

Versions: 22

Compression:

Stored size: 338 Bytes

Contents


def fw_rules_defined?
  not `iptables -nL | grep -iv ^chain | grep -iv ^target | grep -v ^$`.empty?
end

puts "Firewall Service:".bold.ljust(40) + (system_service_on?('iptables') ? 'Active'.yellow.bold : 'Disabled'.green.bold)

puts "Firewall Rules:".bold.ljust(40) + (fw_rules_defined? ? 'Found'.yellow.bold : "Not Found".green.bold)

Version data entries

22 entries across 8 versions & 1 rubygems

Version Path
abiquo-etk-0.6.4 lib/checks/1.8.0/firewall.rb
abiquo-etk-0.6.4 lib/checks/1.7.6/firewall.rb
abiquo-etk-0.6.4 lib/checks/1.7.5/firewall.rb
abiquo-etk-0.6.3 lib/checks/1.7.5/firewall.rb
abiquo-etk-0.6.3 lib/checks/1.8.0/firewall.rb
abiquo-etk-0.6.3 lib/checks/1.7.6/firewall.rb
abiquo-etk-0.6.2 lib/checks/1.7.6/firewall.rb
abiquo-etk-0.6.2 lib/checks/1.8.0/firewall.rb
abiquo-etk-0.6.2 lib/checks/1.7.5/firewall.rb
abiquo-etk-0.6.1 lib/checks/1.7.6/firewall.rb
abiquo-etk-0.6.1 lib/checks/1.7.5/firewall.rb
abiquo-etk-0.6.1 lib/checks/1.8.0/firewall.rb
abiquo-etk-0.6.0 lib/checks/1.8.0/firewall.rb
abiquo-etk-0.6.0 lib/checks/1.7.6/firewall.rb
abiquo-etk-0.6.0 lib/checks/1.7.5/firewall.rb
abiquo-etk-0.5.9 lib/checks/1.7.5/firewall.rb
abiquo-etk-0.5.9 lib/checks/1.8.0/firewall.rb
abiquo-etk-0.5.9 lib/checks/1.7.6/firewall.rb
abiquo-etk-0.5.8 lib/checks/1.7.5/firewall.rb
abiquo-etk-0.5.8 lib/checks/1.8.0/firewall.rb