Skip to content

Instantly share code, notes, and snippets.

@pcolladosoto
Created July 4, 2022 08:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pcolladosoto/10c79cf0e3a2fd541f9628a857db81e8 to your computer and use it in GitHub Desktop.
Save pcolladosoto/10c79cf0e3a2fd541f9628a857db81e8 to your computer and use it in GitHub Desktop.
Configuration for a local Dnsmasq DHCP server
# Installing dnsmasq:
# On macOS we can just do: `brew install dnsmasq`
# I guess it's something like `apt | dnf | yum install dnsmasq` on Linux-based distros...
# Running the server:
# sudo dnsmasq --conf-file=/path/to/this/file.conf --no-daemon --log-queries
# Check dnsmasq(8) for more info!
# Only listen on our Ethernet interface
interface=en5
# Disable DNS functionality
port=0
# Define the assignable range of addresses, the subnet mask and the lease time
dhcp-range=10.1.10.5,10.1.10.254,255.255.255.0,6h
# Avoid publishing a default route: we'll have a plain and simple LAN.
# Note option 3 is reference on section 3.5 of RFC 2132.
dhcp-option=3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment