0

我在软件层使用由 dnsmasq 提供支持的 Raspberry Pi3 设置 Wi-Fi 接入点 (AP)。Wi-Fi AP 出现,设备可以毫无问题地加入网络。然而,DNS 查找失败,我已经确定原因是 dnsmasq 无法在 wlan0 接口上抢占 bind9/named,尽管必要的配置已经到位。

Raspian 的版本是:Release 10 (Buster)

以下是相关的配置文件。

dnsmasq.conf

# The Wi-Fi interface configured for static IPv4 addresses
interface=wlan0

# Explicitly specify the address to listen on
listen-address=192.168.1.2

# Bind to the interface to make sure we aren't sending things elsewhere
bind-interfaces

# Forward DNS requests to the Google DNS
server=8.8.8.8

# Don't forward short names
domain-needed

# Never forward addresses in non-routed address spaces
bogus-priv

# Assign IP addresses between 192.168.1.50 and 192.168.1.150 with a 12 hour lease time
dhcp-range=192.168.1.50,192.168.1.150,12h

dhcpcd.conf

hostname

duid

option rapid_commit

# A list of options to request from the DHCP server.
option domain_name_servers, domain_name, domain_search, host_name
option classless_static_routes
# Most distributions have NTP support.
option ntp_servers

# A ServerID is required by RFC2131.
require dhcp_server_identifier

# Generate Stable Private IPv6 Addresses instead of hardware based ones
slaac hwaddr

# A hook script is provided to lookup the hostname if not set by the DHCP
# server, but it should not be run by default.
nohook lookup-hostname
nohook wpa_supplicant

denyinterfaces nat*

noipv6rs

interface wpan0
nodhcp
nodhcp6

interface eth0
iaid 1
ipv6rs
ia_na 2
ia_pd 3/::/63 wpan0/1

interface wlan0
iaid 4
ipv6rs
ia_na 5
ia_pd 6/::/63 wpan0/1

denyinterfaces wlan0

有人可以帮忙吗 - 特别是为什么bind-interfacesdnsmasq 中的配置没有按预期产生任何效果?Bind9 配置为在 dnsmasq 之后启动,并且在所有接口上具有默认绑定行为......但我的期望是它应该排除任何已被其他服务专门绑定的接口。

这是我遵循的步骤序列的链接 - https://openthread.io/guides/border-router/access-point

4

0 回答 0