WiFi - HowToUse - Debian Wiki
WiFi - HowToUse - Debian Wiki
This page describes how to configure a WiFi interface on a Debian system, for use on a network.
Once your wireless device has an interface available (verifiable with iwconfig), it is required to be
configured to access a network. If you do not have a wireless interface present, please refer to
WiFi for information on providing a driver for your device.
Wireless network interface configuration can be performed using a connection manager (such as
NetworkManager) or through Debian's /etc/network/interfaces file with a special
purpose utility (such as wpa_supplicant). Examples of NetworkManager and wpa_supplicant
configuration are described below.
The WEP algorithm is insecure and deprecated by WPA. Use of WEP is not recommended
and is not covered within this document.
NetworkManager
NetworkManager is configured through graphical interfaces, which are available for GNOME
and KDE. Your wireless interface should not be referenced within Debian's
/etc/network/interfaces file.
GNOME
$ su
# apt-get update
# apt-get install network-manager-gnome
See the NetworkManager page for frequently asked questions, documentation and support
references.
KDE
$ su
# aptitude update
# aptitude install plasma-widget-networkmanagement
Wicd
You must remove network-manager to get wicd to work. Check to see if network-manager is
installed and see if, after you installed the driver, your wireless is already working in the
notification area of your desktop manager. You may already be good to go.
1. Update the list of available packages and install the wicd package:
$ su
# aptitude update
# aptitude install wicd
3. If not already performed, add your regular user account to the netdev group and reload
DBus:
# exit
$ wicd-client -n
Command Line
# ip a
# iwconfig
# ip link set wlan0 up
$ su
# iwlist scan
# my wifi device
auto wlan0
iface wlan0 inet dhcp
wireless-essid [ESSID]
wireless-mode [MODE]
You can now bring your interface up and down with the usual ifup and ifdown commands. If
you added auto wlan0 as in the example above, the interface should be brought up
automatically during boot up.
wpa_supplicant
$ su
# aptitude update
# aptitude install wpasupplicant
2. Use the WPA passphrase to calculate the correct WPA PSK hash for your SSID by altering
the following example:
If you don't put the passphrase on the command line, it will be prompted for. The above
command gives the output:
network={
ssid="myssid"
#psk="my_very_secret_passphrase"
psk=ccb290fd4fe6b22935cbae31449e050edd02ad44627b16ce0151668f5f53c01b
you'll need to copy from "psk=" to the end of the line, to put in your
/etc/network/interfaces file.
# sensible-editor /etc/network/interfaces
4. Define appropriate stanzas for your wireless interface, along with the SSID and PSK HASH.
For example :
auto wlan0
iface wlan0 inet dhcp
wpa-ssid myssid
wpa-psk
ccb290fd4fe6b22935cbae31449e050edd02ad44627b16ce0151668f5f53c01b
The "auto" stanza will bring your interface up at system startup. If not desired, remove or
comment this line.
5. Save the file and exit the editor.
6. Bring your interface up. This will start wpa_supplicant as a background process.
# ifup wlan0
WPA-EAP
For networks using EAP-TLS, you are required to establish a wpa_supplicant configuration file
and provide the client-side certificate. An example WPA2-EAP configuration file can be found at
/usr/share/doc/wpasupplicant/examples/wpa2-eap-ccmp.conf.
auto wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
Switching Connections
GNOME users should use "Menu System > Administration > Network". (n.b. this doesn't
work in etch)
Console users can
# ifup wlan0=wlan_home
Security consideration
1. Every member of a network can listen to other members' traffic (whether it's an
unencrypted public hot-spot, or a WEP/WPA/WPA2, or LAN). Use SSL/TLS protocols
(HTTPS, IMAPS...) or VPN to preserve your privacy.
2. WEP is so insecure that it is basically equivalent to not using any encryption at all.
See Also
iwconfig(8)
NetworkConfiguration
NetworkManager
WiFi
WPA
CategoryNetwork | CategoryWireless