Questions tagged [dnsmasq]

DNSMASQ QUESTIONS MUST BE PROGRAMMING RELATED. 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.

DNSMASQ QUESTIONS MUST BE PROGRAMMING RELATED. 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. It can serve the names of local machines which are not in the global DNS. The DHCP server integrates with the DNS server and allows machines with DHCP-allocated addresses to appear in the DNS with names configured either in each host or in a central configuration file. Dnsmasq supports static and dynamic DHCP leases and BOOTP/TFTP/PXE for network booting of diskless machines.

Dnsmasq is targeted at home networks using NAT and connected to the internet via a modem, cable-modem or ADSL connection but would be a good choice for any smallish network (up to 1000 clients is known to work) where low resource use and ease of configuration are important.

286 questions
57
votes
2 answers

Wildcard subdomains with dnsmasq

I have a device that is already mapped to domain.tld. I now want to create a wildcard for all subdomains *.domain.tld so that they are mapped to the ip of domain.tld, too. How do I do this with dnsmasq?
danb
  • 573
  • 1
  • 4
  • 5
50
votes
9 answers

Docker cannot resolve DNS on private network

Docker is a software tool primarily used by programmers as it is the mechanism programmers use to produce container images. My machine is on a private network with private DNS servers, and a private zone for DNS resolution. I can resolve hosts on…
wizulus
  • 5,653
  • 2
  • 23
  • 40
42
votes
7 answers

DNS not working within docker containers when host uses dnsmasq and Google's DNS server are firewalled?

The symptom is: the host machine has proper network access, but programs running within containers can't resolve DNS names (which may appear to be "can't access the network" before investigating more). $ sudo docker run -ti mmoy/ubuntu-netutils…
Matthieu Moy
  • 15,151
  • 5
  • 38
  • 65
28
votes
5 answers

dnsmasq, serve different ip addresses based on interface used

Basically my situation is that I'm running a VM for developing web sites. The host machine has its dns pointing at the VM which, is running dnsmasq, which resolves the addresses of various dev sites; i.e. test.mysite.vm, etc. The issue is, when I go…
Ian Chadwick
  • 1,547
  • 1
  • 19
  • 21
16
votes
5 answers

cURL + Laravel Valet + dnsmasq not working

when I execute a PHP script which runs a cURL request to a .test domain that is setup on my Mac with Laravel Valet/dnsmasq, I get this error printed : Could not resolve: mydomain.test (Domain name not found) When I test the domain in my browser,…
Maxime Freschard
  • 1,066
  • 2
  • 15
  • 26
13
votes
4 answers

Docker container can only access internet with --net=host

Just installed docker 1.10.1 today using their installation guide. However, none of my containers can access the internet unless I used --net=host in the docker run command. I have tried various workarounds from these…
wheeler
  • 2,823
  • 3
  • 27
  • 43
12
votes
1 answer

Run dnsmasq as DHCP server from inside a Docker container

I'm trying to get dnsmasq to operate as a DHCP server inside a Docker container, issuing DHCP addresses to machines on the host's physical network. I'm using the Alpine Linux 6MB container from https://hub.docker.com/r/andyshinn/dnsmasq/. It works…
Josh Wulf
  • 4,727
  • 2
  • 20
  • 34
12
votes
2 answers

Dynamic proxy_pass in nginx to another pod in Kubernetes

I'm trying to create an nginx proxy that forwards requests to / to http://. I first tried the following: location ~ ^/(.+)$ { set $backend "http://$1:80"; proxy_pass $backend; } But it fails saying something like (when…
Johan
  • 37,479
  • 32
  • 149
  • 237
11
votes
1 answer

Curl: Showing "Can't resolve domain name" error of the all localhost sites from PHP

Today my cURL is starting to show me this error Could not resolve: {local-domain.test} (domain name not found) All working fine if I'm trying to get some info from an external link, but local sites aren't working properly. So, here is my code…
alexey-novikov
  • 593
  • 2
  • 16
11
votes
3 answers

dnsmasq tags and conditional dns server

As an overall solution i'd like to split dns resolving between different servers, using dnsmasq. i.e. Default to dns server A, unless explicitly set to dns server B per host (mac). I'd like to split my network into dnsmasq tagged subnets, for this…
wibble
  • 635
  • 1
  • 5
  • 16
10
votes
3 answers

Yosemite localhost resolver and dnsmasq fails offline

Setup my local dev environment similar to this post and everything was working fine but recently I am unable to access my local dev domains when I am offline. When I am connected to the internet it works fine. I'm wondering if something changed…
jamesrward
  • 121
  • 1
  • 9
9
votes
1 answer

DNSMasq forwarding on specific domains

I've a problem of routing DNS traffic on specific domains. Example: *.swaroop.com should forward to ns.swaroop.com swaroop.org should forward to ns.swaroop.org Can we achieve the above scenario with DNSMasq? Please let me know if anyone has done…
Swaroop Kundeti
  • 515
  • 4
  • 11
  • 25
9
votes
1 answer

Setting Up Docker Dnsmasq

I'm trying to set up a docker dnsmasq container so that I can have all my docker containers look up the domain names rather than having hard-coded IPs (if they are on the same host). This fixes an issue with the fact that one cannot alter the…
Programster
  • 12,242
  • 9
  • 49
  • 55
8
votes
0 answers

Can dnsmasq use stale record in cache if cache expires and upstream fail?

If all upstream dns server fail, can dnsmasq uses the local stale cache? Or if not, is there any dns cache server support this feature?
SunRunAway
  • 305
  • 4
  • 10
8
votes
5 answers

multiple local domains with dnsmasq?

So I'm using dnsmasq for my local dev environment & I need to set it up to use multiple domains ex. (.dev, .test, .somethingelse) how can this be done? currently It's working with .dev only this is how my dnsmasq.conf looks…
John
  • 91
  • 1
  • 1
  • 3
1
2 3
19 20