Help with dnsmasq
-
Hey Guys,
This is my first time posting on a forum like this so please bear with me. I would like to configure dnsmasq in order to use FOG with my existing DHCP server but I keep getting an error message when trying to launch dsnmasq.Problem encountered :
I followed the guide from this post : https://forums.fogproject.org/topic/12796/installing-dnsmasq-on-your-fog-server
once I get to step 8 and I launch the command sudo systemctl restart dnsmasq I get the following message :job for dnsmasq.service failed because the control process exited with error code. See "systemctl status dnsmasq.service" and "journalctl -xe" for details.
I then launch the command systemctl status dnsmasq.service for more details and I get the following results :
dnsmasq.service - dnsmasq - A lightweight DHCP and caching DNS server Loaded: loaded (/lib/systemd/system/dnsmasq.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Mon 2021-04-12 15:01:15 CEST; 2min 0s ago Process: 24348 ExecStart=/etc/init.d/dnsmasq systemd-exec (code=exited, status=1/FAILURE) Process: 24347 ExecStartPre=/usr/sbin/dnsmasq --test (code=exited, status=0/SUCCESS) Main PID: 19605 (code=exited, status=0/SUCCESS) avril 12 15:01:15 HP-ProBook-FOG systemd[1]: Starting dnsmasq - A lightweight DHCP and caching DNS server... avril 12 15:01:15 HP-ProBook-FOG dnsmasq[24347]: dnsmasq: syntax check OK. avril 12 15:01:15 HP-ProBook-FOG dnsmasq[24348]: dnsmasq: illegal repeated keyword at line 4 of /etc/dnsmasq.conf avril 12 15:01:15 HP-ProBook-FOG dnsmasq[24348]: illegal repeated keyword at line 4 of /etc/dnsmasq.conf avril 12 15:01:15 HP-ProBook-FOG dnsmasq[24348]: FAILED to start up avril 12 15:01:15 HP-ProBook-FOG systemd[1]: dnsmasq.service: Control process exited, code=exited status=1 avril 12 15:01:15 HP-ProBook-FOG systemd[1]: dnsmasq.service: Failed with result 'exit-code'. avril 12 15:01:15 HP-ProBook-FOG systemd[1]: Failed to start dnsmasq - A lightweight DHCP and caching DNS server. tftp-root=/tftpboot
This i what my ltsp file looks like :
#Don’t function as a DNS server:
port=0#Log lots of extra information about DHCP transactions.
log-dhcp#Set the root directory for files available via FTP.
tftp-root=/tftpboot#The boot filename, Server name, Server Ip Address
dhcp-boot=undionly.kpxe,172.20.4.252#Disable re-use of the DHCP servername and filename fields as extra
#option space. That’s to avoid confusing some old or broken DHCP clients.
dhcp-no-override#inspect the vendor class string and match the text to set the tag
dhcp-vendorclass=BIOS,PXEClient:Arch:00000
dhcp-vendorclass=UEFI32,PXEClient:Arch:00006
dhcp-vendorclass=UEFI,PXEClient:Arch:00007
dhcp-vendorclass=UEFI64,PXEClient:Arch:00009#Set the boot file name based on the matching tag from the vendor class (above)
dhcp-boot=net:UEFI32,i386-efi/ipxe.efi,172.20.4.252
dhcp-boot=net:UEFI,ipxe.efi,172.20.4.252
dhcp-boot=net:UEFI64,ipxe.efi,172.20.4.252#PXE menu. The first part is the text displayed to the user. The second is the timeout, in seconds.
pxe-prompt=“Booting FOG Client”, 1#The known types are x86PC, PC98, IA64_EFI, Alpha, Arc_x86,
#Intel_Lean_Client, IA32_EFI, BC_EFI, Xscale_EFI and X86-64_EFI
#This option is first and will be the default if there is no input from the user.
pxe-service=X86PC, “Boot to FOG”, undionly.kpxe
pxe-service=X86-64_EFI, “Boot to FOG UEFI”, ipxe.efi
pxe-service=BC_EFI, “Boot to FOG UEFI PXE-BC”, ipxe.efidhcp-range=172.20.4.252,proxy
Im using Kubuntu version 18.04 with dnsmasq version 2.79
This only occurs if I copy ltsp.conf in /etc/dnsmasq.d directory. If there is no file in that directory dnsmasq runs fine without any issues.I’m not a linux nerd and I’ve spent over a week on this issue to no avail.
-
Oddly enough I found the solution soon after my last post.I was looking at the wrong file all along.
I completely forgot that I un-commented the line 4 of my dnsmasq.conf file while running some tests last week . I just had to re-comment that line and voila it’s finally working.