[2024-feb-29] Sad news: Eric Layton aka Nocturnal Slacker aka vtel57 passed away on Feb 26th, shortly after hospitalization. He was one of our Wiki's most prominent admins. He will be missed.

Welcome to the Slackware Documentation Project

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
howtos:network_services:running_an_access_point_from_a_slackware_box [2016/10/24 09:59 (UTC)] – [5.2 DHCP Leases] louigi600howtos:network_services:running_an_access_point_from_a_slackware_box [2022/05/02 12:39 (UTC)] – [3.3 Other Software] louigi600
Line 78: Line 78:
 ===== 3.3 Other Software ===== ===== 3.3 Other Software =====
   * hostapd   * hostapd
 +  * miniupnpd (only required if you have appliances that require it)
  
-Hostapd is not shipped with Slackware packages and is the only extra software you need for a basic setup.+Neither of these are included in the slackare installation packages, only hostap is mandatory to gae basic AP functionality
 To obtain hostapd you could either download a binary version from some reliable source or compile it from sources. You might be slightly better off compiling from sources, so that you get e fairly recent version, but it's up to you. Just don't try using really old hostapd versions like 0.6.7 on 2.6+ kernels: hostapd has followed the kernel wireless stack drivers and transitioned from only supporting FullMAC devices to supporting SoftMAC on almost all devices trough nl80211. Nowadays the combination of both hardware and driver supporting FullMAC is hard to come by (Prism2/2.5/3, and Atheros ar521x) all the others need to go the SoftMAC way so I suggest ignoring the 2 that could still go the FullMAC way and just go for SoftMAC for all, allowing you to use almost any WiFi card for creating an AP. If you like you can read more about [[http://wireless.kernel.org/en/developers/Documentation/mac80211 |  mac80211 here]]. To obtain hostapd you could either download a binary version from some reliable source or compile it from sources. You might be slightly better off compiling from sources, so that you get e fairly recent version, but it's up to you. Just don't try using really old hostapd versions like 0.6.7 on 2.6+ kernels: hostapd has followed the kernel wireless stack drivers and transitioned from only supporting FullMAC devices to supporting SoftMAC on almost all devices trough nl80211. Nowadays the combination of both hardware and driver supporting FullMAC is hard to come by (Prism2/2.5/3, and Atheros ar521x) all the others need to go the SoftMAC way so I suggest ignoring the 2 that could still go the FullMAC way and just go for SoftMAC for all, allowing you to use almost any WiFi card for creating an AP. If you like you can read more about [[http://wireless.kernel.org/en/developers/Documentation/mac80211 |  mac80211 here]].
  
-Hostapd sources can be downloaded from [[http://w1.fi/hostapd/ | here]], you should be looking at recent stable version (2.last time this article was edited) and avoid the development/old branches.+Hostapd sources can be downloaded from [[http://w1.fi/hostapd/ | here]], you should be looking at the most recent stable version (2.last time this article was edited) and avoid the development/old branches.
 Compiling hostapd is really simple: Compiling hostapd is really simple:
   - extract the sources   - extract the sources
Line 89: Line 90:
   - edit the defconfig file and enable any optional features you need (default is fine for a simple setup)   - edit the defconfig file and enable any optional features you need (default is fine for a simple setup)
   - copy the defconfig file to .config   - copy the defconfig file to .config
 +  - make a softlink for netlink includes (cd /usr/include; ln -s libnl3/netlink .)
   - make   - make
   - make install (or optionally just put in /usr/local/bin just the hostapd binary)   - make install (or optionally just put in /usr/local/bin just the hostapd binary)
Line 398: Line 400:
  
 It should then be possible to restart rc.inet1 (or just rc.inet1 wlan0_down and rc.inet1 wlan0_up) and the client should associate. It should then be possible to restart rc.inet1 (or just rc.inet1 wlan0_down and rc.inet1 wlan0_up) and the client should associate.
 +
 +There's also the command line alternative with wpa_cli in this example we'll assume that your client is totally unconfigured and wpa_supplicant is not running. We're going to do everything on the command line:
 +
 +  # wpa_supplicant -B -W -Dwext -i wlan0 -c /etc/wpa_supplicant.conf
 +  # wpa_cli
 +  wpa_cli v2.4
 +  Copyright (c) 2004-2015, Jouni Malinen <j@w1.fi> and contributors
 +  
 +  This software may be distributed under the terms of the BSD license.
 +  See README for more details.
 +  
 +  Selected interface 'wlan0'
 +  
 +  Interactive mode
 +  
 +  > scan
 +  OK
 +  <3>WPS-AP-AVAILABLE 
 +  > scan_results
 +  bssid / frequency / signal level / flags / ssid
 +  02:0c:42:f9:73:23       2412    -58     [WPA-PSK-CCMP][WPA2-PSK-CCMP][ESS]
 +  a4:51:6f:95:37:b6       2462    -58     [WPA2-PSK-CCMP][WPS][ESS]       Windows Phone0377
 +  00:0c:42:f9:73:23       2412    -62     [ESS]   Insecure-WiFi  
 +  >  add_network
 +  0
 +  > set_network 0 ssid "Windows Phone0377"
 +  OK
 +  > set_network 0 psk "passwordforcrappywindowsphone"
 +  OK
 +  > enable_network 0OK
 +  OK 
 +  <2>Trying to authenticate with a4:51:6f:95:37:b6 (SSID='Windows Phone0377' freq=2437 MHz)
 +  <2>Trying to associate with a4:51:6f:95:37:b6 (SSID='Windows Phone0377' freq=2437 MHz)
 +  <2>Associated with a4:51:6f:95:37:b6
 +  <2>WPA: Key negotiation completed with a4:51:6f:95:37:b6 [PTK=CCMP GTK=CCMP]
 +  <2>CTRL-EVENT-CONNECTED - Connection to a4:51:6f:95:37:b6 completed (reauth) [id=0 id_str=]
 +  > save_config
 +  OK
 +  > quit
 +  #
 +  
 +If all went right and your wpa_supplicant.conf file had 
 +  update_config=1
 +in it the above snippet would have saved the new network to wpa_supplicant.conf and associated you with it.
 +
 +Remember that if you're associating with an non secured AP you need to use this:
 +  > set_network 0 ssid "Insecure-WiFi"
 +  OK
 +  > set_network 0 key_mgmt NONE
 +  OK
 +  >
 +
  
 ==== 4.7.3 Other Linux Distributions Wireless Clients ==== ==== 4.7.3 Other Linux Distributions Wireless Clients ====
-I've tried various other flavor distributions ... most don't use wpa_gui for associating to AP but  some sort of other tool that generally pops up when you click on the icon that notifies the presence of an Access Point. After a few headaches I found that best association success is achieved by forcing setup for hidden AP even if the AP I'm configuring has not the hidden essid.+I've tried various other flavor distributions ... most don't use wpa_gui for associating to AP but  some sort of other tool that generally pops up when you click on the icon that notifies the presence of an Access Point. After a few headaches I found that best association success is achieved by forcing setup for hidden AP even if the AP I'm configuring has not the hidden essid. You can always use wpa_cli on the command line if it's shipped with whatever distro you prefer.
  
  
Line 517: Line 571:
   - disallow password authentication   - disallow password authentication
   - minimize your attack surfaces   - minimize your attack surfaces
-Net me give you a little reasoning for that list+Let me give you a little reasoning for the list.
  
 ===== 6.1 Use Non Standard Ports ===== ===== 6.1 Use Non Standard Ports =====
Line 919: Line 973:
 I'm not going to miss my old low end AP, are you ? I'm not going to miss my old low end AP, are you ?
 I replaced it with home-brew stuff from which this article is derived. I replaced it with home-brew stuff from which this article is derived.
-Over the years I've done several remakes adding some new features. The last upgrade was 8 programmable buttons with indicator leds to carry out arbitrary functions.+Over the years I've done several remakes adding some new features. The last upgrade was using a Friendlyelec NanoPi R1S with integrated wifi and 2 ethernet nics requiring no extra usb dongles. 
 + 
 +Gen 5 
 + 
 +{{howtos:network_services:g5_nanopi.jpeg| NanoPi R1S}} 
 + 
 +Gen 4 
 + 
 +{{howtos:network_services:g4_rpi.jpeg| RPi2 with shoft buttons}} 
 + 
 + 
 +Gen 3 
 + 
 +{{howtos:network_services:g3_rpi.jpg| RPi2 with hardware buttons}} 
 + 
 +Gen 2 
 + 
 +{{howtos:network_services:g2_rpi.jpg| RPi2}} 
 + 
 +Gen 1
  
-{{http://i246.photobucket.com/albums/gg113/louigi600/ARM/piwrap_zpshjjyflm8.jpg}} +{{howtos:network_services:g1_seagate_docstar.jpg| Seagate DocStart}}
-{{http://i246.photobucket.com/albums/gg113/louigi600/ARM/RPi2_2_zpsytug1dvq.jpg}} +
-{{http://i246.photobucket.com/albums/gg113/louigi600/ARM/Seagate_wrapStar_zpsf6047f16.jpg}}+
  
  
 howtos:network_services:running_an_access_point_from_a_slackware_box ()