diff options
Diffstat (limited to 'roles/pf/templates')
-rw-r--r-- | roles/pf/templates/pf.conf.j2 | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/roles/pf/templates/pf.conf.j2 b/roles/pf/templates/pf.conf.j2 index 6d67f4f..42b0bea 100644 --- a/roles/pf/templates/pf.conf.j2 +++ b/roles/pf/templates/pf.conf.j2 @@ -16,6 +16,18 @@ block all pass in quick on egress proto {{ service["proto"] }} to port {{ service["port"] }} {% endfor %} +# redirection +{% for h in groups["all"] %} +{% set h = hostvars[h] %} +{##} +{% if h.services is defined %} +{% for service in h.services if h.ansible_host != "dcontroller" and service.public is defined and service.public%} +pass in on egress proto { {{ service.proto }} } from any to any port {{ service.port }} rdr-to {{ h.ip.in }} +{% endfor %} +{% endif %} +{##} +{% endfor %} + # * # sub-config. by Ansible # * |