Dnsmasq
在 dnsmasq 中禁用 dhcp 服務
我想只使用 dnsmasq 將所有 dns 請求轉發到 google 的 dns 伺服器並禁用 dhcp ……
我怎樣才能達到這個結果?
dnsmasq 預設禁用 dhcp 伺服器。要啟用它,您必須取消註釋 dhcp 相關行
/etc/dnsmasq.conf
要將所有請求轉發到 208.67.222.222,只需在以下位置添加(不觸及 dnsmasq 配置)
/etc/resolv.conf
:nameserver 127.0.0.1 # In order to configure dnsmasq to act as cache for the host on which it # is running, put [as the first line] "nameserver 127.0.0.1" in /etc/resolv.conf to force # local processes to send queries to dnsmasq. [...] # dnsmasq is smart enough to ignore this line and forward all queries appropriately, # while all other applications will send all their queries to dnsmasq. nameserver 208.67.222.222
就是這樣 :)