Questions tagged [dnsmasq]

Dnsmasq is a lightweight, easy to configure DNS forwarder and DHCP server. It is designed to provide DNS and, optionally, DHCP, to a small network.

Filter by
Sorted by
Tagged with
59 votes
4 answers
56k views

Why is Chromium bypassing /etc/hosts and dnsmasq?

I'm using hostsblock together with dnsmasq on Arch Linux to block some websites, one of them is facebook.com and www.facebook.com. I know everything is working properly because a simple ping to ...
thiagowfx's user avatar
  • 1,748
40 votes
3 answers
194k views

How can I set up a 'local' domain so that everyone on my local network can view a locally hosted site?

I want to set up MediaWiki on one of my home machines, and then have all requests made on the local network for 'wiki.home' or 'wiki.local' point to that box. I know that this can be done by editing ...
Dan's user avatar
  • 403
22 votes
4 answers
57k views

How to log all DNS requests made through OpenWRT router?

I have an OpenWRT router that is running dnsmasq. I want to create a file that has each domain that has been requested through the router. My output should looks something like this: google.com cnn....
exvance's user avatar
  • 321
20 votes
7 answers
56k views

Using dnsmasq with NetworkManager

It was well known that NetworkManager does not play well with dnsmasq (ref: here). I've skimmed throught the lengthy discussion here but still not sure what the recommended way to deal with the ...
xpt's user avatar
  • 8,651
16 votes
2 answers
16k views

DD-WRT: DNSMasq expand-hosts not working

I have a Linksys router running DD-WRT (Firmware: DD-WRT v24-sp2 (09/08/09) mini). I have it successfully resolving the DNS names for my DHCP-assigned systems, but only when I fully-qualify those ...
Craig Walker's user avatar
12 votes
4 answers
35k views

resolv.conf keeps getting overwritten when dnsmasq is restarted, breaking dnsmasq

I'm running Debian Jessie and I'm trying to configure dnsmasq as a caching DNS server. I used a guide to come up with the following /etc/dnsmasq.conf: listen-address=127.0.0.1 bind-interfaces domain-...
nullUser's user avatar
  • 733
11 votes
3 answers
58k views

Verify dnsmasq configuration

How to verify dnsmasq's configuration? dnsmasq used to be able to give verbose info about itself in /var/log/daemon.log, as explained in dnsmasq testing. However, when I restarted my dnsmasq ...
xpt's user avatar
  • 8,651
11 votes
3 answers
39k views

Ubuntu 18.04: Disable dnsmasq-base and enable full dnsmasq

I just installed Ubuntu 18.04, and after i configured my web server i wanted to also replace the base dnsmasq since i needed support for wildcards. After I installed dnsmasq using this quide, the ...
Florentin Stemate's user avatar
11 votes
1 answer
30k views

Tell docker to use the DNS server in the host system

I have dnsmasq running in the host, and I want the docker containers to use that, instead of the default Google servers (8.8.8.8) My host /etc/resolv.conf looks as follows: » cat /etc/resolv.conf # ...
blueFast's user avatar
  • 2,716
10 votes
8 answers
52k views

DD-WRT serving additional DNS servers instead of just the router’s IP

I have a DD-WRT (using DD-WRT v24SP2-MULTI (03/21/11) std) router set up with DNSMasq to resolve certain domains to internal addresses and pass everything else thru. The router itself is configured to ...
0x6A75616E's user avatar
9 votes
0 answers
5k views

What are the real world differences between bind, systemd-resolved, dnsmasq, etc.? [closed]

I'm trying to achieve three simple goals (on our CentOS8 server)... local DNS resolution/caching DNSSEC DNSoverTLS At first I went straight for dnsmasq because that was what it seemed most people ...
oucil's user avatar
  • 277
8 votes
3 answers
7k views

How to use dnsmasq with DHCP-assigned DNS servers?

TL;DR version: How do I configure dnsmasq to fall back to the DNS servers pointed to by the DHCP server on my LAN, to enable switching wireless networks? On my developer laptop I've recently started ...
Sander Bol's user avatar
7 votes
1 answer
17k views

DD-WRT: dnsmasq headaches with static hosts

I am using dd-wrt (r23503, for the record) on my new Asus RT-AC56U router. Unfortunately, dnsmasq configuration is giving me nothing but headaches. Here's what I want: DNS queries from the LAN/WLAN ...
JetpackJohn's user avatar
7 votes
1 answer
53k views

Using dnsmasq to address machines by name and resolve external hostnames

I'm having some trouble with my dnsmasq setup. All I want it to do is resolve certain hostnames to certain ip addresses for any machine on my network. More specifically, I'm trying to enable all ...
BrDaHa's user avatar
  • 243
6 votes
1 answer
13k views

Where to set external DNS in DNSMASQ?

I am getting "Query refused" from my network when I use nslookup google.com. The DNS Server is 192.168.1.2 who runs dnsmasq. It was working yesterday. How can I solve it? I bet it's something about ...
JorgeeFG's user avatar
  • 416
6 votes
2 answers
15k views

dnsmasq without altering /etc/hosts file manually

I've trying to get dnsmasq working as a combined dns and dhcp server. It's infuriating so far... In short, the DNS works fine for anything added to /etc/hosts, and the dhcp works fine, but the dhcp is ...
Sirex's user avatar
  • 11.1k
6 votes
1 answer
12k views

Dnsmasq cache dump

How to dump the cache of dnsmasq? This, How to see dnsmasq cache contents https://www.snbforums.com/threads/how-to-see-dnsmasq-cache-contents.36478/ says sent SIGUSR1 to dump the cache to ...
xpt's user avatar
  • 8,651
6 votes
1 answer
4k views

How to register subdomains on dnsmasq

how can I register subdomains of my web development server into my DNS automatically? I mean, I wouldn't like to edit the DNS config file, but send something from the client that says 'Hey, I have a ...
JorgeeFG's user avatar
  • 416
6 votes
1 answer
20k views

I don't want my DHCP to be a default gateway

I have a device which runs a DHCP server. When I connect it with USB to my computer, the PC gets an IP address and the device becomes the default gateway. I just want the device to agree on IP ...
user1190's user avatar
  • 620
6 votes
2 answers
8k views

how can I combine dnsmasq and urlblacklist?

Is there a way to integrate dnsmasq and the popular urlblacklist.com list? I thought about adding all the entries with the -A flag, but that's a lot of hosts for dnsmasq to process, especially on a ...
Michael Lang's user avatar
5 votes
2 answers
28k views

Get all the IP addresses given out by DHCP Server with dnsmasq and hostapd

I have created a systemd service for the hostapd application on Raspbian Jessie Lite. The source code is similar to this GitHub Gist but with IP addresses ranging in the 192.168.50.x/24. Everything ...
Shan-Desai's user avatar
5 votes
1 answer
23k views

DNSMASQ not answering DNS queries from routed subnet

I have two sub-nets connected together using two DD-WRT APs - The remote AP is in Client-Routed mode so it has a separate subnet its IP are 192.168.2.1/24 and 192.168.0.5/24. The local AP is in AP ...
Ross's user avatar
  • 1,326
5 votes
2 answers
4k views

linux dnsmasq: how do I increase the ttl?

Is it possible to dictate the TTL of resolved entries? In other words, is it possible to override the received TTL for resolved entries and make those higher? Reason: I find that dnsmasq tries to ...
jldupont's user avatar
  • 6,704
5 votes
0 answers
1k views

dnsmasq for looking up `.local` domains on the clients that don't support mDNS

mDNS (e.g. avahi, bonjour) allows a machine to advertise itself as machine-name.local on its LAN, and allows clients to look it up by that domain name instead of by IP. Most platforms support mDNS out ...
Peeyush Kushwaha's user avatar
4 votes
4 answers
22k views

dnsmasq not working to point .local addresses to 127.0.0.1

I'd like to get .local addresses (such as test.local) to point to 127.0.0.1 but it isn't working. I'm on latest Ubuntu. In /etc/NetworkManager/NetworkManager.conf I commented out dns=dnsmasq then did ...
user779159's user avatar
4 votes
1 answer
4k views

Local hostname not working without the trailing dot

I noticed all my local hostnames have a trailing dot at the end when I use some LAN scan tool on my Android phone. And without it, I can't get a ping to work from my Windows desktop (it works fine ...
dan's user avatar
  • 504
4 votes
1 answer
7k views

Get dnsmasq to automatically register hostnames in its DHCP network on its DNS

I have configured dnsmasq to dish out 10.0.0.* addresses to hosts on an ethernet LAN. The hosts on this network request static IP addresses using DHCP from the dnsmasq server running on 10.0.0.1. They ...
Magnus's user avatar
  • 139
4 votes
1 answer
4k views

Best choice for private/home network TLD? Overlap with mDNS?

I'm trying to make my home network settings sane and I noticed I have a mix of TLDs with .local and .localdomain (the latter is the default of my Ubiquiti Security Gateway). I understand that .local ...
DaveBurns's user avatar
  • 142
4 votes
1 answer
7k views

How do I configure dnsmasq to resolve local hostnames with dualstack ipv4 & ipv6?

Problem: I have a router (openwrt) at home and I want computers to connect to each other on the local subnet by simply typing hostname instead of their ip. Right now when dns query is send to router, ...
kotoko's user avatar
  • 43
4 votes
1 answer
10k views

Extend OpenWRT DNS with lines to resolve local IP

I have an OpenWRT router acting as an Wifi access point to a local network. No actual routing currently involved. The ip adress of the wlan0 interface on the router is statically set to 192.168.120.1. ...
TheMeaningfulEngineer's user avatar
3 votes
1 answer
6k views

is there any Public DNS Server (except openDNS) that have port open other than 53? [closed]

My ISP block a lot of stuff and it's pain in the ass to setup DNSCrypt (and not possible on some devices like android without rooting) on every devices. So, i decided to migrate my router firmware to ...
Kaze Nakazawa's user avatar
3 votes
1 answer
10k views

My router false positively detects DNS-rebind attack

I have a router running the latest version of Advanced Tomato. Attempting to access a server on my home network (the same network as the router in question), by using my domain name (as opposed to my ...
user740250's user avatar
3 votes
1 answer
7k views

dnsmasq fails to answer queries on ubuntu 16.04

After upgrading to Ubuntu 16.04 dnsmasq fails to answer quires from subnets other then it's interfaces belong to. I wonder if there is an option that allows to add trusted subnets? Here is the log ...
Edik Mkoyan's user avatar
3 votes
1 answer
3k views

Why does Windows 10 seem to ignore the DNS query replied from my router?

I have an OpenWRT router. I have added few entries to the /etc/hosts file on the router, to block the users from accessing some of the websites. Recently, I have upgraded a computer to Windows 10, and ...
user1556811's user avatar
3 votes
2 answers
10k views

dnsmasq: how to handle the local domain (A, PTR)?

(adapted from the dnsmasq mailing list which archive seems to be down so I am not sure it is still active) Hello, I set up dnsmasq on my home network to replace the isc/bind legacy system :) when ...
WoJ's user avatar
  • 3,123
3 votes
2 answers
11k views

Setting up a srv record with dnsmasq - do I need to use a FQDN?

I'm currently running a linux based/DIY router that provides a few additional services. I don't currently have a domain set up, and I'd like to set up a srv record for certain services hosted on the ...
Journeyman Geek's user avatar
  • 129k
3 votes
1 answer
2k views

DNSMasq refuse to assign correct address

I think I'm getting crazy. I have my tiny server running dnsmasq nicely for years, doing its job nicely. Yesterday I added new host/interface to the network and I am trying to configure it with dhcp-...
Ren's user avatar
  • 186
3 votes
1 answer
4k views

How do I configure DNS when sharing a VPN connection in linux?

I'm using a Linux computer (raspberry pi) to share a VPN connection over ethernet. I want the raspberry pi to connect to the internet normally (not over the VPN). I'm very close to getting it working, ...
pauld's user avatar
  • 31
3 votes
1 answer
2k views

OpenWRT based gateway with dnsmasq and internal server with bind

I have router based on OpenWRT which has dnsmasq 2.59. Inside my local area network I have a NS server bind. This server has internal and external views for a couple of my domains. My router forwards ...
Peter's user avatar
  • 31
3 votes
1 answer
771 views

Why is dnsmasq forwarding already resolved addresses?

I can ping the host: dig registry.mynet And the DNS server does what is expected: dnsmasq[1]: 895 127.0.0.1/44580 query[A] registry.mynet from 127.0.0.1 dnsmasq[1]: 895 127.0.0.1/44580 /etc/hosts ...
DanMetro's user avatar
3 votes
1 answer
2k views

DNS server merging

I have a router running, among other things, dnsmasq with standard setup, so I get DNS proxy plus additional local servers, plus name resolution for all machines whose IP address is managed via ...
ZioByte's user avatar
  • 541
3 votes
1 answer
2k views

RADVD for IPv6 assignement, DNSMasq for DHCP handing out DNS for IPv6 clients - how to do?

As you know, Windows does not support setting up DNS via Router Advertisements (RDNSS) for IPv6. So it should use a DHCPv6 server to somehow get the needed address. I'm using DD-WRT on my router ...
Evengard's user avatar
  • 1,784
3 votes
2 answers
11k views

Connected to hostapd hotspot but no Internet

I'm setting up a Gentoo Linux home router with following configuration: eth0: connected to WAN (managed by systemd-networkd) wlan0: access point for LAN (managed by hostapd) I use dnsmasq as DNS and ...
shouya's user avatar
  • 2,567
3 votes
2 answers
2k views

Block (nullroute?) an IPv6 hostname using /etc/hosts

I'm trying to prevent my web browser from communicating with certain hosts (mostly ads and tracking). I have a list of such hosts in my /etc/hosts file. For IPv4 I can do: 255.255.255.255 example....
ᴍᴇʜᴏᴠ's user avatar
3 votes
1 answer
5k views

IPv6 addresses in dnsmasq

As I need to use dnsmasq to route all requests on *.local to my local machine (and use there an IPv6 addresses), i set up the dnsmasq like this: /etc/dnsmasq.d/my-local.conf address=/local/::1 ...
Radek Simko's user avatar
3 votes
0 answers
2k views

dnsmasq is providing the same IP to two different clients

Consider the following dnsmasq config (used for a VPN server which is on a tap interface tap_vpn0): dhcp-ignore-names dhcp-generate-names dhcp-sequential-ip interface=tap_vpn0 dhcp-range=192.168.120....
Evengard's user avatar
  • 1,784
3 votes
0 answers
3k views

DNS solution for LAN or local home network

This is about how to provide a total solution for a local home network -- I've found a good one here about dnsmasq configuration. I managed to use the above article to have dnsmasq server set up ...
xpt's user avatar
  • 8,651
3 votes
0 answers
7k views

How to configure dnsmasq to send DNS server Info via DHCPv6

There is a known problem with a IPv6 Windows Client that it does not accept the DNS Server Info sent by Server via Router Advertisements, even though the IPv6 address assignment works. DNS Server ...
Sajal's user avatar
  • 31
3 votes
1 answer
1k views

Create alias to local hostname

I have the following scenario: A host machine (OS X) and a guest machine (Ubuntu). The guest is running through Virtual Box, and the network configurations is set to "Bridged adapter". Both machines ...
Olof Johansson's user avatar
3 votes
0 answers
507 views

Using dnsmasq on OS X when not connected to the Internet

I'm routing dns requests through dnsmasq so that domains I'm using for local development point to 127.0.0.1. This works great when I'm connected to the Internet via Wi-Fi or ethernet, but I start to ...
Jonathan Brinley's user avatar

1
2 3 4 5 6