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 am on Ubuntu server 16, and my client is getting a dhcp address, but dns resolution is not working. When I attempt to visit a website, it fails to load. I've done everything here under Local DNS Cache: https://help.ubuntu.com/community/Dnsmasq. Some of the steps were different for me. I updated the listen address, then uncommented the lines in dhclient.conf. I then added a nameserver record for 8.8.8.8 under localhost. After restarting the service, it still fails to work. I look on the client, and the /etc/resolv.conf just has the local nameserver record. Shouldn't it mirror what's on the server, so also have 8.8.8.8? In dnsmasq.conf under /etc, I've added these lines to the end:
You have to configure dnsmasq to listen on the server's IP address as well as allow DHCP/DNS traffic if the firewall is running for it to accept requests from clients.
You do not mention what distribution/version the client is running but Ubuntu's latest versions install dnsmasq by default which is configured as a DNS proxy so the /etc/resolv.conf will be localhost. If dnsmasq was not running on the client /etc/resolv.conf should reflect the IP address of the server.
It seems that they are running a different version. Could that be the issue?
The client is Ubuntu, but that will change, as it's just for testing. I will probably have a switch, then devices attached to that.
As for listening on the IP, would that just be appending it to this line: listen-address=127.0.0.1 ?
How is your network configured? Physical/virtual? Is the client directly connected to your server or is it connected to the LAN?
If all computers are on your LAN then make sure you turn off the DHCP server in your router.
Is your server's ethernet adapter configured with a static IP address?
I noticed /etc/resolv.conf on the server only has 127.0.0.1 nameserver record. Is this the issue?
That's as it should be for the server, since dnsmasq is doing the resolving and listening to localhost. You should be able to resolve by hostname on the server. For example
Are you trying to configure the server for NAT ie router?
You also need enable IP forwarding and add a masquerade rule.
That is the server using dnsmasq running as a DNS proxy. Should be ok.
Yes.
I believe I put a iptable NAT rule in place. Would that interfere with this? And yes, this server does the routing. IP forwarding has been enabled, as well as masquerading.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.