目录

Dns Settings on Archlinux


Arch Linux DNS设置

  1. 安装dnsmasq
1
sudo pacman -S dnsmasq
  1. 配置/etc/resolv.conf中的域名代理服务器
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# Tencent
nameserver 119.29.29.29
nameserver 182.254.118.118

# Ali
nameserver 223.5.5.5
nameserver 223.6.6.6

# OpenDNS IPv4 nameservers
nameserver 208.67.222.222
nameserver 208.67.220.220

# OpenDNS IPv6 nameservers
nameserver 2620:0:ccc::2
nameserver 2620:0:ccd::2

# Google IPv4 nameservers
nameserver 8.8.8.8
nameserver 8.8.4.4

# Google IPv6 nameservers
nameserver 2001:4860:4860::8888
nameserver 2001:4860:4860::8844

# Comodo nameservers
nameserver 8.26.56.26
nameserver 8.20.247.20

# Generated by NetworkManager
nameserver 192.168.1.1
  1. 防止/etc/resolv.conf被修改
1
sudo chattr +i /etc/resolv.conf
  1. 减少主机名查找时间
1
sudo echo "options timeout:1" > /etc/resolv.conf.tail
  1. 启动dnsmasq
1
sudo systemctl enable dnsmasq.service --now