Wifi драйвера для linux debian

Настройка Wi-Fi в Linux Debian

1. Установка драйвера Wi-Fi карты в Linux

Для работы wi-fi карты необходим драйвер. Нужного драйвера может не быть в системе. Что бы узнать какое устройство (сетевая карта) используется, можно посмотреть ID производителя и ID устройства с помощью команды «lspci -nn» или, если USB карта, «lsusb» эти команды выводят список устройств в системе, а также показывают их идентификатор. Пример строки из вывода команды lsusb:

Bus 001 Device 002: ID 0bda:8176 Realtek Semiconductor Corp. RTL8188CUS 802.11n WLAN

Видно, что wi-fi карточка Realtek, модель: RTL8188CUS, ID у неё: 0bda:8176 (первые четыре шестнадцатеричные цифры — это ID производителя, вторые — ID устройства). В данном случае модель уже известна и искать её по номеру ID нет смысла. Многие драйвера для проводных и беспроводных карт Realtek собраны в пакете firmware-realtek, однако после его установки и подключения usb wi-fi карты, беспроводной интерфейс у меня не появился. Тогда я скачал с сайта производителя драйвера нужной мне модели под Linux(Unix). В архиве находились исходные тексты драйвера, скрипт установки «install.sh» и документация. После запуска скрипта install.sh, произошла компиляция модуля драйвера (8192cu) и его установка в систему. После чего появился беспроводной интерфейс wlan0.

Узнать, что он появился можно командой «ifconfig -a«

2. Установка необходимых пакетов для работы с Wi-Fi

Настройку Wi-Fi сети можно произвести в графическом режиме с помощью NetworkManager или Wicd либо в консольном. Я рассмотрю вариант настройки в консольном.

Для работы с беспроводными интерфейсами есть пакет: wireless-tools (содержит утилиты: iwconfig, iwlist и пр.)

Для поддержки WPA и WPA2 нужен пакет: wpasupplicant

Следует установить эти два пакета.

3. Настройка Wi-Fi

Первым делом нужно включить беспроводной интерфейс командой: «ifconfig wlan0 up«

Далее можно просканировать доступные беспроводные сети командой: «iwlist wlan0 scan» (команда «iwlist» доступна после установки пакета wireless-tools)

# iwlist wlan0 scan
wlan0 Scan completed :
Cell 01 — Address: B8:A3:86:12:75:BA
ESSID:»Wi-Fi Net»
Protocol:IEEE 802.11bg
Mode:Master
Frequency:2.427 GHz (Channel 4)
Encryption key:on
Bit Rates:54 Mb/s
Extra:rsn_ie=30140100000fac020100000fac020100000fac020000
IE: IEEE 802.11i/WPA2 Version 1
Group Cipher : TKIP
Pairwise Ciphers (1) : TKIP
Authentication Suites (1) : PSK
Quality=93/100 Signal level=70/100
Cell 02 — Address: 1C:AF:F7:26:BD:C8
ESSID:»k-60-net»
Protocol:IEEE 802.11bgn
Mode:Master
Frequency:2.427 GHz (Channel 4)
Encryption key:on
Bit Rates:150 Mb/s
Extra:wpa_ie=dd160050f20101000050f20401000050f20401000050f20 2
IE: WPA Version 1
Group Cipher : CCMP
Pairwise Ciphers (1) : CCMP
Authentication Suites (1) : PSK
Extra:rsn_ie=30140100000fac040100000fac040100000fac020000
IE: IEEE 802.11i/WPA2 Version 1
Group Cipher : CCMP
Pairwise Ciphers (1) : CCMP
Authentication Suites (1) : PSK
Quality=100/100 Signal level=91/100

Видно, что найдены две беспроводных сети. Из вывода команды можно увидеть используемые идентификаторы сети (ESSID), частоты (каналы), протоколы, методы шифрование, уровень сигнала и прочее.

Настройка Wi-Fi сети производится в файле: «/etc/network/interfaces», так как там будет храниться ключ для доступа к беспроводной сети, то нужно ограничить доступ к файлу командой «chmod 0600 /etc/network/interfaces» (команда выставляет права чтения и записи в файл только для владельца файла, владельцем является root).

Пример файла «/etc/network/interfaces»:

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback

auto wlan0
iface wlan0 inet dhcp
wpa-ssid "k-60-net"
wpa-psk "dsqTtfsvsNyfiCsNMaga"

wpa-ssid — задает идентификатор беспроводной сети

wpa-psk — задаёт парольную фразу на доступ к сети. (Может быть задана в виде ASCII, как в примере, либо в виде 64 битного шестнадцатиричного числа сгенерированного утилитой wpa_passphrase на основании ASCII парольной фразы)

Настройку Wi-Fi сети можно задать и в отдельном файле-конфиге для wpa_supplicant и указав его в «/etc/network/interfaces».

Пример такого файла «/etc/network/interfaces»:

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback

auto wlan0
iface wlan0 inet dhcp
wpa-conf /etc/network/wpa_supp.conf

Пример файла «/etc/network/wpa_supp.conf«:

network= <
ssid="k-60-net"
proto=WPA2
key_mgmt=WPA-PSK
pairwise=CCMP
group=CCMP
psk="dsqTtfsvsNyfiCsNMaga"
>

CCMP — соответствует шифрованию AES

После настройки конфигурационных файлов можно включить интерфейс командой: «ifup wlan0«

Посмотреть состояние беспроводного интерфейса можно командой «iwconfig«, однако эта команда не распознаёт использование WPA/WPA2 и показывает Security mode: Open.

Для достоверного отображение информации лучше использовать команду «wpa_cli status«

Пример вывода команды:

Selected interface 'wlan0'
bssid=1c:af:f7:26:bd:c8
ssid=k-60-net
id=0
pairwise_cipher=CCMP
group_cipher=CCMP
key_mgmt=WPA2-PSK
wpa_state=COMPLETED
ip_address=192.168.0.10

Подключение с использованием WEP а не WPA/WPA2 рассматривать не будем, так как метод WEP уже устаревает и довольно легко взламывается.

В этой и прошлых статьях (Настройка сети в Linux Debian, Настройка PPPoE в Linux Debian) мы рассмотрели как можно произвести типовую настройку сети в Linux Debian.

Более сложную конфигурацию сети с использованием VLAN, а так же конфигурацию с использованием объединения сетевых интерфейсов рассмотрим в следующих статьях (Настройка VLAN в Linux и Linux bonding — объединение сетевых интерфейсов в Linux).

Источник

  • ru
  • wl

Эта страница описывает включение поддержки WiFi устройств основаных на Broadcom wireless LAN chips, используя драйвер производителя для Debian систем.

Проприетарный драйвер Broadcom wireless LAN (wl, aka broadcom-sta) обеспечивает поддержку PCI/PCIe устройств основаных на Broadcom. Он включает в себя двоичный компонент нацеленный на архитектуры x86 или x86_64. Поддерживаемые устройства перечислены в конце этой страницы.

Чипы BCM4313, BCM43224 and BCM43225 имеют поддержку альтернативного драйвера brcmsmac с открытым исходным кодом. Чипы BCM4311, BCM4312, BCM4321, BCM4322 and BCM4331 имеют поддержку альтернативного драйвераb43 с открытым исходным кодом.

Установка

Добавьте компоненты «non-free» в /etc/apt/sources.list для своей версии Debian, например:

Обновите список доступных пакетов. Установите соответствующие/последние пакеты linux-image, linux-headers и broadcom-sta-dkms :

Это также позволит установить рекомендуемый пакет wireless-tools. DKMS соберет модуль wl для вашей системы.

Выгрузите конфликтующие модули:

Загрузите wl модуль:

Настройте свой интерфейс беспроводной сети по обстоятельствам. Посмотрите также известные проблемы.

Читайте также:  Webdav windows server 2016 настройка

Известные проблемы

Драйвер Sonics Silicon Backplane (ssb) конфликтует с драйвером wl (545388).

b44, b43, b43legacy и ssb по умолчанию в черном списке broadcom-sta 5.10.91.9.3-3 (brcm80211 и brcmsmac since 5.100.82.38-1, 5.100.82.38-2 соответсвенно).

  • Это предотвращает использование устройства Ethernet, поддерживаемых и44.
  • Если вы испытываете частые отключения попробуйте отключенить управление питанием:

      iwconfig(8) (например iwconfig wlan0 power off)

      laptop-mode-tools: измените WIRELESS_BATT_POWER_SAVING=0 на /etc/laptop-mode/conf.d/wireless-power.conf

    Беспроводные каналы 12 и 13 не доступны для использования (636119).

    Невозможность присоединиться к сети со скрытыми SSID(698697).

    Обновление Debian 6.0 «Squeeze» в Debian 7 «Wheezy» может потребовать поправки конфигурации сети (648396).

    Смотрите сообщения об ошибках в этом пакете на Debian Bug Tracking System.

    Поддерживаемые устройства

    Версия 6.30.223.248

    • Broadcom BCM4311 (PCI IDs 14e4:4311, 14e4:4312)
    • Broadcom BCM4312 (PCI ID 14e4:4315)
    • Broadcom BCM4313 (PCI ID 14e4:4727)
    • Broadcom BCM4321 (PCI IDs 14e4:4328, 14e4:4329, 14e4:432a)
    • Broadcom BCM4322 (PCI IDs 14e4:432b, 14e4:432c, 14e4:432d)
    • Broadcom BCM43224 (PCI IDs 14e4:0576, 14e4:4353)
    • Broadcom BCM43225 (PCI ID 14e4:4357)
    • Broadcom BCM43227 (PCI ID 14e4:4358)
    • Broadcom BCM43228 (PCI ID 14e4:4359)
    • Broadcom BCM43142 (PCI ID 14e4:4365)
    • Broadcom BCM4331 (PCI ID 14e4:4331)
    • Broadcom BCM4352 (PCI ID 14e4:43b1)
    • Broadcom BCM4360 (PCI IDs 14e4:43a0, 14e4:4360)

    Смотрите также

    bcm43xx — Беспроводные устройства Broadcom 43xx

    brcm80211 — Устройства Broadcom BCM4313, BCM43224, BCM43225

    Источник

    Debian GNU/Linux + Macbook Air 2017 (установка wifi драйверов)

    Так случилось что захотелось снести MacOS на Macbook’е Air и поставить что то более свободное и линуксовое. Макбук 2017 года, долгое время пользовался MacOS Mojave, обновляться до новых выпусков, зная возможные проблемы, желания не было. Немного перебирая варианты дистрибутивов и попробовав различные Live образы, выбор пал на Debian 11 но так как официально он еще не вышел (выход намечен на 14 августа 2021), то взял его второй релиз кандидат Bullseye RC 2.

    Проблема 1

    Вот тут и появился первый подводный камень: Debian поддерживает не все wifi устройства из коробки. На помощь могут прийти non-free прошивки, которые можно установить после установки системы, добавив репозитории этих несвободных прошивок, в файле sources.list .

    Проблема 2

    Теперь появляется второй подводный камень: а как мы установим прошивку для wifi устройства если у нас не работает сеть после установки? Тут уже на помощь пришел смартфон с включенным режимом USB Tethering. Подключив с помощью кабеля USB к макбуку, установщик на удивление сразу распознал это как проводное сетевое соединение. Таким образом интернет соединение для установки драйверов на wifi и первоначальных пакетов, мы себе обеспечили.

    Действия после установки

    Сам процесс инсталляции я описывать не буду так как все индивидуально, и это тема для отдельной статьи.

    После установки открываем терминал и утилитой lspci узнаем модель нашего wifi устройства, введя следующую команду:

    На выводе получим название модели устройства, в моей случае это:

    BCM4360 это и есть модель wifi устройства. Свободных прошивок к сожалению на него нет и теперь чтобы wifi заработал, нам придется установить несвободный драйвер broadcom-sta-dkms который предоставляет исходный код для модуля ядра wl Остальной список поддерживаемых моделей можно посмотреть в описании драйвера https://packages.debian.org/buster/broadcom-sta-dkms

    Так же перед установкой, поставим пару необходимых пакетов wireless-tools и wpasupplicant

    Далее открываем из под рута, файл sources.list (я использую nano)

    И вписываем возле каждого урла репозитория, напротив слова main , теги contrib non-free . Должно получится примерно следующее:

    Затем сохраняем файл и обновляем инфу о пакетах командой sudo apt update .

    Теперь устанавливаем сам драйвер введя команду:

    По ее завершению, убираем модули b44 b43 b43legacy ssb brcmsmac bcma из ядра системы, командой:

    и добавляем модуль wl :

    После этого в Network manager’е (я использовал его для настройки сети) появится раздел Wi-Fi Networks где мы уже сможем выбрать доступную сеть и ввести пароль для доступа.

    Заключение

    Данный гайд может быть полезен не только владельцам маков но и других ноутбуков и десктопов. Так же гайд подойдет остальным Debian производным дистрибутивам (хотя могут быть нюансы).

    Источник

    • WiFi
    • HowToUse

    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 by running «ip link show»), 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 obtaining a driver, or the necessary firmware for your device.

    Wireless network interface configuration requires a backend, generally wpa_supplicant (often in conjunction with ifupdown and other utilities) or IWD. These can be used with connection managers that provide advanced functionality, and an easier way to configure them. Examples of these would generally be NetworkManager, ConnMan, systemd-networkd, and Wicd.

    » height=»16″ src=»https://wiki.debian.org/htdocs/debwiki/img/attention.png» title=» » width=»16″/> The WEP algorithm is insecure and deprecated by WPA. Use of WEP is not recommended and is not covered within this document.

    Automatic

    NetworkManager

    For the average desktop user, the easiest way to configure your network is to install the GUI frontend for NetworkManager that corresponds to your desktop. NetworkManager itself is a frontend for different network backends (wpa_supplicant by default) that abstracts away the configuration and simplifies it. Your wireless interface should not be referenced within Debian’s /etc/network/interfaces file.

    NetworkManager Frontends

    NetworkManager on GNOME

    As of GNOME 3, integration with NetworkManager is baked into GNOME Shell, and will appear in the settings and as an icon in the top-right of your screen as long as it’s running.

    Open the «Networks» section of your settings, select your network in the list, enter the password as prompted, and you should be ready to surf the web.

    The network-manager-gnome package still exists and provides a systray applet for other desktops, but will not make any difference with GNOME 3.

    See the NetworkManager page for frequently asked questions, documentation and support references.

    NetworkManager on KDE Plasma

    The KDE Plasma task should bring in plasma-nm during system installation without any extra steps being required, and its usage should be intuitive. If you aren’t sure how to use it though, or if you installed the desktop manually and might not have brought it in, the following will likely be useful.

    Ensure your user account is a member of the netdev group.

    Install the plasma-nm package.

  • Restart your Plasma session (most easily by logging out and logging back in).
  • A new applet (with a traditional «no Wi-Fi signal» icon) will appear in the system tray. Click this icon.
  • Neighboring wireless networks with a broadcasted SSID should be listed:
    • Click on the desired network’s name.
    • If the network uses WPA encryption with a password (aka passphrase/pre-shared key), you will be prompted to enter it. After providing, click the «Connect» button.
    • The wireless network connection will be activated.

    If the desired network is not listed (e.g. SSID not broadcast/hidden):

    • Click «Connect to Other Wireless Network. «.
    • Enter the network’s name in «Name (ESSID)».
    • Tick «Use Encryption» if in use on the network.
      • Select the encryption method used (usually «WPA Personal»).
      • Enter the passphrase/pre-shared key at «Password».
      • Select «WPA 1» or «WPA 2» for the protocol version, as used by the network.
    • Click the «Connect» button to activate the wireless network connection.
  • See the NetworkManager page for frequently asked questions, documentation and support references.

    NetworkManager on a generic desktop/headless session

    If there is no GUI frontend available, the «nmcli» and «nmtui» commands are available as CLI and TUI frontends respectively for NetworkManager.

    Troubleshooting & Tips for NetworkManager

    WiFi can scan, but not connect using NetworkManager (Debian 9 Stretch)

    If you find that your wireless network device can scan, but will not complete connecting, try turning off MAC address randomization.

    Write inside /etc/NetworkManager/NetworkManager.conf:

    After doing this, restart NetworkManager with service NetworkManager restart

    Setting up a WiFi hotspot

    In recent years, NetworkManager is sophisticated enough to set up a WiFi hotspot that «just works» (i.e. sets up a local private net, with DHCP and IP forwarding). In some desktops, such as KDE Plasma, a button to create a hotspot is visible in the network applet if two separate wireless network interfaces are present. Alternatively, it can be created manually with a command similar to:

    Changing the backend

    It’s possible to replace wpa_supplicant with IWD in NetworkManager in Debian 10 and newer, though Debian 11 is recommended for the best experience as there are known issues with the old version of IWD present in Debian 10. For more information on how to switch, see NetworkManager/iwd.

    IWCtl

    While also available as backend for ConnMan, NetworkManager, and systemd-networkd, it’s also possible to nearly base your entire networking stack on one codebase with IWD alone. It’s an all-in-one wireless client, wireless daemon, and even a DHCP client optionally! At its best, your entire networking stack can be as minimal as IWD + systemd-resolved, and this works wonderfully for many scenarios. It has virtually zero dependencies and uses modern kernel features as often as possible. Anecdotal reports suggest that it’s much faster to connect to networks than wpa_supplicant, and has better roaming support, among other perceived improvements.

    First, install the iwd package. If you’ve installed wpasupplicant, either uninstall the package, or stop and disable the wpa_supplicant service with:

    Then, ensure that the newly-installed IWD service is enabled and running with with:

    If you plan to go the route of using IWD standalone, you should first enable some essential features in IWD’s configuration file, which can be found at /etc/iwd/main.conf. Edit this file with root permissions using your favorite editor.

    Enable IPv6 support by adding this section to the configuration file:

    Enable network autoconfiguration, so that IWD uses its own built-in DHCP client rather than requiring use of a separate standalone DHCP client. Add this section to the configuration file:

    Restart the service with «service iwd restart» after making these additions. Start the IWCtl client by running «iwctl» as your standard user (not root!), which will start an interactive prompt. You can run «help» to get a full list of commands here.

    To connect to a Wi-Fi network in the most typical scenario, first type «device list» to find the name of your wireless device. We will use wlan0 in this example, but your name may be different, and potentially much longer if your system renames interfaces to a unique name.

    After you have the device name, run something like «station wlan0 scan» to have the device scan for networks. You can then list these networks by running «station wlan0 get-networks». After you’ve found the network you intend to connect to, run «station wlan0 connect Router123», replacing ‘Router123’ with the name of the network. Put the name of the network in double-quotes if it contains a space. IWCtl will then prompt you for the passphrase. After entering this, IWD will connect to the network, and store it permanently in the /var/lib/iwd directory. After being added in this way, IWD will attempt to auto-connect to the network in the future.

    Try running ping 1.1.1.1 to see if you can reach an IP, and then ping gnu.org to see if you can reach a domain. If you can’t reach an IP, something’s gone horribly wrong when connecting to the network. If you can’t reach a domain but you can reach an IP, you’ll need to configure your DNS. The simplest way to accomplish that is.

    Setting up DNS resolution for IWD (Simple)

    If «EnableNetworkConfiguration=true» is set, you’ll also need to configure IWD’s name resolving service. It supports systemd-resolved and resolvconf. If unspecified, it uses systemd-resolved. Refer to the IWD.CONFIG(5) page if you care about using resolvconf instead.

    If DNS is nonfunctional, you likely need to configure systemd-resolved for use with IWD. Enable and start the systemd-resolved service, if it isn’t already, by running:

    Then, symlink /etc/resolv.conf to /run/systemd/resolve/stub-resolv.conf by running:

    That should be enough to get you online. If you want to make changes to your DNS configuration, refer to the /etc/systemd/resolved.conf file, and the associated manpage at RESOLVED.CONF(5)

    Further reading

    Keep in mind, this is just covering the most basic of basics for getting online in a completely typical scenario, and it might not apply to you! For more advanced setups, refer to the help output for IWCtl. Documentation on other options for the /etc/iwd/main.conf file can be found in IWD.CONFIG(5). Documentation for the network files in /var/lib/iwd can be found in IWD.NETWORK(5).

    Some of the information here was adapted from this lovely blogpost, which has more details and more ideas for how you can configure your own setup: https://insanity.industries/post/simple-networking/

    » height=»16″ src=»https://wiki.debian.org/htdocs/debwiki/img/attention.png» title=» » width=»16″/> Wicd is not available in Debian 11/Bullseye or newer, due to the deprecation of Python 2.

    » height=»16″ src=»https://wiki.debian.org/htdocs/debwiki/img/attention.png» title=» » width=»16″/> 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.

    wicd (Wireless Interface Connection Daemon) is a lightweight alternative to NetworkManager, using wpa_supplicant as a backend. It is environment-independent, making it suitable for all desktop environments, including GNOME, Xfce, LXDE, and Fluxbox. Like NetworkManager, wicd is configured via a graphical interface. Your wireless interface should not be referenced within Debian’s /etc/network/interfaces file.

    Update the list of available packages and install the wicd package:

    Amend /etc/network/interfaces to contain only the following:

    Note: as of wheezy it is fine to have your wireless interface in /etc/network/interfaces, but not required. You can set the wireless interface (e.g. wlan0) in the wicd client’s preferences.

    If not already performed, add your regular user account to the netdev group and reload DBus:

    Start the wicd daemon:

    Start the wicd GUI with your regular user account:

    ConnMan

    ConnMan is another network frontend designed for embedded devices. Example usage:

    After the configuration, connman remembers your SSID selections and reusees them automatically. Don’t worry about long HEXes — in client mode TAB auto-completion works both for commands and data.

    Manual

    Using IWD

    While IWD is often a backend for more comprehensive connection managers, it can also be used fully standalone, and is completely distinct from wpa_supplicant. With virtually no extra dependencies, it’s one of the lightest and simplest methods for configuring wireless networking. See the IWD section for more information, and view the IWD.NETWORK(5) manpage if you’re interested in writing manual connection files for IWD rather than going through IWCtl.

    Using ifupdown

    These instructions require and make use of ifupdown, iproute2, wpasupplicant (For WPA2 support), iw, and wireless-tools. Ensure you have all of these installed before continuing. You also might be interested in the instructions below that only use ifupdown and wpasupplicant, along with using a more advanced configuration. See #wpasupplicant

    Find your wireless interface and bring it up: (NOTE: wlp2s0 is an example, you will need to make sure to use the correct device name for your system)

    Scan for available networks and get network details (If you already know your wifi network id/ESSID, you can skip this step):

    Now edit /etc/network/interfaces. The required configuration is much dependent on your particular setup. The following example will work for most commonly found WPA/WPA2 networks:

    Bring up your interface and verify the connection:

    You can manually bring your interface up and down with the ifup and ifdown commands. If you added allow-hotplug wlp2s0 as in the example above, the interface will be brought up automatically at boot.

    For further information on available configuration options, see man interfaces, man iw, man wireless and /usr/share/doc/wireless-tools/README.Debian.

    WPS-PBC

    Find your WiFi network where WPS is enabled.

    Use wpa_cli to connect to the MAC address provided by the scan.

    Then press the WPS button on your access point to start the PBC mode.

    Once connected, start dhclient to obtain a dynamic IP address.

    wpa_supplicant

    wpa_supplicant is a WPA client and IEEE 802.1X supplicant.

    The wpasupplicant package provides wpa-*ifupdown options for /etc/network/interfaces. If these options are specified, wpa_supplicant is started in the background when your wireless interface is raised and stopped when brought down.

    GNOME and KDE users shouldn’t configure wpa_supplicant manually. Use NetworkManager as explained above.

    Before continuing, install the wpasupplicant package.

    WPA-PSK and WPA2-PSK

    Also known as «WPA Personal» and «WPA2 Personal» respectively.

    Restrict the permissions of /etc/network/interfaces, to prevent pre-shared key (PSK) disclosure (alternatively use a separate config file such as /etc/network/interfaces.d/wlan0 on newer Debian versions):

  • 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 following output and pipe(write) it to «/etc/wpa_supplicant/wpa_supplicant.conf»:

    Since wpa_supplicant v2.6, you need to add following in your /etc/wpa_supplicant/wpa_supplicant.conf in order to function sudo wpa_cli:

    you’ll need to copy from «psk=» to the end of the line, to put in your /etc/network/interfaces file.

    Quick connect to the configured network (doesn’t require ifupdown):

    Now you should have connected to the internet.

    Open /etc/network/interfaces in a text editor :

    Define appropriate stanzas for your wireless interface, along with the SSID and PSK HASH. For example : The «allow-hotplug» stanza will bring your interface up at system startup. If not desired, remove or comment this line.
    Save the file and exit the editor.

    Bring your interface up. This will start wpa_supplicant as a background process.

    Additional wpa-* options are described within /usr/share/doc/wpasupplicant/README.modes.gz. This should also be read if connecting to a network not broadcasting its SSID.

    For general /etc/network/interfaces information, see the interfaces(5) man page.

    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.

    Once available, reference your configuration file in /etc/network/interfaces. For example:

    More information can be found in the wpa_supplicant.conf(5) man page. A fully-commented wpa_supplicant configuration file example is at /usr/share/doc/wpasupplicant/README.wpa_supplicant.conf.gz.

    Switching Connections

    To switch between multiple distinct configurations:

    Use ifscheme. This integrates with the «Debian» way of doing networking, using ifup and /etc/network/interfaces, and allows you to set up different schemes for network configuration. See the manpage for more information: IFSCHEME(8)

    You can use guessnet(8) to switch profiles automatically by your location.

    Security consideration

    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.
    WEP is so insecure that it is basically equivalent to not using any encryption at all.

    WPA1 is deprecated. Use WPA2 instead.

    Make sure you use a strong pass-phrase.

    See Also

    WiFi/AdHoc — Establishing a WiFi network without an access point.

    Источник

    Читайте также:  Порт принтера по сети windows 10
    Оцените статью