From 1a280dd251fa5a9121023562ed5b43674b4848b0 Mon Sep 17 00:00:00 2001 From: "lion.chan" Date: Thu, 11 Feb 2021 17:30:30 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=20Dnsmasq=20DNS=20=E5=92=8C?= =?UTF-8?q?=20DHCP=20=E6=9C=8D=E5=8A=A1.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: lion.chan --- .../Dnsmasq/Dnsmasq_DNS_和_DHCP_服务.md | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 Software/Applications/Dnsmasq/Dnsmasq_DNS_和_DHCP_服务.md diff --git a/Software/Applications/Dnsmasq/Dnsmasq_DNS_和_DHCP_服务.md b/Software/Applications/Dnsmasq/Dnsmasq_DNS_和_DHCP_服务.md new file mode 100644 index 0000000..f7d7ace --- /dev/null +++ b/Software/Applications/Dnsmasq/Dnsmasq_DNS_和_DHCP_服务.md @@ -0,0 +1,29 @@ +# Dnsmasq DNS 和 DHCP 服务 + +dnsmasq provides a DNS server, a DHCP server with support for DHCPv6 and PXE, and a TFTP server. It is designed to be lightweight and have a small footprint, suitable for resource constrained routers and firewalls. dnsmasq can also be configured to cache DNS queries for improved DNS lookup speeds to previously visited sites. + +## 1.安装 + +```bash +# Manjaro +pacman -S dnsmasq +``` + +## 2.配置 + +```bash +# /etc/dnsmasq.conf +interface= +expand-hosts +domain=foo.bar + +dhcp-range=,,, +``` + +## 3.启动和关闭 + +```bash +systemctl enable dnsmasq.service +systemctl start dnsmasq.service +systemctl stop dnsmasq.service +```