CentOS6 installation DNSMASQ

Source: Internet
Author: User

Create user

Useradd-r-G users dnsmasq


Installing DNSMASQ

Yum install-y gcc

wget http://www.thekelleys.org.uk/dnsmasq/dnsmasq-2.76.tar.gz

Tar zxvf dnsmasq-2.76.tar.gz

CD dnsmasq-2.76

Make && make install

CP dnsmasq.conf.example/etc/dnsmasq.conf


Modifying a configuration file

Vi/etc/dnsmasq.conf

USER=DNSMASQ #启动账号

Group=users #启动组号

Interface=eth0 #绑定网络接口

listen-address=192.168.238.135 #绑定IP

Bind-interfaces

Resolv-file=/etc/resolv.conf #域名解析文件

Addn-hosts=/etc/hosts #域名解析文件


Edit a domain name resolution file

echo "192.168.238.135 www.examp;e.com" >>/etc/hosts


Start

/usr/local/sbin/dnsmasq


Check if the DNSMASQ is successful, and if Port 53 has been successfully started, the DNSMASQ is working correctly.

[Email protected] ~]# NETSTAT-TNL | grep 53

TCP 0 0 127.0.0.1:53 0.0.0.0:* LISTEN

TCP 0 0 192.168.238.135:53 0.0.0.0:* LISTEN

TCP 0 0:: 1:53:::* LISTEN

TCP 0 0 fe80::20c:29ff:fe4f:fae7:53:::* LISTEN


This article is from "Love, Lynn" blog, please be sure to keep this source http://love11forever.blog.51cto.com/11313259/1783784

CentOS6 installation DNSMASQ

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.