I’m migrating to nethserver.
To continue using DHCP with IP reservation, I want to import an existing host file.
Or is it possible to manually maintain the host file in nethserver?
If not it would be inefficient to maintain every single host in WebUI.
so if you need to add 30 hosts make file /etc/ethers
cat /etc/ethers
# see man ethers for syntax
00:16:3e:00:00:01 kvm1 10.1.1.150
00:16:3e:00:00:02 kvm2 10.1.1.200
and make custom template for dnsmasq.conf file mkdir -p /etc/e-smith/templates-custom/etc/dnsmasq.conf cp /etc/e-smith/templates/etc/dnsmasq.conf/30dhcp /etc/e-smith/templates-custom/etc/dnsmasq.conf/30dhcp vi /etc/e-smith/templates-custom/etc/dnsmasq.conf/30dhcp
and add at the and of file
I write you 2 variants of make things work
1 wariand about db you could try it and see that Host would be seen in the WebUI: Configuration -> DHCP -> IP Reservation
2 variant is about Dnsmasq cheat trick , so this hosts you couldnot see in WebUI
you could make bash script that would cat /etc/ethers
cat /etc/ethers | awk ‘{print "db hosts set “$2” local Description " $2 " IpAddress " $3 " MacAddress " $1}’ > host_import.sh && chmod +x ./host_import.sh
and then simply run this script
./host_import.sh
@alefattorini it would be great if @cmonty put header of his file or even make dump from Zentyal , it would be very usefull for our Community. Evenmore @giacomo could make WebUI integration for import static dhcp list.
This is an old thread I know but wondering if this info is still true and a valid method of doing a mass import of new entries specifically for DNS entries /etc/hosts.
and make custom template for dnsmasq.conf file mkdir -p /etc/e-smith/templates-custom/etc/dnsmasq.conf cp /etc/e-smith/templates/etc/dnsmasq.conf/30dhcp /etc/e-smith/templates-custom/etc/dnsmasq.conf/30dhcp vi /etc/e-smith/templates-custom/etc/dnsmasq.conf/30dhcp
and add at the and of file
read-ethers
and run
signal-event nethserver-dnsmasq-update
But I never see any new entries make it into /etc/hosts. Pinging devices included in /etc/ethers after doing the aobe by hostname also does not translate.
There has to a be working method to do am ass import of entries into /etc/hosts and play nice with the programming side of this setup. Manually adding hundreds of new entries into DNS from the GUI is out of the question.