ubuntu 12.04 使用hostapd共享wifi
2013-09-29 18:00
405 查看
一个简单的配置文件:
interface=wlan0
bridge=br0
driver=nl80211
ssid=ssa
hw_mode=g
channel=11
dtim_period=1
rts_threshold=2347
fragm_threshold=2346
auth_algs=3
wpa=1
wpa_passphrase=12345678
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP CCMP
rsn_pairwise=CCMP
[cpp] view
pla
搭建网桥:
[cpp] view
plaincopy
sudo apt-get install bridge-utils
建立网桥:
[cpp] view
plaincopy
sudo brctl addbr br0
sudo ifconfig br0 192.168.2.236 netmask 255.255.255.0
#not tested : sudo route add default gw 192.168.2.254
Note: my eth0 ip=192.168.2.110
连接网桥两端:
[cpp] view
plaincopy
sudo brctl addif br0 eth0
sudo brctl addif br0 wlan0
hostapd -d /etc/hostapd/hostapd.conf
安装配置dhcp,此处直接使用dnsmasq进行
/usr/sbin/dnsmasq --conf-file --no-hosts --keep-in-foreground --bind-interfaces --except-interface=lo --clear-on-reload --strict-order --listen-address=10.10.10.1 --dhcp-range=10.10.10.10,10.10.10.100,60m --dhcp-option=option:router,10.10.10.1 --dhcp-lease-max=50 --pid-file=/var/run/nm-dnsmasq-wlan0.pid
remain problems:
PC can't use network anymore, reason not clear.
当开机连接到无线网络时,可能连接失败,
解决:开一下共享wifi再关闭共享wifi,再连接无线wifi可以连上。
interface=wlan0
bridge=br0
driver=nl80211
ssid=ssa
hw_mode=g
channel=11
dtim_period=1
rts_threshold=2347
fragm_threshold=2346
auth_algs=3
wpa=1
wpa_passphrase=12345678
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP CCMP
rsn_pairwise=CCMP
[cpp] view
pla
搭建网桥:
[cpp] view
plaincopy
sudo apt-get install bridge-utils
建立网桥:
[cpp] view
plaincopy
sudo brctl addbr br0
sudo ifconfig br0 192.168.2.236 netmask 255.255.255.0
#not tested : sudo route add default gw 192.168.2.254
Note: my eth0 ip=192.168.2.110
连接网桥两端:
[cpp] view
plaincopy
sudo brctl addif br0 eth0
sudo brctl addif br0 wlan0
hostapd -d /etc/hostapd/hostapd.conf
安装配置dhcp,此处直接使用dnsmasq进行
/usr/sbin/dnsmasq --conf-file --no-hosts --keep-in-foreground --bind-interfaces --except-interface=lo --clear-on-reload --strict-order --listen-address=10.10.10.1 --dhcp-range=10.10.10.10,10.10.10.100,60m --dhcp-option=option:router,10.10.10.1 --dhcp-lease-max=50 --pid-file=/var/run/nm-dnsmasq-wlan0.pid
remain problems:
PC can't use network anymore, reason not clear.
当开机连接到无线网络时,可能连接失败,
解决:开一下共享wifi再关闭共享wifi,再连接无线wifi可以连上。
相关文章推荐
- 利用Hostapd搭建无线wifi
- andorid/iphone 手机通过 wifi 连接笔记本 无线网卡 共享上网
- Ubuntu安装hostapd步骤
- Kali(debian)创建WIFI AP热点
- linux AP hostapd 建构
- 树莓派3B+ 无线路由(hostapd)
- 热点ssid生成名称规则prefix_xxxxxx,xxxxxx为有线网卡mac地址后6位
- A20集成rt5572驱动
- hostapd_cli命令源码分析
- hostapd的分析
- Raspberry建立Wifi热点
- 利用fl2440开发板和rt3070模块实现简单路由器制作
- 利用fl2440开发板和rt3070模块实现简单路由器制作
- 利用fl2440开发板和rt3070模块实现简单路由器制作
- hostapd和dhcpd
- 交叉编译hostapd的方法
- 让linux下无线网卡变身随身wifi----hostapd移植-Nazgul
- CubieTruck安装配置hostapd变为wifi热点
- KALI LINUX中使用wifiphisher遇到的一系列问题解决方法
- cubietruck如何利用hostpad建立局域网