增加 Dnsmasq DNS 和 DHCP 服务.
Signed-off-by: lion.chan <cy187lion@sina.com>
This commit is contained in:
parent
05dd54933e
commit
1a280dd251
|
@ -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=<network interface>
|
||||
expand-hosts
|
||||
domain=foo.bar
|
||||
|
||||
dhcp-range=<start ip>,<end ip>,<mask>,<keep time>
|
||||
```
|
||||
|
||||
## 3.启动和关闭
|
||||
|
||||
```bash
|
||||
systemctl enable dnsmasq.service
|
||||
systemctl start dnsmasq.service
|
||||
systemctl stop dnsmasq.service
|
||||
```
|
Loading…
Reference in New Issue