In linux, WPA is used to encrypt the internet, and wpa-pskTKIP is used as an example.

Source: Internet
Author: User
In linux, WPA is used to encrypt the Internet. For example, wpa-pskTKIP is used to encrypt the Internet. For more information, see Linux general technology-Linux technology and application. First, install the NIC Driver. If the driver is atheros, you can use the madwifi package to download it at http://madwifi.org/

The corresponding software packages such as linux-headers-'uname-R', build-essential, and gcc may be used during compilation.

If you cannot access the Internet, you can use the installation disc to add the optical drive to the source.

Apt-cdrom add

Apt-get install linux-headers-* build-essential gcc

Install the wpa_supplicant package (ubuntu) for linux wpa to access the Internet ).

The corresponding software packages can be located in the directory of the http://security.ubuntu.com/ubuntu/pool/main/w/wpasupplicant.

Set WPA verification materials

Wpa_passphrase SSID WPA_Key>/etc/wpa_supplicant/fonera. conf

Wpa_supplicant-BDwext-I ath0-c/etc/wpa_supplicant/fonera. conf

Or

Vi/etc/wpa_supplicant.conf

Network = {

Ssid = "SSID"
Key_mgmt = WPA-PSK
Proto = WPA
Pairwise = TKIP
Group = TKIP
Psk = "WPA_Key"

}

Wpa_supplicant-BDwext-I ath0-c/etc/wpa_supplicant.conf

Get IP

Dhclient eth1

Route add default gw IP_of_AP

If you think that you need to run the wpa_supplicant-BDwext-ieth1-c/etc/wpa_supplicant.conf command every time you start it, you can add subsequent steps.

Starting All This Stuff Automatically
Your users probably don't want to enter all these commands every time they want to connect to your network. so, if you're feeling benevolent, you can set everything up to start at boot. on Debian, Ubuntu, and the vast herds of other Debian-based distributions, edit/etc/network/interfaces:

Auto eth1
Iface eth1 inet dhcp
Up wpa_supplicant-I ath0-c/etc/wpa_supplicant.conf-BDwext
Down killall wpa_supplicant

-B forks the wpa_supplicant into the background, and-w tells it to do nothing unless the interface is up.

On Fedora and Red Hat, et al, configure your wireless card in the usual manner in/etc/sysconfig/network-scripts/ifcg-eth1, or whatever file belongs to the wireless interface, using the real interface name and MAC address:

DEVICE = eth1
BOOTPROTO = dhcp
HWADDR = 11: 22: 33: 44: 55: 66
ONBOOT = yes
TYPE = Ethernet

Then add these lines to the end of/etc/sysconfig/network-scripts/ifup-wireless, again using your own interface name:

Wpa_supplicant-I ath0-c/etc/wpa_supplicant.conf-BDwext
Killall wpa_supplicant

These are simple setups that don't manage multiple locations or do any fancy hotplug management, but they work fine for single locations. we'll cover roaming, multiple profiles, and hotplug interfaces in future installments.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.