Now the Ubuntu desktop release has its own DNSMASQ, how to configure its own DNS configuration?
- DNSMASQ in Ubuntu Desktop Edition
- Duplication --Enable DNSMASQ service
- Simple DNS Configuration
- Reference
DNSMASQ in Ubuntu Desktop Edition
Do not remember from which version, probably after 13.04, the Ubuntu Network Setup tool will bring the DNSMASQ tool, to adapt to the various different network card DNS configuration. You can see similar process information:
nobody 2138 1197 0 09:50 ? 00:00:00 /usr/sbin/dnsmasq --no-resolv --keep-in-foreground --no-hosts --bind-interfaces --pid-file=/run/sendsigs.omit.d/network-manager.dnsmasq.pid --listen-address=127.0.1.1 --conf-file=/var/run/NetworkManager/dnsmasq.conf --cache-size=0 --proxy-dnssec --enable-dbus=org.freedesktop.NetworkManager.dnsmasq --conf-dir=/etc/NetworkManager/dnsmasq.d
The role of this dnsmasq is to put the DNS server in NetworkManager as the superior DNS, in 127.0.1.1 this address virtual a local DNS service. And Ubuntu will change the contents of the/etc/resolv.conf in this machine to:
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTENnameserver 127.0.1.1search router
Duplication --Enable DNSMASQ service
Since this dnsmasq belongs to the Dnsmasq-base package, only the running program, no installation profile and boot-up service, so you can configure the DNSMASQ service to restart a local simple DNS, but also inherit the original configuration.
First you need to install the DNSMASQ package, which is:
sudo apt-get install dnsmasq
This package includes configuration files such as/ETC/DNSMASQ.CONF,/ETC/DNSMASQ.D,/ETC/INIT.D/DNSMASQ, which enable booting from the configuration file.
Simple DNS Configuration
Configuration format: address=/domain/IP address
Domain names can use "Generic domain names", such as the following configuration:
address=/.squirrel.org/127.0.0.1
This configuration resolves all squirrel.org and its subordinate domain names to 127.0.0.1.
Reference
Http://www.cnblogs.com/sink_cup/archive/2012/08/17/router_dnsmasq_android_hosts.html<p class= ' Post-footer ' > Original link Address: http://pangyi.github.io/blog/20150223/ zai-ubuntu14ban-ben-shang-shi-yong-dnsmasqpei-zhi-zi-ding-yi-de-jian-yi-dnsfu-wu/
Written by pangyi?posted at http://pangyi.github.io</p>
Configure a custom simple DNS service with DNSMASQ on the UBUNTU14 version