Tag Info

Hot answers tagged

28

I believe if you want to override the DNS nameserver you merely add a line similar to this in your base file under resolv.conf.d. Example $ sudo vim /etc/resolvconf/resolv.conf.d/base Then put your nameserver list in like so: nameserver 8.8.8.8 nameserver 8.8.4.4 Finally update resolvconf: $ sudo resolvconf -u If you take a look at the man page for ...


12

According to Flush dnsmasq dns cache: dnsmasq is a lightweight DNS, TFTP and DHCP server. It is intended to provide coupled DNS and DHCP service to a LAN. Dnsmasq accepts DNS queries and either answers them from a small, local, cache or forwards them to a real, recursive, DNS server. This software is also installed many cheap routers to cache dns queries. ...


8

By default, on Ubuntu 12.04, NetworkManager uses Dnsmasq as a DNS resolver. Only the dnsmasq-base package is installed by default, so Dnsmasq runs in a default configuration where it only resolves names based on the upstream servers specified by command line options (plus the contents of /etc/hosts). You have no /etc/dnsmasq.conf because that file is only ...


6

dnsmasq is simpler and because of that has less features. But if you don't need anything fancy and since you were already able to set it up, you probably don't need them. Dnsmasq is designed for small, local networks. You can read on its site that by small networks, they mean up to 1000 computers so it's not that bad. So my answer is: there is absolutely ...


5

Please do not hijack the DNS. This interferes with the low-level architecture of the Internet. There are nearly no ethical applications of DNS hijacking that would not be better served by a firewall appliance or program. If you want to prevent the resolution of a zone to an address, you can easily edit the client hosts file. While dnsmasq is capable of ...


5

Since there are no init scripts on DD-WRT, I guess this would be the easiest way to restart dnsmasq: Kill dnsmasq: root@ddwrt6:~# killall dnsmasq Start dnsmasq: root@ddwrt6:~# dnsmasq --conf-file=/tmp/dnsmasq.conf


4

NetworkManager has the functionality to manage a local dnsmasq server built in. It is not necessary to use resolvconf/openresolv to do this. To enable this: Disable the resolvconf/openresolv dnsmasq configuration if it was previously enabled, and ensure there are no instances of dnsmasq running. Ensure dnsmasq is installed Add dns=dnsmasq to ...


4

I am also interested in this question and I tried the solution proposed @sim. To test it, I put nameserver 8.8.8.8 in /etc/resolvconf/resolv.conf.d/base and nameserver 8.8.4.4 in /etc/resolvconf/resolv.conf.d/head Then I restarted the network with sudo service network-manager restart The result is that /etc/resolv.conf looks like # Dynamic ...


3

You can check if /etc/NetworkManager/NetworkManager.conf just went missing using: dpkg -S /etc/NetworkManager/NetworkManager.conf My 12.04 has the following as content of /etc/NetworkManager/NetworkManager.conf: [main] plugins=ifupdown,keyfile dns=dnsmasq [ifupdown] managed=false You might be able just to add that content, and edit that if the file ...


3

You want to un-comment "strict-order" in /etc/dnsmasq.con, as near as I can tell. # By default, dnsmasq will send queries to any of the upstream # servers it knows about and tries to favour servers to are known # to be up. Uncommenting this forces dnsmasq to try each query # with each server strictly in the order they appear in # ...


3

Create a file, say /etc/hosts.chat.freenode.net, that has the same format as /etc/hosts file and list all IP addresses with name in this file: 130.239.18.172 chat.freenode.net 140.211.167.105 chat.freenode.net Then add to the dnsmasq.conf the following line: addn-hosts=/etc/hosts.chat.freenode.net Or put these two lines into /etc/hosts if dnsmasq is ...


3

Yes, add bind-interfaces except-interface=virbr0 to some file in /etc/dnsmasq.d. (that's what Ubuntu's libvirt-bin package (at least) does automatically now)


3

Since Apple has done away with nsswitch.conf in Lion, you can view the resolver order with scutil --dns. My guess is you will see "DNS" listed before "local". It's a bit of a hack, but you can install DNSMasq on your OS X host and have your system query it for DNS resolution. DNSMasq can read /etc/hosts first and serve up the entries it finds there before ...


3

For 'single small service' situations, I like to use the netinst disk of Debian. Of all the well-supported, frequently updated, good repos distros, it results in the smallest footprint. RHEL/CentOS/SL's minimal installs are still huge in comparison. Once you install the very base, use the repos to update the base, configure hardware, and install the one ...


3

You don't need to list any nameserver other than 127.0.0.1 in /etc/resolv.conf. What you need to inform dnsmasq of the upstream DNS server, and it will relay and cache requests to the ISP's server. If your ISP's DNS providers don't change (they rarely do), you can declare them in the Dnsmasq configuration file (/etc/dnsmasq.conf), with lines like ...


2

killall -1 dnsmasq Send HUP signal to tell it flush the cache an reread its configuration, thus starting over with a clean slate.


2

With iptables firewall this works (Openwrt also uses iptables): iptables -t nat -A PREROUTING -s 192.168.1.0/24 -p udp --dport 53 -j DNAT --to 192.168.1.1 iptables -t nat -A PREROUTING -s 192.168.1.0/24 -p tcp --dport 53 -j DNAT --to 192.168.1.1 On your router use Opendns servers. 192.168.1.1 is the Openwrt router ip. 192.168.1.0/24 is the LAN network ...


2

If you can use iptables, you can route all requests to Siri via the SiriProxy. I use the following command to route certain sites via a Proxy server and the rest is routed directly to my ISP: iptables -t nat -A OUTPUT -p tcp --dport $destination_port -d $destination_ip_address -j DNAT --to-destination $Proxyserver:port


2

After configuring settings , we have to restart dnsmasq service : sudo /etc/init.d/dnsmasq restart Update : If you want to use wild card (*) then you can use dot (.) then dnsmasq to resolve WHATEWER_YOU_PUT_HERE.yourmachine.yourdomain to the same ip. Example : address=/.localhost.dev/127.0.0.1


2

As I understand, in your case, the server have an address for each subnet: 192.168.1.1 and the other could be 192.168.2.1 I guess you want the clients to receive the server address of its corresponding subnet. I had the same problem, found answer in ...


2

You can expand your range by editing the config file: vi /etc/dnsmasq.conf Look for the dhcp-range line: dhcp-range=192.168.0.10,192.168.0.50,12h will issue from 192.168.0.10 to 192.168.0.50 with a lease time of 12 hours. You can see your current leases with: cat /var/lib/dnsmasq/dnsmasq.leases That path might differ, depending on your distro. If ...


1

If the machine gets its DNS via DHCP you could grep domain-name-servers /var/lib/dhcp/<interface>.leases


1

You can block a website with host record: host-record=meta.stackexchange.com,127.0.0.1 or a cname: cname=meta.stackexchange.com,blackhole.com But really both of these are pretty ineffective ways to block a website. I could go to my /etc/hosts file and fix the issue.


1

A quick and dirty workaround that wasn't mentioned yet is setting the immutable flag on the resolv.conf file right after editing it. $ sudo nano /etc/resolv.conf Add this and save: nameserver 8.8.8.8 Then: $ sudo chattr +i /etc/resolv.conf That should do the trick. I do this on my system too.


1

Try adding dns-nameservers XXX.XXX.XXX.X into your /etc/networking/interfaces file.


1

This tutorial sounds like what you want. Titled: To Protect and Surf (dnsmasq and Whitelists). The idea is fairly simple. Isolate machines so that their only DNS server they're aware of is the DNSMasq server. Then add the following lines to DNSMasq's config. file, /etc/dnsmasq.conf: domain-needed bogus-priv log-queries log-facility=/var/log/dnsmasq.log ...


1

On machine B, if /etc/NetworkManager/NetworkManager.conf contains dns=dnsmasq then resolv.conf should contain only one "nameserver" line, namely nameserver 127.0.1.1. 127.0.1.1 is the address where the NetworkManager-controlled local forwarding nameserver listens. NetworkManager gives that nameserver forwarding addresses to use. Try running sudo ...


1

In ubuntu 12.04 dnsmasq is now running by default due to being hard coded into network-manager. Using dnsmasq as local resolver by default on desktop installations That’s the second big change of this release. On a desktop install, your DNS server is going to be "127.0.0.1" which points to a NetworkManager-managed dnsmasq server. SERVER: ...


1

Yes, it is possible to make all the hosts in the local network to use only specific DNS provider. You can do this by configuring a Proxy server like Squid Proxy and making all the hosts in the local network to access the Internet only through this proxy server. So every request whether it is DNS request or HTTP request or any other request, will first go to ...


1

You don't really give quite enough details. If you want security, go with OpenDNS. Ubuntu is a decent choice, as there are a lot of tools and support options, due to it's popularity. Lastly, which OS are you most familiar with? If it's RedHat or a variant, go with one of those. DNS and dnsmasq are going to be largely similar across all of the OSes, but ...



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