Skip to content

Commit 91d5fe8

Browse files
committed
sysadmin/qemu: add examples of Dnsmasq command lines
1 parent 10535cb commit 91d5fe8

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

sysadmin/qemu.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -431,6 +431,20 @@ with ``virsh net-edit default``. It looks like:
431431
432432
The generated dnsmasq configuration is in ``/var/lib/libvirt/dnsmasq/default.conf``.
433433

434+
For information, dnsmasq can also be directly used on the command line:
435+
436+
.. code-block:: sh
437+
438+
dnsmasq --dhcp-range=192.168.122.2,192.168.122.254,12h --interface=virbr0 \
439+
--bind-interfaces --port 1053 --keep-in-foreground --log-dhcp `
440+
--server=8.8.8.8 --dhcp-option=6,8.8.8.8
441+
442+
# To relay DNS servers on a fake systemd-resolved service, without DHCP
443+
# Other options: --no-daemon --clear-on-reload --log-queries
444+
dnsmasq --listen-address=127.0.0.53 --interface=lo --no-dhcp-interface \
445+
--no-resolv --server=1.1.1.1 --server=8.8.8.8 \
446+
--host-record=my-own-domain,192.0.2.42
447+
434448
Web links
435449
---------
436450

0 commit comments

Comments
 (0)