DNS import for 178 hosts

Hello there.
I need to fill in 178 DNS entries on our just deployes NS server.
/etc/hosts 1st line warns not to manually edit the file itself.
I’ve seen this thread, about DHCP reservations, showed on WebGUI…

db hosts set nas local Description lol IpAddress 10.1.1.113 MacAddress c8:3a:35:d6:c8:b1
signal-event nethserver-dnsmasq-update
how’d be the command for DNS? and which file should be edited?

Thank you in advance.
Fulvio

sorry, this line went to quoting block…
how’d be the command for DNS?

The same DB is used for both DHCP and DNS, so using your example above, NS would add an entry for “10.1.1.113 nas.your.domain” to /etc/hosts.

Cheers.

The command to add a DNS record without DHCP reservation is:

db hosts set nas local Description lol IpAddress 10.1.1.113
signal-event nethserver-dnsmasq-update
signal-event nethserver-hosts

So you can create allthe records, and fire the events only once at the end :wink:

@Furuvio
Have you got file with those 178 hosts?
Search my post about /etc/ethers

You mean this right?

Yes you are right :

it works.
thank you.

2 Likes