Skip to content

Instantly share code, notes, and snippets.

@wention
Created April 19, 2024 06:42
Show Gist options
  • Save wention/f822dd3708ce2d454ad8c1206545d11a to your computer and use it in GitHub Desktop.
Save wention/f822dd3708ce2d454ad8c1206545d11a to your computer and use it in GitHub Desktop.
配置 dnsmasq 仅为指定主机分配 IP 地址 / dnsmasq config offer address for whitelist host
# 指定 dnsmasq 监听的接口
#interface=ens160
listen-address=10.1.1.22
# 禁用 DNS 功能
port=0
dhcp-range=10.1.1.0,static,255.255.255.0,1h
# 主机白名单
dhcp-host=38:f3:ab:e0:43:77,10.1.1.87
# dhcp router
dhcp-option=option:router,10.1.1.250
# dhcp dns server
dhcp-option=option:dns-server,10.1.1.250
# 启用日志
log-dhcp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment