# NSD:  persistent reverse lookup format errors



## MMacD (Dec 16, 2019)

I've followed several examples on the net (mit, calomel, et) yet cannot create an error-free SOA record.  The SOA record currently looks like 
	
	



```
$ORIGIN local.lan.
$TTL    24H

0.168.192.in-addr.arpa.  IN SOA         momcat.local.lan. root.local.lan. (
                        20160631        ; sn
                        8H              ; refresh       8 hours
                        2H              ; retry         2 hours
                        24H             ; expire        24 hours
                        24H             ; min time-to-live
                        )
```

I restart nsd without apparent error, but `cat`ing /var/log/nsd.log shows 
	
	



```
error: local.lan.reverse:10: SOA record with invalid domain name, '0.168.192.in-addr.arpa.' is not '192.168.0.in-addr.arpa.'
```

I've modified the "invalid domain name" extensively without success.


----------



## SirDice (Dec 16, 2019)

Remove the $ORIGIN line, it's not correct.


----------



## MMacD (Dec 16, 2019)

Amazing!  That and 2 additional edits fixed the problem.  Thanks!!  Every example I looked at had that "$ORIGIN" line, so it would probably have taken me a week to try taking it out just on spec.


----------



## SirDice (Dec 16, 2019)

I never add it myself when creating zone files, BIND (named) adds it automagically. Not sure about NSD but I assume it does the same.


----------



## MMacD (Dec 16, 2019)

Is there something magical I need to add somewhere to get nsd to resolve hostname-only references?  It knows its own hostname, of course, but will resolve only fqdns for the rest of the lan.


----------



## SirDice (Dec 16, 2019)

MMacD said:


> Is there something magical I need to add somewhere to get nsd to resolve hostname-only references?


This is what the `search` and `domain` do in /etc/resolv.conf. It's not the DNS service's job, it's the client's.


----------

