LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Misconfiguration of dnsmasq? (https://www.linuxquestions.org/questions/linux-networking-3/misconfiguration-of-dnsmasq-4175685036/)

jmgibson1981 11-10-2020 08:11 PM

Misconfiguration of dnsmasq?
 
My dnsmasq works normally most of the time, I thought. Today when my internet went down my Kodi installations were moving like molasses (only local content). After awhile I tried putting the ip of my sql server / mythtv backend instead of their fqdn (below in /etc/hosts) and that fixed it. Kodi moves real fast, fully loaded and ready within 10 seconds of starting it. All art, selecting something and it plays instantly. Before, even with my internet on it was a bit of a waiting game.

TLDR - Maybe I just have stuff in the wrong order. Ultimately when the internet went down my dns resolution for local went to crap.

/etc/dnsmasq.conf - I left out my statics with dhcp-host lines.

Code:

# Dns
port=53
domain-needed
bogus-priv
strict-order
expand-hosts
domain=mylan.home
# DHCP
dhcp-range=192.168.1.100,192.168.1.220,255.255.255.0,24h
dhcp-option=option:router,192.168.1.1
dhcp-option=option:dns-server,192.168.1.2
dhcp-option=option:netmask,255.255.255.0

# TFTP
enable-tftp
tftp-root=/srv/tftp

# LTSP

# Set some tags to be able to separate client settings later on.
# "39" means "recent iPXE with menu support": http://ipxe.org/howto/dhcpd
dhcp-match=set:iPXE,175,39
dhcp-match=set:X86PC,option:client-arch,0
dhcp-match=set:X86-64_EFI,option:client-arch,7
# Due to rfc4578 errata, sometimes BC_EFI=9 is misused instead of X86-64_EFI=7:
dhcp-match=set:X86-64_EFI,option:client-arch,9
dhcp-mac=set:rpi,b8:27:eb:*:*:*
dhcp-mac=set:rpi,dc:a6:32:*:*:*

# In proxy DHCP mode, the server ONLY sends its IP and the following filename.
# Service types: man dnsmasq or https://tools.ietf.org/html/rfc4578#section-2.1
# PXE services in non proxy subnets sometimes break UEFI netboot, so tag:proxy.
pxe-service=tag:proxy,tag:!iPXE,X86PC,"undionly.kpxe",ltsp/undionly.kpxe
pxe-service=tag:proxy,tag:!iPXE,X86-64_EFI,"snponly.efi",ltsp/snponly.efi
pxe-service=tag:proxy,tag:iPXE,X86PC,"ltsp.ipxe",ltsp/ltsp.ipxe
pxe-service=tag:proxy,tag:iPXE,X86-64_EFI,"ltsp.ipxe",ltsp/ltsp.ipxe
pxe-service=tag:rpi,X86PC,"Raspberry Pi Boot  ",unused

# Specify the boot filename for each tag, relative to tftp-root.
# If multiple lines with tags match, the last one is used.
# See: https://www.syslinux.org/wiki/index.php?title=PXELINUX#UEFI
dhcp-boot=tag:!iPXE,tag:X86PC,ltsp/undionly.kpxe
dhcp-boot=tag:!iPXE,tag:X86-64_EFI,ltsp/snponly.efi
dhcp-boot=tag:iPXE,ltsp/ltsp.ipxe

/etc/resolv.conf

Code:

nameserver 192.168.1.2
nameserver 8.8.8.8
nameserver 8.8.4.4

/etc/hosts

Code:

127.0.0.1        localhost
127.0.1.1        server

# dns for dnsmasq
# routers
192.168.1.1        main.router.mylan.home
192.168.1.252        peterson.router.mylan.home

# main server

192.168.1.2        megalith.mylan.home
192.168.1.2        print.mylan.home
192.168.1.2        proxy.mylan.home
192.168.1.2        sql.mylan.home
192.168.1.2        mythtv.mylan.home
192.168.1.2        mc.ourplace.mylan.home

# access points
192.168.1.249        north.west.mylan.home
192.168.1.248        west.north.mylan.home

# printers
192.168.1.38        printer.mylan.home
192.168.1.39        laser.mylan.home

# kodi
192.168.1.237        kodilib.mylan.home
192.168.1.237        kodi.lib.mylan.home
192.168.1.40        kodi.mbr.mylan.home
192.168.1.41        kodi.gst.mylan.home
192.168.1.42        homewrecker.mylan.home
192.168.1.43        kodi.main.mylan.home

# testing machines
192.168.1.44        optiplex.mylan.home

# The following lines are desirable for IPv6 capable hosts
::1    localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters


jmgibson1981 11-12-2020 02:41 PM

Followed the instructions under the DNS server section where it applied to my lan. https://wiki.archlinux.org/index.php/dnsmasq

Changed back to fqdn's and my local resolution is wonderful. Kodi is loading instantly and I have zero lag time on any local lookups.


All times are GMT -5. The time now is 12:00 AM.