• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
Netgate Discussion Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login

BIND DHCP dynamic update reverse zone if algin is non octet problem

Scheduled Pinned Locked Moved DHCP and DNS
6 Posts 3 Posters 846 Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M
    milew
    last edited by Sep 28, 2022, 1:55 PM

    Hello
    I have installed BIND package on pfSense 2.6 community on my testing evironment Hyper-V machine.

    My WAN is from DHCP my ISP provider.
    My LAN is 192.168.192.1/18 DHCP
    My DHCP server scope 192.168.192.100-192.168.192.200,
    Enable registration of DHCP client names in DNS. DDNS domain example.com.

    /var/dhcpd/etc/dhcpd.conf has section
    zone 192-255.168.192.in-addr.arpa. {
    primary 192.168.192.1;
    key "rndc-key";
    }

    My client is Windows 10 DHCP enabled.

    If my client release and renev ipaddres DHCP log
    Added new forward map from DESKTOP-GBII3C8.example.com to 192.168.192.100
    not add to reverse zone.

    BIND configuration reverse zone from /var/etc/named/etc/namedb/named.conf

    zone "168.192.in-addr.arpa" {
    		type master;
    		file "/etc/namedb/master/default/168.192.DB";
    		allow-query { any; localhost; localnets; };
    		allow-transfer { any; localhost; localnets; };
    		allow-update { any; };
    	};
    

    File zone /var/etc/named/etc/namedb/master/default/168.192.DB

    $TTL 43200
    ;
    $ORIGIN 168.192.in-addr.arpa.
    
    ;	Database file 168.192.DB for 168.192 zone.
    ;	Do not edit this file!!!
    ;	Zone version 2664371513
    ;
    @	 IN  SOA 192.168.192.1. 	 zonemaster.168.192. (
    		2664371513 ; serial
    		1d ; refresh
    		2h ; retry
    		4w ; expire
    		1h ; default_ttl
    		)
    
    ;
    ; Zone Records
    ;
    	 IN NS 	192.168.192.1.
    1.192 	 IN PTR  	router.example.com.
    

    When I change LAN addresation to 192.168.0.1/16 DHCP adds record to reverse zone correctly.

    What is wrong?
    Is any solutions for my problem?

    G J 2 Replies Last reply Sep 29, 2022, 9:13 AM Reply Quote 0
    • G
      Gertjan @milew
      last edited by Gertjan Sep 29, 2022, 9:14 AM Sep 29, 2022, 9:13 AM

      @milew

      Is it possible not to use /16 or worse, use /18 ?
      Your pool is only "100" wide. Do you relly need a 254 x 254 x 4 => 260k network ?
      Use a /24 "like everybody else" and call it a day ;)

      No "help me" PM's please. Use the forum, the community will thank you.
      Edit : and where are the logs ??

      M 1 Reply Last reply Sep 29, 2022, 9:33 AM Reply Quote 0
      • J
        johnpoz LAYER 8 Global Moderator @milew
        last edited by johnpoz Sep 29, 2022, 9:31 AM Sep 29, 2022, 9:30 AM

        @milew you can only use /24 or /16 or /8 for reverse zones.

        There is a bit of hack and cnames for smaller then /24s see rfc 2317

        If you have say a /22, this would be 4 different /24 zones.

        An intelligent man is sometimes forced to be drunk to spend time with his fools
        If you get confused: Listen to the Music Play
        Please don't Chat/PM me for help, unless mod related
        SG-4860 24.11 | Lab VMs 2.8, 24.11

        1 Reply Last reply Reply Quote 0
        • M
          milew @Gertjan
          last edited by Sep 29, 2022, 9:33 AM

          @gertjan I need more adresses than /24
          my pool 100 is only for test.

          J 1 Reply Last reply Sep 29, 2022, 9:35 AM Reply Quote 0
          • J
            johnpoz LAYER 8 Global Moderator @milew
            last edited by johnpoz Sep 29, 2022, 9:35 AM Sep 29, 2022, 9:35 AM

            @milew see my post, use multiple /24 zones, or just use a /16.. Its not like with rfc1918 there is going to be any other place authoritative for parts of the /16 your not using.

            An intelligent man is sometimes forced to be drunk to spend time with his fools
            If you get confused: Listen to the Music Play
            Please don't Chat/PM me for help, unless mod related
            SG-4860 24.11 | Lab VMs 2.8, 24.11

            M 1 Reply Last reply Sep 29, 2022, 10:22 AM Reply Quote 1
            • M
              milew @johnpoz
              last edited by Sep 29, 2022, 10:22 AM

              @johnpoz I remove reverse zone 168.192.in-addr.arpa
              and add
              192.168.192.in-addr.arpa
              zone file /var/etc/named/etc/namedb/master/default/192.168.192.DB

              $TTL 43200
              ;
              $ORIGIN 192.168.192.in-addr.arpa.
              
              ;	Database file 192.168.192.DB for 192.168.192 zone.
              ;	Do not edit this file!!!
              ;	Zone version 2664446401
              ;
              @	 IN  SOA router.example.com. 	 zonemaster.192.168.192. (
              		2664446401 ; serial
              		1d ; refresh
              		2h ; retry
              		4w ; expire
              		1h ; default_ttl
              		)
              
              ;
              ; Zone Records
              ;
              	 IN NS 	router.example.com.
              1 	 IN PTR  	router.example.com.
              

              and /var/etc/named/etc/namedb/named.conf

              #Do not edit this file!!!
              
               key "rndc-key" {
               	algorithm hmac-sha256;
               	secret "W1+lueh/DCHHqUxXe9j+bfD+p48yqCgcZUEjeAoZ/Rs=";
               };
              
               controls {
               	inet 127.0.0.1 port 8953
               		allow { 127.0.0.1; } keys { "rndc-key"; };
               };
              
              
              
              options {
              	directory "/etc/namedb";
              	pid-file "/var/run/named/pid";
              	statistics-file "/var/log/named.stats";
              	max-cache-size 384M;
              	dnssec-validation auto;
              
              	listen-on-v6 port 53 { any; };
              	listen-on port 53 { any; };
              	
              };
              
              
              logging {
              	channel custom {
              		syslog daemon;
              		print-time no;
              		print-severity yes;
              		print-category yes;
              		severity debug 5;
              		};
              	category update { custom; };
              };
              
              view "default" { 
              	recursion yes;
              	match-clients { any; };
              	allow-recursion { any; };
              
              	zone "example.com" {
              		type master;
              		file "/etc/namedb/master/default/example.com.DB";
              		allow-query { any; localhost; localnets; };
              		allow-transfer { any; localhost; localnets; };
              		allow-update { any; localhost; localnets; };
              	};
              
              	zone "192.168.192.in-addr.arpa" {
              		type master;
              		file "/etc/namedb/master/default/192.168.192.DB";
              		allow-query { any; };
              		allow-transfer { any; };
              		allow-update { any; };
              	};
              
              	zone "." {
              		type hint;
              		file "/etc/namedb/named.root";
              	};
              
              };
              

              and working

              Sep 29 10:18:10 dhcpd 14875 Added reverse map from 100.192.168.192.in-addr.arpa. to DESKTOP-GBII3C8.example.com
              Sep 29 10:18:10 dhcpd 14875 Added new forward map from DESKTOP-GBII3C8.example.com to 192.168.192.100

              @johnpoz Thank you very much.

              1 Reply Last reply Reply Quote 0
              6 out of 6
              • First post
                6/6
                Last post
              Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                This community forum collects and processes your personal information.
                consent.not_received