LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 10-11-2016, 10:32 PM   #1
dcroxton
Member
 
Registered: Apr 2004
Distribution: Ubuntu Jaunty
Posts: 91

Rep: Reputation: 16
Use dnsmasq for ltsp but not as dns server


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:
  1. set the dnsmasq dns port to 0 to disable its dns functionality
  2. set it to not check for requests on the lo interface (which is specifically mentioned in the conf file as an Ubuntu workaround)
  3. set it to use my router as its authoritative dns server
  4. 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.
 
Old 10-12-2016, 05:59 PM   #2
c0wb0y
Member
 
Registered: Jan 2012
Location: Inside the oven
Distribution: Windows
Posts: 421

Rep: Reputation: 74
Are diskless clients on the same subnet including the router? If so, who will provide DHCP? Is it the LTSP server or the router?
 
Old 10-12-2016, 10:15 PM   #3
dcroxton
Member
 
Registered: Apr 2004
Distribution: Ubuntu Jaunty
Posts: 91

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by c0wb0y View Post
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.
 
Old 10-12-2016, 11:25 PM   #4
c0wb0y
Member
 
Registered: Jan 2012
Location: Inside the oven
Distribution: Windows
Posts: 421

Rep: Reputation: 74
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
 
Old 10-17-2016, 08:12 AM   #5
dcroxton
Member
 
Registered: Apr 2004
Distribution: Ubuntu Jaunty
Posts: 91

Original Poster
Rep: Reputation: 16
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.
 
  


Reply

Tags
dns, dnsmasq, ltsp, networkmanager, ubuntu



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Managed DNS server lists and dnsmasq DNS cache nitrousoxide82 Linux - Networking 1 02-21-2014 10:34 PM
dnsmasq - so what is my dns server? eantoranz Linux - Networking 16 01-26-2013 09:23 PM
simple DNS server (dnsmasq) with Windows hosts? Umanga Linux - Server 3 07-29-2011 08:17 AM
dnsmasq dhcp+dns resolv unless for server eztaitt Linux - Server 2 05-18-2010 09:25 AM
DNS cache without dnsmasq linuxbird Linux - Networking 8 10-29-2008 08:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:31 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration