`

ubuntu建立wifi热点

 
阅读更多

首先运行 more /proc/sys/net/ipv4/ip_forward 检查一下这个文件是否为1 (1代表转发),如果是0就在/etc/sysctl.conf 中添加/修改: net.ipv4.ip_forward = 1(默认的这个配置应该是被注释了),保存,重启计算机。

 

第二种:

用ubuntu默认的无线创建wifi,这种wifi是Ad-hoc模式的,ap无法链接

不过ipad可以链接

 

第二种:

## 添加源

$ sudo add-apt-repository ppa:nilarimogard/webupd8

 

## 然后更新:

sudo apt-get update

 

安装ap-hotspot:

sudo apt-get install ap-hotspot

 

接着配置:

sudo ap-hotspot configure  

 

启动ap-hotspot:

sudo ap-hotspot start

 

如果要关闭wifi的话:

sudo ap-hotspot stop

 

==================

 配置文件:/etc/hostapd-hotspot.conf 【不过没有成功,总显示密码错误】

# WiFi Hotspot
interface=wlan0
driver=nl80211
#Access Point
ssid=lizy
hw_mode=g
# WiFi Channel:
channel=9
macaddr_acl=0
## 认证配置
auth_algs=1
ignore_broadcast_ssid=0
wpa=3
wpa_passphrase=12345678
wpa_key_mgmt=WPA-PSK WPA-EAP
wpa_pairwise=TKIP CCMP                                                                                                                 
rsn_pairwise=CCMP

 

 

  

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics