Add hosts to DNS Server without using YaST

First, let me say I’m pretty new to SLES.

I’ve got a bunch of hosts to add to my DNS server and it looks like it’s going to be pretty tedious adding them all using YaST, so I was wanting to edit a few files instead.

Does anyone have simple instructions to add hosts to my local domain this way?

It looks like it might be as simple as updating /var/lib/named/master/, but I was sort of expecting maybe a reverse lookup file and maybe some mx records somewhere (although these aren’t important as we don’t have mail).

I’ve worked it ot for DHCP - just edit /etc/dhcpd.conf and do a ‘rcdhcpd start’.

Oh, it’s SLES 11 BTW.

Many thanks,

Gary

Hi Gary,

[QUOTE=dn312sr;24118]First, let me say I’m pretty new to SLES.

I’ve got a bunch of hosts to add to my DNS server and it looks like it’s going to be pretty tedious adding them all using YaST, so I was wanting to edit a few files instead.

Does anyone have simple instructions to add hosts to my local domain this way?

It looks like it might be as simple as updating /var/lib/named/master/, but I was sort of expecting maybe a reverse lookup file and maybe some mx records somewhere (although these aren’t important as we don’t have mail).

I’ve worked it ot for DHCP - just edit /etc/dhcpd.conf and do a ‘rcdhcpd start’.

Oh, it’s SLES 11 BTW.

Many thanks,

Gary[/QUOTE]

it’s fairly the same for named - edit the “database files”, then restart “named”.

Some hints: named is pretty dump - so there are distinct database files, for forward and and reverse lookup. You’ll have to edit both. And if you’re running more than one named (running one as master and other(s) as secondaries), then you’re well-advised to increase the serial number in the SOA record of each modified “database” (first value after the “(” of the IN SOA statement).

If you’re including new lookup databases (files), you’ll need to include those in the named configuration - go look in /etc/named.conf for entries created by YaST - and add your own somewhere in /etc/named.d/ . Oh, reverse lookup databases are named reversely, i.e. “1.168.192.in-addr.arpa” and they carry no “IN A” records, but “IN PTR”. Best thing is to create a sample entry via YaST and then take that as a template.

There are a number of things you can do wrong in those files, easily messing up name resolution - so watch syslog closely during named restart and test carefully afterwards. Oh, and there are quite some BIND docs out there on the Internet, introducing to manually creation of these database files. If in doubt, read first, edit later :wink:

Regards,
Jens