Skip to content

Commit

Permalink
Local loopback is 127.0.0.0/8, not just 127.0.0.1
Browse files Browse the repository at this point in the history
Signed-off-by: Bryan Endres <bryan@endres.io>
  • Loading branch information
bendres97 committed Mar 17, 2023
1 parent e1dc70a commit ad53969
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions controls/3_5_firewall_configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@
tag cis: 'distribution-independent-linux:3.5.1.4'
tag level: 1

port.where { address !~ /^(127\.0\.0\.1|::1)$/ }.ports.each do |port|
port.where { address !~ /^(127\.|::1)$/ }.ports.each do |port|
describe "Firewall rule should exist for port #{port}" do
subject { ip6tables.retrieve_rules.any? { |s| s =~ /\s--(dport|dports) #{port}\s/ } }
it { should be true }
Expand Down Expand Up @@ -214,7 +214,7 @@
tag cis: 'distribution-independent-linux:3.5.2.4'
tag level: 1

port.where { address !~ /^(127\.0\.0\.1|::1)$/ }.ports.each do |port|
port.where { address !~ /^(127\.|::1)$/ }.ports.each do |port|
describe "Firewall rule should exist for port #{port}" do
subject { iptables.retrieve_rules.any? { |s| s =~ /\s--(dport|dports) #{port}\s/ } }
it { should be true }
Expand Down

0 comments on commit ad53969

Please sign in to comment.