Skip to content

Instantly share code, notes, and snippets.

@Breccan
Created April 4, 2011 02:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Breccan/901075 to your computer and use it in GitHub Desktop.
Save Breccan/901075 to your computer and use it in GitHub Desktop.
# Never forward addresses in the non-routed address spaces.
bogus-priv
# Filter useless windows-originated DNS requests.
filterwin2k
# Drop privileges from root to this user and group.
user=dnsmasq
group=nogroup
# By default, dnsmasq binds the wildcard address, even when only listening on
# specific interfaces. Turn this on to only bind the listen interfaces'
# addresses. Only use this if things would conflict otherwise (e.g. two
# instances of dnsmasq running on the same machine).
bind-interfaces
# Append the domain to domainless names from /etc/hosts.
expand-hosts
# The number of DNS entries that dnsmasq will cache.
cache-size=512
# Return an MX record pointing to this machine for all local machines.
#selfmx
# address=/domain/IP means always return IP for domain (for domain, '#' means everything).
address=/#/10.0.1.201
# server=/domain/IP means forward queries for domain to IP (for domain, '#' means everything).
server=/#/10.0.1.201
server=/rubygems.org/10.0.1.201
server=/gravatar.com/10.0.1.27
server=/gitta.com/10.0.1.20
#local=/<%= var :dns_domain %>/
# Serve DNS but not DHCP on these interfaces.
#no-dhcp-interface=en1
# Network / DHCP range confi
# dynamic addresses allocated from here
# fixed clients
#dhcp-range=fixed,192.168.4.0,static,255.255.0.0,24h
# Load fixed IP definitions (should be on the 192.168.4.0/24 network)
read-ethers
# Send options to hosts which ask for a DHCP lease.
# See RFC 2132 for details of available options.
# Note that all the common settings, such as netmask and
# broadcast address, DNS server and default route, are given
# sane defaults by dnsmasq. You very likely will not need any
# any dhcp-options. If you use Windows clients and Samba, there
# are some options which are recommended, they are detailed at the
# end of this section.
# For reference, the common options are:
# subnet mask - 1
# default router - 3
# DNS server - 6
# broadcast address - 28
# subnet
dhcp-option=1,255.255.0.0
# router
dhcp-option=3,10.0.1.201
# DNS server
dhcp-option=6,10.0.1.201
# broadcast
dhcp-option=28,10.0.255.255
# NTP server
#dhcp-option=42,0.0.0.0
# Set the NIS domain name
dhcp-option=40,railscamp.local
# Set the default time-to-live to 50
#dhcp-option=23,50
# Set the "all subnets are local" flag
dhcp-option=27,1
# Send the etherboot magic flag and then etherboot options (a string).
#dhcp-option=128,e4:45:74:68:00:00
#dhcp-option=129,NIC=eepro100
# Specify an option which will only be sent to the "red" network
# (see dhcp-range for the declaration of the "red" network)
#dhcp-option=red,42,192.168.1.1
# The following DHCP options set up dnsmasq in the same way as is specified
# for the ISC dhcpcd in
# http://www.samba.org/samba/ftp/docs/textdocs/DHCP-Server-Configuration.txt
# adapted for a typical dnsmasq installation where the host running
# dnsmasq is also the host running samba.
# you may want to uncomment them if you use Windows clients and Samba.
dhcp-option=19,0 # option ip-forwarding off
dhcp-option=44,0.0.0.0 # set netbios-over-TCP/IP nameserver(s) aka WINS server(s)
dhcp-option=45,0.0.0.0 # netbios datagram distribution server
dhcp-option=46,8 # netbios node type
dhcp-option=47 # empty netbios scope.
# Send RFC-3397 DNS domain search DHCP option. WARNING: Your DHCP client
# probably doesn't support this......
#dhcp-option=119,eng.apple.com,marketing.apple.com
# Send RFC-3442 classless static routes (note the netmask encoding)
#dhcp-option=121,192.168.1.0/24,1.2.3.4,10.0.0.0/8,5.6.7.8
# Send encapsulated vendor-class specific options. The vendor-class
# is sent as DHCP option 60, and all the options marked with the
# vendor class are send encapsulated in DHCP option 43. The meaning of
# the options is defined by the vendor-class. This example sets the
# mtftp address to 0.0.0.0 for PXEClients
#dhcp-option=vendor:PXEClient,1,0.0.0.0
# Set the boot filename and tftpd server name and address
# for BOOTP. You will only need this is you want to
# boot machines over the network.
#dhcp-boot=/var/ftpd/pxelinux.0,boothost,192.168.0.3
# Set the limit on DHCP leases, the default is 150
dhcp-lease-max=255
# Set the DHCP server to authoritative mode. In this mode it will barge in
# and take over the lease for any client which broadcasts on the network,
# whether it has a record of the lease or not. This avoids long timeouts
# when a machine wakes up on a new network. DO NOT enable this if there's
# the slighest chance that you might end up accidentally configuring a DHCP
# server for your campus/company accidentally. The ISC server uses the same
# the same option, and this URL provides more information:
# http://www.isc.org/index.pl?/sw/dhcp/authoritative.php
dhcp-authoritative
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment