diff --git a/defaults/main.yml b/defaults/main.yml index f2f9537..dd07cb3 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -2,9 +2,13 @@ iptables__state: install iptables__drop_by_default: false iptables__allow_output_ifaces: [] + iptables__v4_filter_prepend: null -iptables__v4_filter_append: null -iptables__v4_nat: null iptables__v6_filter_prepend: null +iptables__all_filter_prepend: null + +iptables__v4_filter_append: null iptables__v6_filter_append: null + +iptables__v4_nat: null iptables__v6_nat: null diff --git a/templates/rules.v4 b/templates/rules.v4 index 22666f3..f354a16 100644 --- a/templates/rules.v4 +++ b/templates/rules.v4 @@ -31,6 +31,8 @@ COMMIT {{ iptables__v4_filter_prepend }} +{{ iptables__all_filter_prepend }} + # Allow all loopback (lo) traffic and reject anything # to localhost that does not originate from lo. -A INPUT -i lo -j ACCEPT diff --git a/templates/rules.v6 b/templates/rules.v6 index 1eab748..dcff29a 100644 --- a/templates/rules.v6 +++ b/templates/rules.v6 @@ -31,6 +31,8 @@ COMMIT {{ iptables__v6_filter_prepend }} +{{ iptables__all_filter_prepend }} + # Allow all loopback (lo) traffic and reject anything # to localhost that does not originate from lo. -A INPUT -i lo -j ACCEPT