From 20eb11f9fdd9e5af1e3149c5ccb71168fa8d3596 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Romain=20Tarti=C3=A8re?= Date: Sat, 17 Dec 2022 07:49:23 -1000 Subject: [PATCH] Rename Netfilter classes to Iptables These renamings should have been part of #19. --- README.md | 2 +- features/generate.feature | 4 ++-- lib/puffy/formatters/iptables4.rb | 2 +- lib/puffy/formatters/iptables6.rb | 2 +- lib/puffy/puppet.rb | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 53b5434..db9e5da 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ ## Features -* Generate rules for [Netfilter](http://www.netfilter.org/) and [PF](http://www.openbsd.org/faq/pf/) (extensible); +* Generate rules for [iptables](http://www.netfilter.org/) and [PF](http://www.openbsd.org/faq/pf/) (extensible); * IPv6 and IPv4 support; * Define the configuration of multiple *nodes* in a single file; * Define *services* as group of rules to mix-in in *nodes* rules definitions; diff --git a/features/generate.feature b/features/generate.feature index df131d3..b2ffc79 100644 --- a/features/generate.feature +++ b/features/generate.feature @@ -20,7 +20,7 @@ Feature: Generate firewall rules """ Scenario: Generate IPv4 firewall rules for a Linux node - When I successfully run `puffy generate -f Netfilter4 network.puffy example.com` + When I successfully run `puffy generate -f Iptables4 network.puffy example.com` Then the stdout should contain: """ -A INPUT -m conntrack --ctstate NEW -p tcp --dport 80 -j ACCEPT @@ -28,7 +28,7 @@ Feature: Generate firewall rules """ Scenario: Generate IPv6 firewall rules for a Linux node - When I successfully run `puffy generate -f Netfilter6 network.puffy example.com` + When I successfully run `puffy generate -f Iptables6 network.puffy example.com` Then the stdout should contain: """ -A INPUT -m conntrack --ctstate NEW -p tcp --dport 80 -j ACCEPT diff --git a/lib/puffy/formatters/iptables4.rb b/lib/puffy/formatters/iptables4.rb index aa1290b..a29d469 100644 --- a/lib/puffy/formatters/iptables4.rb +++ b/lib/puffy/formatters/iptables4.rb @@ -2,7 +2,7 @@ module Puffy module Formatters - module Netfilter4 # :nodoc: + module Iptables4 # :nodoc: # IPv4 Iptables implementation of a Puffy Ruleset formatter. class Ruleset < Puffy::Formatters::Iptables::Ruleset # :nodoc: # Return an IPv4 Iptables String representation of the provided +rules+ Puffy::Rule with the +policy+ policy. diff --git a/lib/puffy/formatters/iptables6.rb b/lib/puffy/formatters/iptables6.rb index 5f9e409..91d27eb 100644 --- a/lib/puffy/formatters/iptables6.rb +++ b/lib/puffy/formatters/iptables6.rb @@ -2,7 +2,7 @@ module Puffy module Formatters - module Netfilter6 # :nodoc: + module Iptables6 # :nodoc: # IPv6 Iptables implementation of a Puffy Ruleset formatter. class Ruleset < Puffy::Formatters::Iptables::Ruleset # :nodoc: # Return an IPv6 Iptables String representation of the provided +rules+ Puffy::Rule with the +policy+ policy. diff --git a/lib/puffy/puppet.rb b/lib/puffy/puppet.rb index 8bf6439..7dfac2e 100644 --- a/lib/puffy/puppet.rb +++ b/lib/puffy/puppet.rb @@ -15,8 +15,8 @@ def initialize(path, parser) @formatters = [ Puffy::Formatters::Pf::Ruleset.new, - Puffy::Formatters::Netfilter4::Ruleset.new, - Puffy::Formatters::Netfilter6::Ruleset.new, + Puffy::Formatters::Iptables4::Ruleset.new, + Puffy::Formatters::Iptables6::Ruleset.new, ] end