在dnsmasq中禁用DHCP服务


12

我只想使用dnsmasq将所有dns请求转发到Google的dns服务器并禁用dhcp ...

我怎样才能达到这个结果?

Answers:


13

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

而已 :)


@CraigHicks请更好地解释。这里的问题是:“在dnsmasq中禁用dhcp服务”
皮托

1
我的错-对不起。
Craig Hicks

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.