linux -- 搭建wifi热点
[Lab]: Linux gnu 3.2.0-4-amd64 #1 SMP Debian 3.2.57-3+deb7u1 x86_64 GNU/Linux
[Lab]: Linux gnu 3.2.0-4-amd64 #1 SMP Debian 3.2.57-3+deb7u1 x86_64 GNU/Linux
安装 hostapd
不建议使用命令 sudo apt-get install hostapd 安装,部分Linux源中的hostapd版本较老,存在问题。wget http://w1.fi/releases/hostapd-2.2.tar.gz
tar xvf hostapd-2.2.tar.gz
cd ./hostapd-2.2/hostapd
make
编译完成后,查看hostapd信息
nixawk@gnu:~/hostapd-2.2/hostapd$ ./hostapd -h
hostapd v2.2
User space daemon for IEEE 802.11 AP management,
IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator
Copyright (c) 2002-2014, Jouni Malinen <j@w1.fi> and contributors
usage: hostapd [-hdBKtv] [-P <PID file>] [-e <entropy file>] \
[-g <global ctrl_iface>] [-G <group>] \
<configuration file(s)>
options:
-h show this usage
-d show more debug messages (-dd for even more)
-B run daemon in the background
-e entropy file
-g global control interface path
-G group for control interfaces
-P PID file
-K include key data in debug messages
-t include timestamps in some debug messages
-v show hostapd version创建hostapd配置文件 /etc/hostapd/hostapd.conf
nixawk@gnu:~$ cat /etc/hostapd/hostapd.conf
#change wlan0 to your wireless device
interface=wlan0
driver=nl80211
bridge=br0
country_code=CN
ieee80211d=1
ssid=teeeeeeee
hw_mode=g
channel=6
wme_enabled=0
macaddr_acl=0
auth_algs=1
wpa=2
wpa_passphrase=123456789
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP配置网络接口,
nixawk@gnu:~$ cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo br0
iface lo inet loopback
# wireless wlan0
allow-hotplug wlan0
iface wlan0 inet manual
# eth0 connected to the ISP router
allow-hotplug eth0
iface eth0 inet manual
# setup birdge
iface br0 inet static
bridge_ports eth0 wlan0
address 192.168.1.11
netmask 255.255.255.0
network 192.168.1.0
## isp router ip, 192.168.1.1 also runs DHCPS ##
gateway 192.168.1.1
dns-nameservers 192.168.1.1
dns-search localdomain
# 配置完成, 请执行 /etc/init.d/networking restart 重新配置网卡接口
# 开启 wifi热点 teeeeeeee
./hostapd -dd /etc/hostapd/hostapd.conf
===========================================================
http://www.cyberciti.biz/faq/debian-ubuntu-linux-setting-wireless-access-point/
http://k16.ddtuangou.com/browse.php?u=B%2FvIfXM3CoXK7trOkBSgwc4z%2FD%2FOxk%2BjvuRIaX7neEqOiopnWI8pBJASpIerAE2emQyzpQt0WdiG93%2FhCg9Ahs8gAUrwu4qgmmU1tIt6pRRTwidc4z91vw%3D%3D&b=0&f=norefer
http://wireless.kernel.org/en/users/Documentation/hostapd
http://blog.csdn.net/lqrensn/article/details/8154558
魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。
更多推荐



所有评论(0)