DNS import for 178 hosts


(Fulvio) #1

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


(Fulvio) #2

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


(Eddie Atherton) #3

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.


(Giacomo Sanchietti) #4

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:


(Artem Fedai) #5

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


(Alessio Fattorini) #6

You mean this right?


(Artem Fedai) #7

Yes you are right :


(Fulvio) #8

it works.
thank you.