Sha256: fc1c49df1ef2bec1845711a598ba9cb8b9cf385db4d05c1528c2b8e7b282aebd

Contents?: true

Size: 332 Bytes

Versions: 16

Compression:

Stored size: 332 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'.red.bold : 'Disabled'.green.bold)

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

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
abiquo-etk-0.4.42 lib/checks/firewall.rb
abiquo-etk-0.4.33 lib/checks/firewall.rb
abiquo-etk-0.4.32 lib/checks/firewall.rb
abiquo-etk-0.4.29 lib/checks/firewall.rb
abiquo-etk-0.4.25 lib/checks/firewall.rb
abiquo-etk-0.4.24 lib/checks/firewall.rb
abiquo-etk-0.4.23 lib/checks/firewall.rb
abiquo-etk-0.4.22 lib/checks/firewall.rb
abiquo-etk-0.4.20 lib/checks/firewall.rb
abiquo-etk-0.4.19 lib/checks/firewall.rb
abiquo-etk-0.4.18 lib/checks/firewall.rb
abiquo-etk-0.4.17 lib/checks/firewall.rb
abiquo-etk-0.4.16 lib/checks/firewall.rb
abiquo-etk-0.4.15 lib/checks/firewall.rb
abiquo-etk-0.4.14 lib/checks/firewall.rb
abiquo-etk-0.4.13 lib/checks/firewall.rb