[SOLVED] Use dnsmasq for ltsp but not as dns server
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm trying to use my computer as an ltsp server on my local network. It works when a client is plugged in directly, but I want to use it as a dhcp proxy. I installed dnsmasq and made the config changes, so clients do get their ip address from my router and try to boot via PXE using my computer's IP address. However, dnsmasq totally borks my computers DNS, so the server can't connect to anything.
I am running Xubuntu 16.04. I have tried the following:
set the dnsmasq dns port to 0 to disable its dns functionality
set it to not check for requests on the lo interface (which is specifically mentioned in the conf file as an Ubuntu workaround)
set it to use my router as its authoritative dns server
commented out "dns=dnsmasq" in NetworkManager.conf so my computer would not automatically try to use dnsmasq as its dns server
The last item actually got resolv.conf to show the dns servers in my (static) network interface config, but it went to 127.0.0.1 when I turned dnsmasq back on. I can't figure out why it insists on using dnsmasq even after I turned it off both in the NetworkManager configuration and in dnsmasq itself. And I have no idea how to get it to stop.
Are diskless clients on the same subnet including the router? If so, who will provide DHCP? Is it the LTSP server or the router?
Yes, the same subnet. The router is handling DHCP, no problem there. The LTSP server is statically bound to 192.168.0.116.
The error I keep getting on the LTSP server is that there is no DNS server found. My interface is statically bound to go to the router (192.168.0.1), but NetworkManager insists on intercepting DNS requests and sending them to localhost. This is fine as long as I don't have dnsmasq running. There is a dnsmasq-base which I guess is running (I'm learning as I go) and intercepting DNS requests on 127.0.1.1. If I comment out "dns=dnsmasq" in network-manager.conf, network-manager uses the value that I have configured for the interface successfully. But if I start the dnsmasq service (the actual dnsmasq package, not the dnsmasq-base that comes with NetworkManager), for some reason NetworkManager ignores the interface setting and tries to resolve through 127.0.0.1 (slightly different than the default 127.0.1.1, though I'm not sure why).
I wouldn't care if it used dnsmasq for local DNS as long as it actually sent it to a server, but however it is configured, it just isn't finding a service, I presume because there isn't a dns server running on 127.0.0.1 where it insists on looking. I don't know how to change that default or to get dnsmasq to listen there like it's supposed to. Honestly, NetworkManager is driving me crazy, but I don't want to remove it because it is probably doing some things behind the scenes that I would miss if I got rid of it, not to mention that all Ubuntu-specific guides assume that it is running.
Few things I can suggest and depending on your priority. If you wish to get the diskless nodes up and running first, I'd suggest to ignore DNS for now.
With regards to DNS, (I don't use dnsmasq. I use unbound. But the principle remains the same) - everytime you start the actual dnsmasq service it acts as caching server and by default it starts listening and serving at 127.0.0.1:53. That is all fine. NetworkManager notices that even and updates resolv.conf accordingly. You now need to read a bit about dnsmasq docs and find out how to configure its upstream, forward DNS. You can use Google's, OpenDNS etc
Thanks for your response. I ended up removing NetworkManager, but some process still set resolve.conf to 127.0.0.1 whenever I started dnsmasq. So setting the dnsmasq listening port to 0 does indeed turn off its dns functionality, but doesn't stop whatever background process sets resolv.conf. This is frustrating, but knowing that I just turned dnsmasq's dns functionality back on, which (with NetworkManager disabled) works fine.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.