Tag Info

Hot answers tagged

73

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 ...


22

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 ...


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. ...


11

By default, NetworkManager uses Dnsmasq as a DNS resolver, if it's installed. Which is the default on Debian based systems, 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 present ...


7

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 ...


6

Search ' Network Connection' Open it                      Then select either WiFi or Ethernet, or whatever you are using, and click on edit. You'll get this:                Select ipv4 ...


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 ...


6

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


5

I found out that you can change the nameservers that dnsmasq uses by adding the following lines to /etc/dnsmasq.conf: server=8.8.8.8 server=8.8.4.4 I didn't have a /etc/dnsmasq.conf file though, since it's installed by the dnsmasq package, but Ubuntu only comes with dnsmasq-base. I ran sudo apt-get install dnsmasq, then edited /etc/dnsmasq.conf, then sudo ...


5

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.


4

For static IP situations, the Ubuntu Server Guide says to change the file /etc/network/interfaces, which may look like this: iface eth0 inet static address 192.168.3.3 netmask 255.255.255.0 gateway 192.168.3.1 dns-search example.com dns-nameservers 192.168.3.45 192.168.8.10 You change the IPs 192.168.3.45 192.168.8.10 for the ones you want, like 8.8.8.8 ...


4

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 # ...


4

I do not have access to dnsmasq but according to this thread titled: dnsmasq is it caching? you can send the signal USR1 to the dnsmasq process, causing it to dump statistics to the system log. $ sudo pkill -USR1 dnsmasq Then consult the system logs: $ sudo tail /var/log/syslog Jan 21 13:37:57 dnsmasq[29469]: time 1232566677 Jan 21 13:37:57 ...


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

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


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 ...


3

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


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 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

dnsmasq should read /etc/resolv.conf and use the DNS servers there. In case that doesn't work for some reason, you can manually specify what DNS servers to use. To do that, in /etc/dnsmasq.conf, add server= followed by the IP address of the DNS server. For example, to use 8.8.8.8 and 8.8.4.4 as your DNS servers, use: server=8.8.8.8 server=8.8.4.4


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

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 ...


2

Option 252 should be the URL for a .pac file, something like http://example.com/wpad.dat. This might be causing your Windows 7 system from accepting the DHCP response. If you don't have a file on a web server, try omitting that option. You also appear to be missing some standard options. Try adding these (editted appropriately): ...


2

Neither DNS resolver lists nor NS record sets are intrinsically ordered, so there is no "primary". Clients are free to query whichever one they want in whichever order they want. For resolvers specifically, clients might default to using the servers in the same order as they were given to the client, but, as you've discovered, they also might not.


2

You need to configure dnsmasq. Look in /etc/dnsmasq.conf. I don't know much about your situation, but I'm certain that you'll need to set these options: resolv-file=/etc/dnsmasq.resolv listen-address=127.0.0.1 listen-address=10.0.0.3 # Or whatever the machine's IP address is. The file /etc/resolv.conf is what every process other than dnsmasq looks into ...



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