Module: Puffy::Formatters::Netfilter
- Defined in:
- lib/puffy/formatters/netfilter.rb
Overview
:nodoc:
Defined Under Namespace
Class Method Summary collapse
-
.iptables_action(rule_or_action, ret: false) ⇒ String
Returns the target to jump to.
Class Method Details
.iptables_action(rule_or_action, ret: false) ⇒ String
Returns the target to jump to
9 10 11 12 13 14 15 16 |
# File 'lib/puffy/formatters/netfilter.rb', line 9 def self.iptables_action(rule_or_action, ret: false) case rule_or_action when :pass then 'ACCEPT' when :log then 'LOG' when :block then ret ? 'RETURN' : 'DROP' when Puffy::Rule then iptables_action(rule_or_action.action, ret: rule_or_action.return) end end |