Fix reverse dns lookup

This commit is contained in:
Przemek Grondek 2023-05-14 13:31:30 +02:00
parent d8c901424c
commit 32400cb845
2 changed files with 13 additions and 11 deletions

View File

@ -1,15 +1,15 @@
$TTL 86400 $TTL 86400
$ORIGIN {{ network.network_name }}. $ORIGIN {{ network.network_reverse }}.IN-ADDR.ARPA.
@ IN SOA {{ network.network_name }}. dns.{{ network.network_name }}. ( @ IN SOA {{ network.network_name }}. dns.{{ network.network_name }}. (
{{ serial }}; {{ serial }} ; serial number
604800; 604800 ; refresh
86400; 86400 ; update retry
2419200; 2419200 ; expiry
86400; 86400 ; Negative caching TTL
) )
{{ network.network_reverse }} IN A dns.{{ network.network_name }} @ IN NS dns.{{ network.network_name }}.
{% for host in network.hosts %} {% for host in network.hosts %}
{{ host.ip }} IN PTR {{ host.name }} {{ host.ip }} IN PTR {{ host.name }}.{{ network.network_name }}.
{% endfor %} {% endfor %}

View File

@ -65,13 +65,15 @@ lan:
- name: node-03 - name: node-03
ip: 103 ip: 103
mac: dc:a6:32:3c:1a:ec mac: dc:a6:32:3c:1a:ec
- name: node-04 - name: pi-kvm
ip: 104 ip: 104
mac: dc:a6:32:8b:7b:ab mac: dc:a6:32:8b:7b:ab
- name: node-05 - name: node-05
ip: 105 ip: 105
mac: 08:d4:0c:cc:ff:1f mac: 08:d4:0c:cc:ff:1f
- name: uatu
ip: 106
mac: b8:27:eb:19:f8:0d
iot: iot:
network_prefix: 192.168.60 network_prefix: 192.168.60
network_reverse: 60.168.192 network_reverse: 60.168.192