Tag Info

Hot answers tagged

18

As the dnsmasq manual says … … just use # for a wildcard:address=/#/192.168.2.1


12

You can do this by using the server= directive e.g. server=/ajax.googleapis.com/8.8.8.8 would query the google public DNS server for the ajax.googleapis.com domain, similarly server=/amazonaws.com/209.244.0.3 would query Level3's public DNS server for the amazonaws.com domain. You can group multiple domains together server=/co.uk/com/8.8.4.4 ...


7

I do the exact same thing on my dev server(s) so that I can have an rsynced mirror locally and on the off-site server with identical configs. Here's what you need in your dnsmasq.conf (make sure you restart it) assuming your webserver's internal interface is 192.168.0.3: address=/.server.mydomain.com/192.168.0.3 This will create a wildcard entry for ...


7

Normally, you would define your static hosts in /etc/hosts and enable hosts in your dnsmasq.conf file. dnsmasq allows you to specify an alternate name for this file. If you want rtfm.lan to be addressed as 192.168.1.2 then add a line reading 192.168.1.2 rtfm.lan to /etc/hosts. Normally, your hosts file for dnsmasq should be portable to all your ...


6

Alternatively to @Chopper3 's solution, you can add iptables rules like these # Create the DHCP_clients chain in the 'raw' table iptables -t raw -N DHCP_clients # Incoming DHCP, pass to chain processing DHCP iptables -t raw -A PREROUTING -p udp --dport 67 -j DHCP_clients # Allowed DHCP clients iptables -t raw -A DHCP_clients -m mac --mac-source ...


6

Refer to the DNSmasq documentation, especially the dnsmasq manpage and sample configuration file. The local keyword tells DNSmasq to perform those domain lookups with local data. This affects requests send to DNSmasq for foo.localnet and bar.localnet, for example. I don't think this is what you want. # Add local-only domains here, queries in these ...


6

Sure - this is a fairly standard thing to do to prevent clients from falling victim to one of the various malwares that change the clients' DNS settings to point to a malicious server. You can point clients to a local recursive resolver, then block outbound 53/tcp and 53/udp from all IP addresses on the network except for the local resolver.


5

dnsmasq has dhcp server disabled by default. To enable it you have to uncomment dhcp-related lines in /etc/dnsmasq.conf to forward all requests to 208.67.222.222 it's sufficient to add (without touching dnsmasq config) in /etc/resolv.conf: nameserver 127.0.0.1 # In order to configure dnsmasq to act as cache for the host on which it # is running, put [as ...


5

None. It's important that the nominated default gateway should be a machine on the local network which will gateway your traffic to and from the wider internet, and it's important that the nominated DNS server should be a machine which will answer your DNS queries correctly and promptly. Often these functions are consolidated into a single device, but ...


5

Setup reservations for the specific hosts using the dhcp-host option. Use tag options to flag those for a special set of options. This is completely un-tested, but I suspect your config might look something like this. Check the man page for full details. dhcp-host=00:15:99:27:f8:98,set:specialhosts,192.168.32.20 ...


5

CAN this be done? Sure - there are broken DNS servers (e.g. the ones AOL runs) that do this, and every admin I know hates it. SHOULD this be done? Almost certainly no. Generally speaking the TTL was set to a particular value for a reason (in google's case, probably fault tolerance: You'll only be unable to reach google for 5 minutes if that server blows ...


5

Answered my own question, thanks to rfc2132 dhcp-option=6,192.168.0.90,192.168.0.98 However, RFC2132 specifies option 5 as a list of name servers and option 6 as a list of domain name servers, and I'm not sure what the difference is. Either way, option 6 put them correctly as nameserver 192.168.0.90 nameserver 192.168.0.98 in /etc/resolv.conf


5

You can do this by specifying only a static range dhcp-range=192.168.0.0,static EDIT: Change the address range above to meet your requirements. With no dynamic ranges specified dnsmask will only provide addresses to hosts that have a corresponding dhcp-host configuration # Specify a subnet which can't be used for dynamic address allocation, # is ...


5

ping use glibc's name resolution system, called Name Service Switch. This uses the /etc/nsswitch.conf file to know where to look for in order to resolve a name to an IP. The hosts: line in this file represents an order of preference for each service. For exemple, files represent the local /etc/hosts file, dns uses the /etc/resolv.conf file to contact a DNS ...


5

dig (domain information groper) and nslookup (query Internet name servers interactively) are tools that query name servers. Unless a specific name server is specified as a commandline argument they will query the name server(s) found in /etc/resolv.conf. They simply don't look at alternative sources of host information such as the /etc/hosts file or other ...


5

The reason you're not finding the option is that OS resolver libraries cannot use ports other than 53. While it's possible to have a nameserver forwarder use ports other than 53, it is unlikely that the authors of this software support and/or anticipate your particular use case. You would need ask them why this feature is absent. You could try something ...


4

The 142.3.102.202 and 142.3.100.15 do not know anything about your local private network so they correctly return NXDOAIN. These are also the default name servers for the system so when you don't specify a name server they will be used. You will need to overwrite the contents of /etc/resolv.conf and configure the nameserver directives to point to your ...


4

the DIRTIEST most ugliest thing that can be done is... 1-Downloading the source 2-find the file called cache.c 3-find the function is_expired 4- Change it in this way static int is_expired(time_t now, struct crec *crecp) { if (crecp->flags & F_IMMORTAL) return 0; if (difftime(now, crecp->ttd) < 0) return 0; return 0; // IT WAS ...


4

There is no "recommended alternative" to dnsmasq that I'm aware of. Dnsmasq works perfectly fine for it's purpose. You can set the TTL of local responses from a dnsmasq server with the local-ttl option. I don't know of any technical basis for the claim that "Windows is [...] more aggressive in caching DNS responses than Linux" -- as far as I know, both ...


4

I wouldn't put too much effort into having it "play nicely", I'd rather go for AD-integrated DNS instead of dnsmasq... Install DNS Server on the Windows 2003 DC Create a primary forward-lookup zone called DOMAIN.address.com Transfer the records from your Ubuntu server to the new DNS Server on the DC Convert the zone to an Active Directory-integrated zone ...


3

I can't tell how much you understand from your question but obviously there is no requirement for your gateway to also run DNS. The DNS server you use on your computers could be anywhere on the Internet, as long as you can access that server via its IP address. The only advantage I can see is if you have a gateway router that includes a caching resolver (I ...


3

The address option will accept fully qualified domain names. address=/mydomain.com/192.168.1.156


3

Do you have a .dev zone in DNS already? You can create a wildcard entry where *.dev goes to the loopback.


3

You can use Round Robin DNS to make a single DNS entry give out one IP address in a pool of multiple IP addresses. So a query for device.local will reply with 192.168.0.4, and then the next query for device.local will be replied to with 192.168.0.5 and etc. until the pool of addresses is finished. Once the pool of addresses has been given out in succession, ...


3

When you say "this wont have internet access!" I am reminded of a deployment I did a few years ago. I did this for a kiosk deployment once. The kiosks were connected to LAN that had no Internet connectivity. The kisos were used to access a single webapp, hosted by a beefier "server" kiosk machine. Any attempts to access other web sites needed to be ...


3

The dnsmasq manpage says: --cname=<cname>,<target> Return a CNAME record which indicates that <cname> is really <target>. There are significant limitations on the target; it must be a DNS name which is known to dnsmasq from /etc/hosts (or additional hosts files) or from DHCP. If the target does not satisfy this ...


3

The man page explains it quite nicely. If it's just DHCP you don't want to run on wlan0 then you can use --no-dhcp-interface=wlan0. If you don't want dnsmasq to listen at all on wlan0 then you can use --except-interface=wlan0. If you only want dnsmasq to listen on eth0 then you can use --interface=eth0.


3

This is also possible from the dnsmasq configuration file, and is documented in Simon Kelley's example file at http://www.thekelleys.org.uk/dnsmasq/docs/dnsmasq.conf.example: # If you want dnsmasq to listen for DHCP and DNS requests only on # specified interfaces (and the loopback) give the name of the # interface (eg eth0) here. # Repeat the line for more ...


3

The problem you're going to run into is that Active Directory uses DNS to tell client machines where to find various resources, so turning off DNS on the Windows server will eventually stop things that require Active Directory from working. It sounds like it worked for a number of hours because clients had it cached, but then the cache expired. My ...


3

Use dhcp-ignore: dhcp-range=192.168.0.50,192.168.0.150,12h dhcp-host=08:00:27:CB:23:44,net:allow dhcp-host=08:00:27:CB:23:45,net:allow dhcp-host=08:00:27:CB:23:46,net:allow dhcp-ignore=#allow



Only top voted, non community-wiki answers of a minimum length are eligible