![Fedora 服务器作为接入点](https://linux22.com/image/9514/Fedora%20%E6%9C%8D%E5%8A%A1%E5%99%A8%E4%BD%9C%E4%B8%BA%E6%8E%A5%E5%85%A5%E7%82%B9.png)
我关注本指南(对于 Rasbian)使用 Fedora 服务器 26 作为 Raspberry Pi 3 上的访问点。我在配置中做了一些更改,使其可以在 Fedora 上运行。
我的配置如下:
主机配置文件
ctrl_interface=/var/run/hostapd
ctrl_interface_group=wheel
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
driver=nl80211
interface=wlan0
hw_mode=g
channel=6
ssid=Fedora
ieee80211n=1
wmm_enabled=1
wpa_passphrase=MyP@ssw0rd
ht_capab=[HT40][SHORT-GI-20][DSSS_CCK-40]
wpa=2
wpa_key_mgmt=WPA-PSK
rsn_pairwise=CCMP
/etc/sysconfig/网络脚本/ifcfg-wlan0
HWADDR=d8:28:eb:5c:45:7a
DEVICE="wlan0"
BOOTPROTO="static"
IPV6INIT="yes"
IPV6_AUTOCONF="yes"
NM_CONTROLLED="no"
ONBOOT="yes"
TYPE="Wireless"
IPADDR=172.24.1.1
NETMASK=255.255.255.0
/etc/dnsmasq.conf
interface=wlan0
listen-address=172.24.1.1
bind-interfaces
server=8.8.8.8
domain-needed
bogus-priv
dhcp-range=172.24.1.50,172.24.1.150,12h
网络地址转换
sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
sudo iptables -A FORWARD -i eth0 -o wlan0 -m state --state RELATED,ESTABLISHED -j ACCEPT
sudo iptables -A FORWARD -i wlan0 -o eth0 -j ACCEPT
接入点对客户端可见并且可以连接到它。奇怪的是,当客户端尝试连接到网站时,与接入点的连接会立即断开。我在日志文件中看不到任何内容,除了:
Configuration file: /etc/hostapd/hostapd.conf
Failed to create interface mon.wlan0: -95 (Operation not supported)
wlan0: Could not connect to kernel driver
如何使这项工作有效?