tux-debianwww.palmix.orgtux-debian


  HOME  TUTORIALS  ARTICLES  DOWNLOADS  LINKS ITALIANO

 

WiFi and WPA-PSK on Debian:
by Francesco Palmisano

wifi
If you have a wireless LAN in your home, maybe you need to protect your pravacy from connections abuses.
There are different ways to protect your WiFi LAN: one is to use WEP encrypt key, but it's a easy crackable metod!
A second way is to use a WPA or WPA2 encrypt key.
In this tutorial we let see how to use WPA key to protect your WiFi LAN.
Let's go:

First of all install a wpa demon with your favourite packages manager (as Synaptic):

wpasupplicant

Now you need to create a configuration file in /etc/ folder
So, with a text editor create a file called wpa_supplicant.conf (or download ones here), like this:

ctrl_interface=/var/run/wpa_supplicant

network={
ssid="insert your wireless net name"
psk="insert your exadecimal key "
key_mgmt=WPA-PSK
proto=WPA
pairwise=TKIP
group=TKIP
}

The exadecimal key has to be the same present in your ruter or acess-point.

Now modify the file /etc/network/interfaces.

from this (or sometihng similar, you could use DHCP instaed of a static address):

auto wlan0
iface wlan0 inet static
address "static adress"
netmask 255.255.255.0
wireless-essid "nome of your wifi lan"
broadcast "static adress"
gateway "static adress"
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers "static adress"

to this:

auto wlan0
iface wlan0 inet static
address "static adress"
netmask 255.255.255.0
wireless-essid "nome of your wifi lan"
broadcast "static adress"
gateway "static adress"
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers "static adress"
pre-up wpa_supplicant -Bw -Dwext -i wlan0 -c/etc/wpa_supplicant.conf
post-down killall -q wpa_supplicant


Your wireless device could be different from "wlan0" , so control your device name (as root) with this command:

iwconfig

And now restart your network service (as root):

/etc/init.d/networking restart

Now your WiFi LAN is encrypt with WPA way, enjoy it!!


back on topback to tutorials