Skip to main content

Questions tagged [dnsmasq]

a lightweight server providing DHCP and DNS capabilities

Filter by
Sorted by
Tagged with
365 votes
18 answers
1.1m views

How do I set my DNS when resolv.conf is being overwritten?

Most of the info I see online says to edit /etc/resolv.conf, but any changes I make there just get overridden. $ cat /etc/resolv.conf # Dynamic resolv.conf(5) file for glibc resolver(3) generated by ...
Seán Hayes's user avatar
  • 4,551
131 votes
12 answers
190k views

How to avoid conflicts between dnsmasq and systemd-resolved?

I recently installed dnsmasq to act as DNS Server for my local network. dnsmasq listens on port 53 which is already in use by the local DNS stub listener from systemd-resolved. Just stopping systemd-...
vic's user avatar
  • 2,102
30 votes
6 answers
83k views

How to clear DNS cache on DD-WRT

How can I clear the DNS cache in DD-WRT on my router? DD-WRT uses the dnsmasq daemon.
Bobo's user avatar
  • 403
22 votes
2 answers
43k views

How to measure DNS cache efficiency / cached items?

I've configured dnsmasq as a caching-only DNS server on a Debian server, and it's working well (I'm seeing improved DNS response times via dig). However, I'd like to understand what dnsmasq is ...
newtovaux's user avatar
  • 353
18 votes
1 answer
70k views

How to disable dnsmasq?

From time to time when I'm switching from eth0 to wlan0 (or vice versa) interface domain name resolving breaks and /etc/resolv.conf contains nameserver 127.0.1.1 I commented #dns=dnsmasq in /etc/...
humkins's user avatar
  • 1,197
14 votes
4 answers
51k views

I can resolve a *.local domain, ping the IP, but I can't ping this domain

I am trying to get *.local domains to use the DNS server with vagrant-dns. In order for that to work I set up dnsmasq to run in front of it. NetworkManager is installed but is set to dns=none resolve....
DAB's user avatar
  • 475
13 votes
1 answer
13k views

Is there anything wrong with using dnsmasq as a dhcp server instead of isc-dhcp-server?

So I've configured my home connections to work with dnsmasq since it bundles a dhcp server with it and is quite nice to set up. There is another package - isc-dhcp-... that also does this and perhaps ...
gontadu's user avatar
  • 233
13 votes
3 answers
29k views

How to get networkmanager to configure domain specific name servers with openresolv + dnsmasq

I often connect to multiple network simultaneously. Each of these networks provide nameserver configuration via dhcp. E.g. Network 1: (eth0): domain company1.corp # nameserver 192.168.0.253 ...
Gary van der Merwe's user avatar
12 votes
3 answers
26k views

How to assign multiple fixed ip address for one domain?

I'm running dnsmasq, address=/chat.freenode.net/130.239.18.172 address=/chat.freenode.net/140.211.167.105 But seems dnsmasq only recognize the last record, what should I do?
daisy's user avatar
  • 54.8k
12 votes
3 answers
27k views

Why dig reports the dns server as 127.0.0.1 when I'm using a external DNS?

I use unbound and usually use openDNS as my DNS server. When I run dig google.com say I get SERVER: 127.0.0.1#53(127.0.0.1). What exactly is this thing listening on port #53? is this unbound or is it ...
fpghost's user avatar
  • 727
10 votes
3 answers
21k views

How can I block a subdomain with dnsmasq?

I use dnsmasq as a whitelist on my network. My dnsmasq.conf file looks like this: bogus-priv domain-needed no-resolv server=/stackexchange.com/8.8.8.8 #etc... I would like to be able to block a ...
Big McLargeHuge's user avatar
10 votes
2 answers
20k views

Using DNSMasq for Local Hostname Resolution

I'm working on setting up a home intranet for me and my roommates. My idea is that we'll be able to store things like past utility bills in a place that's more accessible than a drawer in the kitchen ...
c.maclean's user avatar
  • 201
8 votes
2 answers
21k views

How to correctly disable systemd-resolved on port 53 for avoiding clash with dnsmasq in Ubuntu 20.04…?

I'm trying to use dnsmasq on Ubuntu 20.04 and I get a port clash on port 53 with systemd-resolved. So I've found a few suggestions on solutions, but they seem to be dated or not applicable to my case. ...
Viktor Hedefalk's user avatar
8 votes
4 answers
11k views

DNSMASQ refuses to start with "unknown interface error" even though the interface is up

A bizarre problem that I haven't found anywhere else on the internet, hinting it's probably me f'ing something up, but what? Trying to start dnsmasq.service, no matter if on boot or from user session ...
Deuxis's user avatar
  • 323
7 votes
3 answers
7k views

Get the external IP address in shell without dig in 2016?

This question: "How can I get my external IP address in bash?" Solves the question with a call to dig: dig +short myip.opendns.com @resolver1.opendns.com; that is the fastest resolution possible, ...
user avatar
7 votes
1 answer
4k views

Why is dnsmasq putting my router IP in /etc/resolv.conf instead of 127.0.0.1?

I'm having DNS resolution issues in various contexts which appear to trace back to my networking configuration. I'm running just the dnsmasq-base installation of dnsmasq on two Linux installations (...
Mike B's user avatar
  • 171
6 votes
4 answers
13k views

Make dnsmasq not altering resolv.conf

Every time I (re)start dnsmasq it replaces /etc/resolv.conf with nameserver 127.0.0.1 .... However that maschine has not to use the local DNS service. (Please don't ask why, the whole environment is ...
Al Klimov's user avatar
  • 557
6 votes
1 answer
9k views

UFW blocks DHCP

I am on Debian Buster. I have two network devices in my server. Wifi which is connected to the internet, and a ethernet card which is connected to a small intranet at home. I have installed dnsmasq, ...
daniel_hck's user avatar
6 votes
1 answer
14k views

How do I make dnsmasq obey the order of servers in resolv.conf

here's the generated resolv.conf # Generated by resolvconf nameserver 127.0.0.1 nameserver 208.67.222.222 nameserver 208.67.220.220 nameserver 192.168.1.1 what's going on in the log appears to be, ...
xenoterracide's user avatar
6 votes
1 answer
12k views

Use dnsmasq to pushing routes to my clients on a small local network

I'm trying to use dnsmasq to pushing routes to my clients on a small local network. However my clients (Server #1, #2 and #3) can not use these routes. The dnsmasq service is running and I do not ...
Eduardo Lucio's user avatar
6 votes
1 answer
14k views

Dnsmasq white list for specific clients on network

I'd like to use dnsmasq to set up a white list for certain clients on my network. For instance, I'd like to have these rules for clients in the range 192.168.1.10 - 192.168.1.20: no-resolv server=/...
Big McLargeHuge's user avatar
6 votes
1 answer
6k views

resolve the server hostname of a dnsmasq server with multiple subnets

I have a self-made Linux router running dnsmasq. It has two different NICs through which clients are connected; one of them has the subnet 192.168.1. and one the subnet 192.168.2.. My /etc/dnsmasq....
janoliver's user avatar
  • 1,776
6 votes
1 answer
7k views

DNSMasq - Different Responses for Specific MAC Addresses

Anyone know of a way for me to setup a separate host file, or send different responses, from DNSMasq to specific PCs on my network? Specifically, if I wanted to block youtube, or facebook, or etc. ...
MSF004's user avatar
  • 305
6 votes
1 answer
11k views

Adding custom DNS server for pppd client connection?

I'm trying to setup dnsmasq to accelerate DNS resolving , but since i use a PPPoE connection , there're both dns server provided by ISP , and the 127.0.0.1. So how can i place the local dns server as ...
daisy's user avatar
  • 54.8k
6 votes
2 answers
4k views

systemd-resolved block a domain name

Using systemd-resolved how do I block, route, or resolve, a domain name to a black hole, or a nowhere address. Bonus points for subdomains as well. I tried a single domain in /etc/hosts: 127.0.0.1 ...
jmunsch's user avatar
  • 4,366
6 votes
4 answers
22k views

dnsmasq always returning REFUSED

Ubuntu Server 16.04.04 dnsmasq.conf: listen-address = 192.168.5.5, 172.30.108.1, 127.0.0.1 log-queries resolv-file = /etc/resolv.dnsmasq /etc/resolv.dnsmasq: nameserver = 8.8.8.8 /etc/resolv....
f0rd42's user avatar
  • 171
6 votes
1 answer
4k views

NetworkManager-configured dnsmasq failing to forward requests

I use Lubuntu 17.04, on which the NetworkManager service (subsystem?) performs some configuration actions when I connect to a new network. One of these is (re)setting the /etc/resolv.conf file to: # ...
einpoklum's user avatar
  • 9,637
6 votes
1 answer
3k views

Split-horizon on DNSMasq?

Is it possible to perform Split-horizon with DNSMasq? I've googled and it seems like it is only possible with Bind9, any advice would be much appericated
John Nguyen's user avatar
5 votes
2 answers
5k views

dnsmasq dns nameserver priority parameters - strict-order

I have a setup specifying two DNS namservers. One in local, the other is external. The local one is a pihole, which itself forwards requests externally after url filtering. The external one is set ...
Craig  Hicks's user avatar
5 votes
2 answers
8k views

Internet connection lost after installing dnsmasq

I'm currently trying to set up an access point on my raspberry pi, but as soon as I install 'dnsmasq', the internet connection is lost ('unknown host' when trying to ping any server). What causes ...
vii's user avatar
  • 123
5 votes
1 answer
3k views

How do I force dnsmasq to use a specific DNS server without affecting the host systems DNS settings?

How do I set dnsmasq to use one specific DNS server without changing which DNS server the host system uses for its own DNS requests? I should clarify I am not using dnsmasq as a DHCP server but only ...
Pusdeo Squirrel's user avatar
5 votes
3 answers
32k views

dnsmasq: failed to bind DHCP server socket: Address already in use [closed]

I have a box setup as a PXE server. The interface that will provide DHCP leases is eno3. dnsmasq is installed and provides tftp service ** bind is not installed - Ubunutu 18.04 ** Error: dnsmasq: ...
user3242295's user avatar
5 votes
1 answer
1k views

Is libvirt dnsmasq exposed to the network, if I run Fedora without a firewall?

There's this nice saying from Ubuntu: no open ports on the default install. Other Linux OS's look similar, including Fedora. Configuring firewall policies can be a pain in the neck, so this is a ...
sourcejedi's user avatar
5 votes
1 answer
18k views

Dnsmasq cannot create listening socket for port 53

I am trying to set up a DNS server on a Raspberry pi running Raspbian. I have been following tutorials online on how to setup a DNS server, and I found this one that was very easy to follow. http://...
qaxf6auux's user avatar
  • 151
5 votes
1 answer
4k views

How to get DNSMASQ to work?

I'm using Elementary OS Freya (Ubuntu 14.04). I've install DNSMASQ and running the command and getting the error below: $ sudo service dnsmasq start * Starting DNS forwarder and DHCP server dnsmasq ...
Marcelo Rodovalho's user avatar
5 votes
2 answers
1k views

Virtual Wireless Access Point

Basically, I want to be able to connect to a wireless network from my laptop. Then, I want my virtual machine to acquire internet access via a bridged connection from ETH0 of the VM to the host’s ...
jaypirate's user avatar
4 votes
2 answers
8k views

Why does nslookup fail for DNS records set to a private address?

Setup On some networks I'm able to use nslookup to resolve a domain name that is pointed to a private ip address: @work> nslookup my192.ddns.net Server: 10.1.2.3 Address: 10.1.2.3#53 Non-...
cwd's user avatar
  • 45.6k
4 votes
1 answer
9k views

dnsmasq not working after reboot

After rebooting, dnsmasq service is running, but does not respond to remote requests (trying using "dig @10.0.0.1 stackexchange.com" from another machine). The log looks good in my opinion: Aug 11 17:...
RolandU's user avatar
  • 123
4 votes
3 answers
2k views

Configuring dnsmasq in Mint/Ubuntu/Debian

I have a computer with multiple ethernet ports - one goes out to the internet, the rest connects to other devices to give them internet connectivity. The DHCP service is provided by dnsmasq. The ...
Sven Geier's user avatar
4 votes
1 answer
7k views

How to force libvirt to use the host dnsmasq service?

Libvirt has one defined network, which uses dnsmasq as DHCP/DNS server. But this dnsmasq is a separate instance (config in /var/lib/libvirt/dnsmasq/default.conf), which creates additional dnsmasq ...
Mikhail Morfikov's user avatar
4 votes
2 answers
2k views

Configure Spamassassin to use URIBL and Google Public DNS

I use Google Public DNS servers on my mail server. However, URIBL and other spam blocking sites (which work over DNS) block major DNS sites such as Google Public DNS. I think if I run my own DNS ...
user avatar
4 votes
2 answers
3k views

dnsmasq - flooding daemon.log with messages

I am hoping to use dnsmasq to provide for a wireless AP on Debian Wheezy. Issue: daemon.log is filling up with repeated 'DHCPREQUEST' and 'DHCPACK' messages from the one test client (win7). Config ...
ethrbunny's user avatar
  • 753
4 votes
2 answers
1k views

Compare domain blocking by iptables vs dnsmasq-/etc/hosts

I now use dnsmasq, with a large /etc/hosts file obtained from Energized packs [https://energized.pro/#packs]. Some of these are quite large. Trying to get info from the dnsmasq team, which is still ...
ZacWolf's user avatar
  • 161
4 votes
1 answer
1k views

DNSmasq - MAC address-based responses for both IPV4 and IPv6

I have my own dhcp server with dnsmasq on a network wit both IPv4 and IPv6. Everything has been working fine. Now I would like to it to offer different DNS Server addresses than the default for my ...
Mike S's user avatar
  • 2,572
4 votes
1 answer
1k views

round robin for curl and dnsmasq

I have setup dnsmasq to the basic configuration, pointing a file with two IP addresses. 10.0.0.1 a.b.c 10.0.0.2 a.b.c When I do nslookup or dig on a.b.c, I see round robin seems to be in effect (as ...
mccormickt12's user avatar
4 votes
0 answers
2k views

Loss of DNS on BeagleBone Black Debian

We are running a remote application on a beaglebone black in which we regularly report our external ip address retrieved from various external ip services (freegeoip.net, ipinfo.io, various STUN ...
StephenH's user avatar
  • 141
4 votes
2 answers
4k views

How to configure dnsmasq on Mint-18 with NetworkManager?

I am learning linux networking. I am very confused by the config file locations. What I read on the web doesn't match how my machine is set up. I am using Mint 18. I am using network-manager & ...
hba's user avatar
  • 927
4 votes
1 answer
1k views

HOSTAPD fails without stopping and drops clients

I am not the strongest Linux admin. I just thought I would throw that out there. I have a Linux wireless access point with HOSTAPD and DNSMASQ. I have been working on this for quite some time and I ...
Goff's user avatar
  • 271
3 votes
4 answers
5k views

dnsmasq & systemd Causing Intermittent CPU Spikes

Problem: Running Ubuntu 17.10 I have been trying to resolv (hehe) this issue for about a week now and despite countless Google searches and about 20 different attempts, I can not stop dnsmasq from ...
Jonny Asmar's user avatar
3 votes
2 answers
2k views

NetworkManager should ask only the "top" DNS server

I'm in a WLAN which is censoring web sites by their DNS server. As I want not to be censored I use a VPN (OpenVPN, NetworkManager) for all of my traffic. If I try to resolve a domain, NetworkManager'...
Al Klimov's user avatar
  • 557

1
2 3 4 5 6