小智 15
对于那些喜欢我的人来说,为什么端口 53 仍然对所有接口开放,无论您使用哪个选项来限制它,都感到困惑。还有一个选项需要打开。
-z, --bind-interfaces
On systems which support it, dnsmasq binds the wildcard address, even when it is listening on only some interfaces. It then discards requests that it shouldn't reply to. This has the advantage of working even when interfaces come and go and change address. This option forces dnsmasq to really bind only the interfaces it is listening on. About the only time when this is useful is when running another nameserver (or another instance of dnsmasq) on the same machine. Setting this option also enables multiple instances of dnsmasq which provide DHCP service to run in the same machine.
Ste*_*ski 12
这也可以从 dnsmasq 配置文件中实现,并记录在http://www.thekelleys.org.uk/dnsmasq/docs/dnsmasq.conf.example 的Simon Kelley 示例文件中:
# If you want dnsmasq to listen for DHCP and DNS requests only on
# specified interfaces (and the loopback) give the name of the
# interface (eg eth0) here.
# Repeat the line for more than one interface.
#interface=
# Or you can specify which interface _not_ to listen on
#except-interface=
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
34115 次 |
最近记录: |