Sabtu, Oktober 29, 2011

Centos : Connecting to an AP with WPA-PSK

link yang berhubungan dengan artikel
http://madwifi-project.org/wiki/UserDocs/WPA_PSK_on_Both_Ends
http://ultramookie.com/wayback/2006/09/17/centos4-and-wpa-psk/

Sisi Station (client)
wpa_supplicant

Jika semua worksatation ingin di dafatarken Ke AP dengan mode WPA, ikuti cara berikut:
Download versi stabil: http://hostap.epitest.fi/wpa_supplicant/ (lihat : wpa_supplicant-0.4.7.tar.gz). Ekstrak ke /usr/src/wpa_supplicant-0.4.7
________________________________________
_________________________
CFLAGS += -I/usr/src/madwifi-ng
CONFIG_CTRL_IFACE=y


Sekarang kompile wpa_supplicant pada mode Station
cd /usr/src/wpa_supplicant-0.4.7
make clean
make
make install
_________________________________________________________________
PSK di buat dengan menjalankan wpa_passphrase
Ubah /etc/modprobe.conf dan tambahkan :
alias ath0 ath_pci
options ath_pci autocreate=sta

Reboot.
wpa_supplicant akan ter load otomatis pada network:
/usr/sbin/wpa_passphrase "NAMA_AP_SSID" "PASSWORD_WPA_PSK" >> /etc/wpa_supplicant/wpa_supplicant.conf
Ubah
/etc/wpa_supplicant/wpa_supplicant.conf dan tambahkan:
key_mgmt=WPA-PSK
proto=WPA

test perubahan, jika bekerja:
iwconfig ath0 essid "NAMA_AP_SSID"
ifconfig ath0 ALOKASI_IP_ADDRESS up
/usr/sbin/wpa_supplicant -dd -Dmadwifi -iath0 -c /etc/wpa_supplicant/wpa_supplicant.conf

Menampilkan Koneksi:

CTRL-EVENT-CONNECTED - Koaneksi to AP_ADDRESS Lengkap (auth)

Berarti OK.
Sekarang, buat jadi otomatis loading. Pertama, setup wireless card like usual in Applications -> System Settings -> Network.
ubah /etc/sysconfig/network-scripts/ifup-wireless

tambahkan pada baris terakhir :

/usr/sbin/wpa_supplicant -w -B -Dmadwifi -iath0 -c /etc/wpa_supplicant/wpa_supplicant.conf

Uji dan lihat hasilnya:
/etc/init.d/network restart
Jika berhasil, lihat hasilnya.

Tidak ada komentar: