DNS server with Bind9: can't resolve DNS records in forward and reverse zone files

622

Solution 1

So forwarding is working fine. Things in your configuration files do look a little odd to me. Note that I have never been able to make things work with $ORIGIN. I'm sure that somehow it does work, just not for me.

For dirks.crtn.db try:

$TTL 38400
@      IN SOA filtjener.dirks.crtn. webmaster.dirks.crtn. (
       1263527838    ; serial
       10800         ; refresh
       3600          ; retry
       604800        ; expire
       38400 )       ; Negative Cache TTL
       IN  A  192.168.56.2
;
; name server - NS records
@      IN  NS   filtjener.dirks.crtn.
; name server - A records
filtjener IN   A    192.168.56.2

host1   IN A   192.168.56.21
host2   IN A   192.168.56.22
host3   IN A   192.168.56.23

For rev.56.168.192.in-addr.arpa try:

$TTL 38400

@ IN SOA filtjener.dirks.crtn. webmaster.dirks.crtn. (
     1263187356    ; serial
     38400         ; refresh
     3600          ; retry 1 hour
     60400         ; expire 1 week
     38400 )       ; negative cache TTL
;
@    IN   NS    filtjener.dirks.crtn.
2    IN   PTR   filtjener.dirks.crtn.
21   IN   PTR   host1.dirks.crtn.
22   IN   PTR   host2.dirks.crtn.
23   IN   PTR   host3.dirks.crtn.

You do not need to use sudo with named-checkzone and note that for reverse zone checking the command is:

named-checkzone 56.168.192.in-addr.arpa rev.56.168.192.in-addr.arpa

reference

Solution 2

So I finally found the answer to my own problem in /etc/bind/named.conf.local i forgot to add "/" in front of "etc".

my way:

zone "dirks.crtn" {
type master;
file "etc/bind/zones/dirks.crtn.db";
};

correct way:

zone "dirks.crtn" {
type master;
file "/etc/bind/zones/dirks.crtn.db";
};

I feel kinda stupid, but at least I am able to resolve addresses and hostnames.

Share:
622

Related videos on Youtube

Rushvi
Author by

Rushvi

Updated on September 18, 2022

Comments

  • Rushvi
    Rushvi over 1 year

    I am trying to create module from Jahia Studio and getting below error.

      Non-resolvable parent POM for org.jahia.modules:news:2.0.4: 
      Could not transfer artifact org.jahia.modules:jahia-modules:pom:7.0.0.0 from/to jahia-public (https://devtools.jahia.com/nexus/content/groups/public): 
      sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: 
      unable to find valid certification path to requested target and 'parent.relativePath' points at wrong local POM @ line 49, column 11 -> [Help 2]
    

    Using Jahia CommunityDistribution 7.3.4.1 SDK and Maven version 3.6.3

    When Trying to run mvn clean install getting above error everytime.

    • Jemme
      Jemme almost 8 years
      I've spent days trying to get a similar setup to work. The configs from your questions finally did the trick. Thanks!
    • Philippe Vollenweider
      Philippe Vollenweider about 4 years
      Did you try to get the code from github.com/Jahia/news/releases/tag/2_0_4 and compile it on your side?
    • Rushvi
      Rushvi about 4 years
      Yes I tried , same error as mentioned above.
    • Philippe Vollenweider
      Philippe Vollenweider about 4 years
      What JDK version do you use?
    • Rushvi
      Rushvi about 4 years
      @PhilippeVollenweider C:\Jahia-CommunityDistribution-7.3.4.1-SDK\Jahia-CE-7.3.4.1-‌​SDK\sources\news>mvn -v Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f) Maven home: C:\Program Files\apache-maven-3.6.3\bin\.. Java version: 1.8.0_66, vendor: Oracle Corporation, runtime: C:\Program Files\Java\jdk1.8.0_66\jre Default locale: en_IN, platform encoding: Cp1252 OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
    • Philippe Vollenweider
      Philippe Vollenweider about 4 years
      I think you should have a JDK >= 8u101 (see letsencrypt.org/docs/certificate-compatibility )
    • Rushvi
      Rushvi about 4 years
      @PhilippeVollenweider Thanks you so much for your quick and accurate help. Kindly answer the question so I can upvote. So as a solution I have installed latest JDK and it solved my issue as per your suggestion :)
  • Madde
    Madde about 9 years
    Hey, thanks for taking the time to answer :) i modified the forward and reverse zone file, ran named-chekckzone and restarted bind. it all worked fine. but i still get th same error when running nslookup on host1 or host1.dirks.crtn. "nslookup host1 ;; got SERVFAIL from 192.168.56.2, trying next server server: 192.56.2 address: 192.168.56.2#53 server cant fint host1: NXDOMAIN" It might not be important, but the request tok longer time to finish than it did before. do you have any other suggestion on what the problem might be? :)
  • Doug Smythies
    Doug Smythies about 9 years
    Does reverse lookup work now?
  • Doug Smythies
    Doug Smythies about 9 years
    You don't have dnsmasq running do you?
  • Madde
    Madde about 9 years
    thank you, i'm going to try what you said above :) never heard of dnsmasq, is it something i should try to run/stop?
  • Madde
    Madde about 9 years
    I did comment out "dns=dnsmasq" from /etc/NetworkManager/NetworkManager.conf and restarted network-manager. I aslo moved the zones to /etc/bind and updated /etc/bind/named.conf.local. and then restarted bind again :) sadly it still doesn't manage to lookup the addresses in the zone files.