WPA2 Wireless Internet connection without wicd, wifi Radar and Network Manager

How to connect to your secure WIFI connection without installing, using Network Manager, wicd or any other heavy graphical applications.

This post is intended for people who want a lightweight GNU Linux system and a WPA2 encrypted wireless Internet connection. Plus, make sure you have installed the wireless card driver necessary for your computer, do some reading on the topic, and back up your data.


Let's get started:




You can find and install the necessary drivers by installing and use jockey:
sudo apt-get install jockey-gtk jockey-common
Install wpasupplicant, and wireless-tools.

sudo apt-get install wpasupplicant wireless-tools

Next create a file:
sudo gedit /etc/wpa_supplicant.conf

Add copy and paste into the file (do not remove the quote in the code):

ctrl_interface=/var/run/wpa_supplicant

network={
ssid="YOUR SSID"
psk="YOUR PASSWORD"
key_mgmt=WPA-PSK
proto=RSN WPA
pairwise=CCMP TKIP
}


Now create a bash script
gedit ./wifi
copy and paste inside it:

#!/bin/bash
pkill wpa_supplicant
ifconfig wlan0 up
iwconfig wlan0 essid YOUR-ESSID-NAME-HERE
wpa_supplicant -B Dwext -i wlan0 -c /etc/wpa_supplicant.conf
dhclient wlan0


Make the batch ./wifi executable:
chmod +x ./wifi

into your menu, and start up file, add gksudo ./wifi &

Add now, when X server start up, you will be prompt to enter your password to connect to the Internet.

Advices:
*Make the /etc/wpa_supplicant.conf impossible to read by other users for security reason. Open terminal and enter those commands:

sudo chmod 0600 /etc/wpa_supplicant.conf
*Use wpa_passphrase and (>>) to add other network to /etc/wpa_supplicant.conf
*Disable or uninstall Network Manager (nm-applet), wicd, wifi radar...

Popular Posts