在Linux下实现无线WPA

转载 2007年09月20日 17:28:00
下面的說法太復雜了,基本上在Debian下面,只要安裝kwlan,稍加配置就可以了。

kwlan可能首次運行不成功,要重新啟動一下系統。

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

Mini HowTo


1) My setup is the following:

WiFi router: SMC Barricade WBR14-G2
WiFi card in laptop: Intel PRO/Wireles 3945
OS: Ubuntu 6.06 LTS (Dapper Drake)

2) The router settings:

Wireless encryption: WPA/WPA2 Only
Cipher suit: TKIP+AES (WPA/WPA2)
Authentication: Pre-shared Key (yes, I know 802.1X would be more secure... sue me)
Pre-shared key type: Passphrase (8~63 characters)

3) The package one needs to install:

# aptitude install wpasupplicant

4) Making WPA supplicant run:

First, create a config file, by the name /etc/wpa_supplicant.conf, and inside it, write:


ctrl_interface=/var/run/wpa_supplicant
ap_scan=1

network={
ssid="your_ssid_name"
scan_ssid=0
proto=WPA RSN
key_mgmt=WPA-PSK
pairwise=TKIP CCMP
group=TKIP CCMP
psk="your_preshared_key"
priority=5
}


At that point, you should make sure that the WiFi is turned on, and that the correct driver is loaded. In my case:

# modprobe ipw3945

Then, to test the WPA supplicant, run:


# wpa_supplicant -Dwext -ieth1 -c /etc/wpa_supplicant.conf


Recall I have used the wext device, instead of the ipw one, that would seem the appropriate one. Well, I read somewhere, that with 2.6.16 kernels and newer, this should be the case. Now I recall that my kernel is 2.6.15... nevermind, it works that way, and not the other (with -Dipw).

Recall also that my wireless device is eth1. Your mileage may vary (but each wireless card model gives rise to a precise device name, don't worry).

If everything went fine, the output for the above command should be something like:


# wpa_supplicant -Dwext -ieth1 -c /etc/wpa_supplicant.conf
Trying to associate with xx:xx:xx:xx:xx:xx (SSID='xxxxxxxx' freq=0 MHz)
CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys
Authentication with 00:00:00:00:00:00 timed out.
Associated with xx:xx:xx:xx:xx:xx
WPA: Key negotiation completed with xx:xx:xx:xx:xx:xx [PTK=CCMP GTK=TKIP]
CTRL-EVENT-CONNECTED - Connection to xx:xx:xx:xx:xx:xx completed (auth)


If you see that "negotiation completed", it worked (Ctr-C to exit the above).

5) Automating the WPA connection when bringing wireless interface up

Next, I'll explain the small changes one has to make to /etc/network/interfaces to correctly bring up the interface. As I said, my wireless interface is eth1, so, I added the lines below to the aforementioned config file:


iface eth1 inet dhcp
wireless-essid my_wireless_essid
pre-up wpa_supplicant -Bw -Dwext -ieth1 -c /etc/wpa_supplicant.conf
post-down killall -q wpa_supplicant


And that's all! Whenever you ifup eth1, you'll bring up the wireless interface, with WPA encryption working. 

相关文章推荐

Linux下Wi-Fi的实现:wireless_tools和wpa_supplicant

平台为hi35XX,在Liunx下借助wireless_tools和wpa_supplicant(因为现在的无线wifi网络大多是wpa加密。所以需要移植wpa_supplicant工具)等工具实现w...

Linux无线网络设置(wpa_supplicant的使用)

主机环境:Gentoo Linux 3.1.10WPA Supplicant工具包可以让您连接到那些使用WPA的AP。因为还只是beta版,所以它的配置方法仍会常常变化——尽管如此,在大部分情况下它已...

linux 无线上网(network manager+wpa_supplicant )

如果要通过network manager+wpa_supplicant的话可以参考 http://www.ces.clemson.edu/linux/nm.shtml 但必须参考http://li...

S3C2440 RT3070实现无线路由器 基于wpa_suppicant+udhcpc实现STA,hostapd+udhcpd+iptables实现softAP

无线网卡RT3070模块,实现开发板无线上网以及路由器功能 _________________________________ 主机操作系统:Centos 6.5 交叉编译器环境:arm-linux-...

关于如何通过kali linux 攻击以及破解WPA/WPA2无线加密

inf:今天给大家带来的是如何通过linux 对无线网络进行攻击以及破解WPA/WPA2 无线加密的热点密码,由于自己也是刚开始对网络安全这块进行一些探索,大牛看到请不要笑我,那废话不多说,接下来就开...

Kali Linux 2.0中使用aircrack-ng破解安全性为WPA/WPA2 PSK的无线网络

这些天通过上网查看各类博客,资料,再加上动手操作,成功在Kali Linux 2.0上面破解了附近一个wifi的密码,下面对其大体步骤进行总结: 1.ifconfig -a   使用该命令查看本机的无...

Linux 如何配置无线网络 wpa_supplicant wpa_cli

http://www.gentoo.org/doc/zh_cn/handbook/handbook-x86.xml?part=4&chap=4 目前您可以使用我们提供的wireless-to...
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:深度学习:神经网络中的前向传播和反向传播算法推导
举报原因:
原因补充:

(最多只允许输入30个字)