Dnsmasq 安裝與設定

Install & Config

Install dnsmasq (assume you r root)


apt-get update
apt-get install dnsmasq

StartUP service

/etc/init.d/dnsmasq start

Check service listening on port 53

netstat -antulp

Config

Tell dnsmasq resolve public netowork from which main DNS nameserver


vi /etc/dnsmasq.resolv.conf

Setup dnsmasq


vi /etc/dnsmasq.conf

resolv-file=/etc/dnsmasq.resolv.conf #specify a resolve file for dnsmasq
interface=eth0 #specify which NIC to use dnsmasq
dhcp-range=192.168.1.101,192.168.1.200,8h #specify IP range and lease period


DHCP additional options

dhcp-option=1,255.255.255.0 #specify Subnet mask
dhcp-option=3,192.168.1.254 #specify Gateway
dhcp-option=6,192.168.1.254 #specify DNS
dhcp-option=44,192.168.1.254 #specify WINS


APPLICATION

While we have a internal network , and we want to resolve all computes those in a internal network.
we don't need to ask master DNS admin to set forward for us.
Just to rewrite our /etc/resolv.conf
nameserver dnsmasq-ip-address
Run up when boot
rc-update add dnsmasq default
Manpage http://hugokuo-hugo.blogspot.com/2011/03/dnsmasq-manpage.html

Comments

Popular posts from this blog