forked from sous-chefs/ufw
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Merge from https://github.com/paulczar/firewall into ufw_defaults. Fixes sous-chefs#14. - Clean up ufw implementation & ports syntax to be more obvious
- Loading branch information
Showing
18 changed files
with
192 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
default['firewall']['allow_ssh'] = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
default['firewall']['ufw']['defaults'] = { | ||
ipv6: 'yes', | ||
manage_builtins: 'no', | ||
ipt_sysctl: '/etc/ufw/sysctl.conf', | ||
ipt_modules: 'nf_conntrack_ftp nf_nat_ftp nf_conntrack_netbios_ns', | ||
policy: { | ||
input: 'DROP', | ||
output: 'ACCEPT', | ||
forward: 'DROP', | ||
application: 'SKIP' | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
module FirewallCookbook | ||
module Helpers | ||
def port_to_s(p) | ||
if p && p.is_a?(Integer) | ||
p.to_s | ||
elsif p && p.is_a?(Array) | ||
p.join(',') | ||
elsif p && p.is_a?(Range) | ||
"#{p.first}:#{p.last} " | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.