bertvv/ansible-role-bind

[vars] bind_statistics_host

Closed this issue · 1 comments

default file is:
bind_statistics_host: 127.0.0.1

templates is:
statistics-channels { inet {{ bind_statistics_host }} port {{ bind_statistics_port }} allow { {{ bind_statistics_allow|join('; ') }}; }; };

in my playbook i don't setting host, because i find my public ip?

supposition:
i want statistic access only my vpn.
i create acl vpn, i setting

    bind_statistics_allow:
      - vpn

how should i do?
i setting vars ... ?

    bind_statistics_host:
      - vpn

@mikysal78 , bind_statistics_host is the dns server IP that bind process will expose statistics on, not the IP address that you connecting from.

Let suppose you have bind server has address 10.0.0.1 and your VPN connection come from 192.168.1.0/24 network. You will need to configure your vars as below:

bind_statistics_host:  "{{ ansible_default_ipv4.address }}"
bind_statistics_allow:
  - "192.168.1.0/24"

or explicitly:

bind_statistics_host:  "10.0.0.1"
bind_statistics_allow:
  - "192.168.1.1" # In case you have a static IP address for host that you collect statistics from