This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
networking:linux:dnsmasq [2012/02/16 16:06] gcooper created |
networking:linux:dnsmasq [2015/12/17 20:08] (current) gcooper |
||
---|---|---|---|
Line 19: | Line 19: | ||
Disable the firewall on the server or open these ports: | Disable the firewall on the server or open these ports: | ||
- | * open udp port 53 (DNS) | + | * Open UDP port 53 (DNS) |
- | * also open tcp port 53 if doing zone transfers | + | * Also open TCP port 53 if doing zone transfers |
- | * open udp port 67 (DHCP) | + | * Open UDP port 67 (DHCP) |
- | * open udp port 69 (TFTP) | + | * Open UDP port 69 (TFTP) |
- | * open udp port 4011 (PXE) | + | * Open UDP port 4011 (PXE) |
===== Set the Server Hostname ===== | ===== Set the Server Hostname ===== | ||
+ | |||
+ | Adjust as necessary. | ||
< | < | ||
Line 33: | Line 35: | ||
:: | :: | ||
- | 192.168.2.2 sol.familycooper.org sol | + | 192.168.1.2 hostname.domain.tld hostname |
</ | </ | ||
Line 43: | Line 45: | ||
vim / | vim / | ||
- | search | + | search |
nameserver 127.0.0.1 | nameserver 127.0.0.1 | ||
- | nameserver | + | nameserver |
- | nameserver | + | nameserver |
</ | </ | ||
===== Configure dnsmasq ===== | ===== Configure dnsmasq ===== | ||
+ | |||
+ | This is a sample config file and absoultely must be adapted for your network. | ||
< | < | ||
Line 56: | Line 60: | ||
vim / | vim / | ||
- | #add records to /etc/hosts file and restart dnsmasq for local name resolution | + | # Add records to /etc/hosts file and restart dnsmasq for local name resolution. |
- | + | # | |
- | #hosts that use DHCP can also be resolved locally | + | # Hosts that use DHCP can also be resolved locally. |
- | + | # | |
- | #add ' | + | # Add ' |
- | #in order to resolve names on this (dnsmasq server) host | + | # in order to resolve names on this (dnsmasq server) host. |
# | # | ||
Line 69: | Line 73: | ||
strict-order | strict-order | ||
- | #Upstream Nameservers (if not gotten from DHCP) | + | # Upstream Nameservers (if not gotten from DHCP) |
- | # Cox | + | # |
+ | # Cox Name Servers | ||
# | # | ||
# | # | ||
- | + | # | |
+ | # Google | ||
server=8.8.8.8 | server=8.8.8.8 | ||
server=8.8.4.4 | server=8.8.4.4 | ||
expand-hosts | expand-hosts | ||
- | domain=familycooper.org | + | domain=domain.tld |
- | dhcp-range=192.168.2.65, | + | dhcp-range=192.168.1.65, |
## DHCP Options | ## DHCP Options | ||
Line 84: | Line 90: | ||
# 0.0.0.0 is ' | # 0.0.0.0 is ' | ||
# | # | ||
- | dhcp-option=1, | + | dhcp-option=1, |
- | dhcp-option=2, | + | dhcp-option=2, |
- | dhcp-option=3, | + | dhcp-option=3, |
- | dhcp-option=6, | + | dhcp-option=6, |
- | dhcp-option=7, | + | dhcp-option=7, |
- | dhcp-option=17, | + | dhcp-option=17, |
- | dhcp-option=42, | + | dhcp-option=42, |
- | dhcp-option=44, | + | dhcp-option=44, |
- | dhcp-option=66," | + | dhcp-option=66," |
- | dhcp-option=150," | + | dhcp-option=150," |
- | + | ||
- | # Specify boot file and optionally the TFTP server | + | |
- | # | + | |
- | dhcp-boot=/ | + | |
# SRV Records for PBX | # SRV Records for PBX | ||
# | # | ||
- | srv-host=_sip._tcp.familycooper.org,pbx.familycooper.org | + | srv-host=_sip._tcp.domain.tld,hostname.domain.tld |
- | srv-host=_sip._udp.familycooper.org,pbx.familycooper.org | + | srv-host=_sip._udp.domain.tld,hostname.domain.tld |
## IP Lease Reservations | ## IP Lease Reservations | ||
# | # | ||
- | dhcp-host=08: | + | dhcp-host=08: |
- | dhcp-host=00: | + | dhcp-host=00: |
- | dhcp-host=00: | + | dhcp-host=00: |
- | dhcp-host=00: | + | dhcp-host=00: |
+ | |||
+ | # Specify boot file and optionally the TFTP server | ||
+ | # | ||
+ | # | ||
## TFTP Server | ## TFTP Server | ||
# | # | ||
- | # | + | # |
- | # | + | # |
</ | </ | ||