kisscommunity

kisscommunity.bvnf.space site sources
git clone git://bvnf.space/home/kiss/kisscommunity.git
Log | Files | Refs | Submodules | README | LICENSE

index.txt (7707B)


      1
      2
      3
      4
      5
      6
      7
      8
      9
     10
     11
     12
     13
     14
     15
     16
     17
     18
     19
     20
     21
     22
     23
     24
     25
     26
     27
     28
     29
     30
     31
     32
     33
     34
     35
     36
     37
     38
     39
     40
     41
     42
     43
     44
     45
     46
     47
     48
     49
     50
     51
     52
     53
     54
     55
     56
     57
     58
     59
     60
     61
     62
     63
     64
     65
     66
     67
     68
     69
     70
     71
     72
     73
     74
     75
     76
     77
     78
     79
     80
     81
     82
     83
     84
     85
     86
     87
     88
     89
     90
     91
     92
     93
     94
     95
     96
     97
     98
     99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
WPA_SUPPLICANT [0]
________________________________________________________________________________

wpa_supplicant is a cross-platform supplicant with support for WEP, WPA and WPA2
(IEEE 802.11i). It is suitable for desktops, laptops and embedded systems. It is 
the IEEE 802.1X/WPA component that is used in the client stations. It implements
key negotiation with a WPA authenticator and it controls the roaming and IEEE 
802.11 authentication/association of the wireless driver. 


Configuration
________________________________________________________________________________

Begin by first verifying that you have wpa_supplicant installed:

+------------------------------------------------------------------------------+
|                                                                              |
|   $ kiss b wpa_supplicant && kiss i wpa_supplicant                           |
|                                                                              |
+------------------------------------------------------------------------------+

At this point, you will want to create a wpa_supplicant file to store your 
wireless network information and credentials:

+------------------------------------------------------------------------------+
|                                                                              |
|   $ mkdir -p /etc/wpa_supplicant                                             |
|   $ touch /etc/wpa_supplicant/wpa_supplicant.conf                            |
|                                                                              |
+------------------------------------------------------------------------------+

The following wpa_supplicant.conf can be used as a *starter* configuration
file. Remember to replace the BSSID and PASSWORD with your actual wireless
network credentials.

+------------------------------------------------------------------------------+
|                                                                              |
|   # Allow users in the 'wheel' group to control wpa_supplicant               |
|   ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel                     |
|                                                                              |
|   # Make this file writable for wpa_gui / wpa_cli                            |
|   update_config=1                                                            |
|                                                                              |
|   network={                                                                  |
|          ssid="BSSID"                                                        |
|          psk="PASSWORD"                                                      |
|   }                                                                          |
|                                                                              |
+------------------------------------------------------------------------------+

For additional network requirements, refer to the "wpa_supplicant" Arch Linux 
Wiki page [0].


Generating a Passphrase
________________________________________________________________________________

NOTE: This section is not required but HIGHLY recommended since storing your
      password in clear text is not good practice. 

To allow for quicker connections to a network whose BSSID is already known, we
can make use of wpa_passphrase, a command line tool which generates the minimal
configuration needed by wpa_supplicant: 

+------------------------------------------------------------------------------+
|                                                                              |
|   $ wpa_passphrase BSSID PASSWORD                                            |
|                                                                              |
+------------------------------------------------------------------------------+

Replace BSSID and PASSWORD with your actual wireless network credentials. The 
output of this command can then be used to replace the network section of the 
wpa_supplicant.conf file created in the previous section (just remember to 
delete the line containing your password in clear text).


Manual Wireless Connection
________________________________________________________________________________

A new wireless connection can be manually started with the following command:

+------------------------------------------------------------------------------+
|                                                                              |
|   $ wpa_supplicant -B -i INTERFACE \                                         |
|                       -c /etc/wpa_supplicant/wpa_supplicant.conf             |
|                                                                              |
+------------------------------------------------------------------------------+

Replace INTERFACE with your appropriate wireless LAN interface name. After, 
use your preferred method to manually obtain an IP address. For example, when 
using dhcpcd, run the following:

+------------------------------------------------------------------------------+
|                                                                              |
|   $ dhcpcd INTERFACE                                                         |
|                                                                              |
+------------------------------------------------------------------------------+

The wireless status connection can be verified by reviewing the output of the
following command:

+------------------------------------------------------------------------------+
|                                                                              |
|   $ ifconfig                                                                 |
|                                                                              |
+------------------------------------------------------------------------------+


Managed Wireless Connection via dhcpcd
________________________________________________________________________________

Assuming that dhcpcd is already installed, busybox's runsv can be used to create 
new managed services for wpa_supplicant and dhcpcd:

+------------------------------------------------------------------------------+
|                                                                              |
|   $ ln -s /usr/share/dhcpcd/hooks/10-wpa_supplicant \                        |
|           /usr/lib/dhcpcd/dhcpcd-hooks/                                      |
|   $ ln -s /etc/sv/dhcpcd/ /var/service                                       |
|                                                                              |
+------------------------------------------------------------------------------+


Tips and Tricks
________________________________________________________________________________

* A list of possible INTERFACE names can be obtained by running the following:

  +----------------------------------------------------------------------------+
  |                                                                            |
  |   $ ls /sys/class/net                                                      |
  |                                                                            |
  +----------------------------------------------------------------------------+
  
* While testing arguments/configuration it may be helpful to launch 
  wpa_supplicant in the foreground (i.e. without the -B option) for better 
  debugging messages.


References
________________________________________________________________________________

[0] https://wiki.archlinux.org/index.php/wpa_supplicant