stacker.news/docker/dnsmasq/dnsmasq.conf
soxa d9213c39e7
local DNS server via dnsmasq (#2168)
* Use dnsmasq to create virtual hosts and mock DNS management for custom domains

- dnsmasq docker image
- dnsmasq network bridge
- point *.sndev to 127.0.0.1
- set-dnsmasq script
- -- add/remove/list dns records in dnsmasq.conf
- add 'domains' to sndev
- 'sndev domains dns' referencing set-dnsmasq script

* restart dnsmasq if add/remove succeeded

* add domain to /etc/hosts; cleanup

* tell if the command needs sudo permission

* add directions for dnsmasq DNS server usage

* add --no-hosts flag to skip asking to edit /etc/hosts

* add domains command to README.md

* add dnsmasq instructions to README.md

* correct exit on usage function; final cleanup and comments

* portable bash; use default network for dnsmasq; set a version for dnsmasq image

* POSIX compliance, add env var to .env.development, adjust README

* ignore dnsmasq.conf edits, use template instead

* use extra configs for dnsmasq, more POSIX compliance

* fix --no-hosts flag recognition, light cleanup

* shift 4 only if the command has enough args; more error messages; adjust TXT type only on list

* different sed syntax for macOS
2025-05-21 13:06:19 -05:00

13 lines
307 B
Plaintext

server=1.1.1.1
no-resolv
bind-interfaces
listen-address=0.0.0.0
log-queries
log-facility=/var/log/dnsmasq.log
# example of cname and txt for custom domains verification
# this is to be edited by sndev cli or manually
cname=www.pizza.sndev,sn.sndev
txt-record=_snverify.www.pizza.sndev,"EXAMPLE_TXT_VALUE"