Saturday, September 6, 2014

Easy DHCP/DNS server with dnsmasq


1- install dnsmasq
root@localhost # apt-get install dnsmasq

2- edit dnsmasq configuration at /etc/dnsmasq.conf with the configure meet your requirement

# Start,Stop,Mask,Lease
dhcp-range=10.0.0.32,10.0.0.248,255.255.255.0,2h

# if you specific the out interface
#dhcp-range=wlan0,192.168.100.100,192.168.100.199,255.255.255.0,4h

# Gateway
dhcp-option=3,10.0.0.1
# DNS
dhcp-option=6,10.0.0.1
# Domain Name
dhcp-option=15,dhcp.edoceo.com
# IP Forward (no)
dhcp-option=19,0
# Source Routing
dhcp-option=20,0
# TTL
# dhcp-option=23,64
# Broadcast Address
# dhcp-option=28,10.0.0.255
# 0.0.0.0 Means to reference self for this option

# NTP Server
dhcp-option=42,0.0.0.0

# 44-47 NetBIOS
dhcp-option=44,0.0.0.0
dhcp-option=45,0.0.0.0
dhcp-option=46,8
dhcp-option=47


3- start dnsmasq

root@localhost # dnsmasq

4- to stop dnsmasq

root@localhost # killall dnsmasq



---------------------------------------------------

No comments:

Post a Comment