Skip to content

Instantly share code, notes, and snippets.

@Rndwiga
Last active August 24, 2022 20:24
Show Gist options
  • Save Rndwiga/98052dddc562295d590112306c3aa2e7 to your computer and use it in GitHub Desktop.
Save Rndwiga/98052dddc562295d590112306c3aa2e7 to your computer and use it in GitHub Desktop.
How to wildcard development server with DNSMasq Ubuntu
1. Install DNSMasq
>> apt install dnsmasq
2. Update the "/etc/dnsmasq.conf" file
----
listen-address=127.0.0.2
bind-interfaces
address=/tyondo.lan/127.0.0.1
address=/cirembo.lan/127.0.0.1
no-resolv
domain-needed
bogus-priv
---
3. Update the "/etc/default/dnsmasq" file
----
IGNORE_RESOLVCONF=yes
---
4. Update "/etc/systemd/resolved.conf" file
--------
[Resolve]
DNS=127.0.0.2
Domains=~tyondo.lan ~cirembo.lan
-------
5. restart dnsmasq
>> systemctl restart dnsmasq
6. restart system-resolved
>> systemctl restart systemd-resolved
4. test wildcard
>> dig xy.tyondo.lan
Sources
https://blog.thesparktree.com/local-development-with-wildcard-dns
https://sixfeetup.com/blog/local-development-with-wildcard-dns-on-linux
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment