Dnsmasq: Difference between revisions
(Created page with "dnsmasq provides LAN DNS caching, as well as static IPs for all your local machine names via their MAC addresses. It's perfect! You don't even need local hosts files or to f...") |
|||
(5 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
You don't even need local hosts files or to fiddle with wifi router, just let dnsmasq do it all. FUck yeah. | You don't even need local hosts files or to fiddle with wifi router, just let dnsmasq do it all. FUck yeah. | ||
==== | == Show leases == | ||
mh-watch-leases | |||
# which does this: ssh -t bp watch -n 1 cat /var/lib/misc/dnsmasq.leases | |||
== Release leases == | |||
You have to stop, remove leases from the leases file, and restart dnsmasq: | |||
sudo service dnsmasq stop && sudo emacs /var/lib/misc/dnsmasq.leases && sudo service dnsmasq start | |||
== Configuration == | |||
bitpost:/etc/dnsmasq/dnsmasq.conf | bitpost:/etc/dnsmasq/dnsmasq.conf | ||
== Adding a new host == | |||
Add a new line to the config file with an available IP, and host and MAC of the new box. | Add a new line to the config file with an available IP, and host and MAC of the new box. | ||
== Windows DNS resolution == | |||
Windows apparently puts a suffix on names, unless you end them with a dot, so sometimes in Windows you have to use something like this: | Windows apparently puts a suffix on names, unless you end them with a dot, so sometimes in Windows you have to use something like this: | ||
\\hive.\reservoir |
Latest revision as of 22:44, 6 June 2022
dnsmasq provides LAN DNS caching, as well as static IPs for all your local machine names via their MAC addresses. It's perfect!
You don't even need local hosts files or to fiddle with wifi router, just let dnsmasq do it all. FUck yeah.
Show leases
mh-watch-leases # which does this: ssh -t bp watch -n 1 cat /var/lib/misc/dnsmasq.leases
Release leases
You have to stop, remove leases from the leases file, and restart dnsmasq:
sudo service dnsmasq stop && sudo emacs /var/lib/misc/dnsmasq.leases && sudo service dnsmasq start
Configuration
bitpost:/etc/dnsmasq/dnsmasq.conf
Adding a new host
Add a new line to the config file with an available IP, and host and MAC of the new box.
Windows DNS resolution
Windows apparently puts a suffix on names, unless you end them with a dot, so sometimes in Windows you have to use something like this:
\\hive.\reservoir