[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

Diferencias

Muestra las diferencias entre dos versiones de la página.

Enlace a la vista de comparación

Ambos lados, revisión anteriorRevisión previa
Próxima revisión
Revisión previa
Próxima revisiónAmbos lados, revisión siguiente
es:howtos:network_services:running_an_access_point_from_a_slackware_box [2019/04/08 23:59 (UTC)] – [3.2 Slackware Packages] antares_alfes:howtos:network_services:running_an_access_point_from_a_slackware_box [2019/06/15 03:54 (UTC)] – [4.3 DNS and DHCP Servers] antares_alf
Línea 75: Línea 75:
  
  
-===== 3.3 Other Software =====+===== 3.3 Otro software =====
   * hostapd   * hostapd
 +Hostapd no se incluye con los paquetes de Slackware y es el único software adicional que necesita para una configuración básica.
 +Para obtener hostapd, puede descargar una versión binaria de alguna fuente confiable o compilarla desde las fuentes. Puede ser que sea un poco mejor compilando desde fuentes, de modo que obtenga una versión bastante reciente, pero depende de usted. Simplemente no intentes usar versiones muy antiguas de hostapd como 0.6.7 en 2.6+ kernels:hostapd ha seguido los controladores de pila inalámbrica del kernel y ha pasado de ser compatible con dispositivos FullMAC a SoftMAC en casi todos los dispositivos a través del nl80211. Hoy en día, la combinación de hardware y controlador compatible con FullMAC es difícil de conseguir (Prism2/2.5/3 y Atheros ar521x) todos los demás tienen que usar SoftMAC, por lo que sugiero ignorar los 2 que aún podrían hacerlo con FullMAC y solo ir a SoftMAC para todos, lo que le permite usar casi cualquier tarjeta WiFi para crear un AP. Si lo desea, puede leer más sobre [[http://wireless.kernel.org/en/developers/Documentation/mac80211 | mac80211 aquí]].
  
-Hostapd is not shipped with Slackware packages and is the only extra software you need for a basic setup. +Las fuentes de Hostapd se pueden descargar desde [[http://w1.fi/hostapd/ | aquí]], debería ver la versión estable reciente (2.5 la última vez que se editó este artículo) y evitar el desarrollo/las ramas antiguas. 
-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]].+Compilar hostapd es realmente simple:
  
-Hostapd sources can be downloaded from [[http://w1.fi/hostapd/ | here]], you should be looking at recent stable version (2.5 last time this article was edited) and avoid the development/old branches. +  extraer las fuentes 
-Compiling hostapd is really simple: +  - ingrese al árbol de origen (debería ver algo como estoCONTRIBUCIONES DE COPIA DE README hostapd/ patches/ src/) 
-  extract the sources +  - ingrese al subdirectorio hostapd (de aquí en adelante nos referiremos a esta carpeta como HOSTAPD_SOURCE_TREE) 
-  - enter the source tree (you should see something like thisCONTRIBUTIONS  COPYING  README  hostapd/  patches/  src/) +  - edite el archivo defconfig y habilite las funciones opcionales que necesite (la configuración predeterminada es buena para una configuración simple) 
-  - enter the hostapd sub-directory (we shall refer to this folder as HOSTAPD_SOURCE_TREE from here on+  - Copie el archivo defconfig .config
-  - edit the defconfig file and enable any optional features you need (default is fine for a simple setup+
-  - copy the defconfig file to .config+
   - make   - make
-  - make install (or optionally just put in /usr/local/bin just the hostapd binary)+  - make install (u opcionalmente solo coloque en /usr /local /bin solo el binario de hostapd)
  
-If you are using a cross compiler to target non x86 hardware make sure you have set it up to rightif you have trouble with that you can try a native build as building hostapd is really simple and not demanding on the hardware. +Si está utilizando un compilador cruzado para apuntar al hardware que no es x86, asegúrese de haberlo configurado correctamentesi tiene problemas, puede intentar una compilación nativa ya que la construcción de hostapd es realmente simple y no requiere mucho hardware. 
- +==== 3.3.1 Integridad de archivos ==== 
-==== 3.3.1 File Integrity ==== +Si su AP también actúa como un enrutador, probablemente estará expuesto a malware e incluso si hace todo lo posible por mantener los usuarios malintencionados fuera de su trabajo, es posible que todavía encuentren una forma de ingresarSi su enrutador está expuesto a Internet, es posible que desee considerar algún tipo de herramienta de integridad de archivos que le avise si los archivos han sido manipuladosLa verificación de la integridad de los archivos podría ser un artículo completo, por lo que no voy entrar en detalles más allá de recomendar que lea más sobre las comunidades orientadas a la seguridad como [[http: //www.securityfocus.com | security focus]] o tal vez solo hacer una búsqueda de google en 'herramienta de integridad de archivos'
-If your AP also acts router it's probably going to be exposed to malware and even if you do your best to keep malicious users out of your work they might still find way inIf your router is exposed to internet you might want to consider some sort of file integrity tool that would alert you if files have been tampered withFile integrity checking could be whole article so I'm not going to go into any detail beyond advising to read more about it on security oriented communities like [[http://www.securityfocus.com|security focus]] or maybe just do a google search on "file integrity tool"  +====== 4 Configurando ======
-====== 4 Configuring ====== +
-Now let's have a look at how to configure everything to that it will work right.+
  
 +Ahora veamos cómo configurar todo para que funcione correctamente.
 ===== 4.1 Hostapd ===== ===== 4.1 Hostapd =====
-Create hostapd folder inside /etc and copy into it a few files:+Cree una carpeta hostapd dentro de /etc y copie en ella algunos archivos:
   mkdir /etc/hostapd   mkdir /etc/hostapd
   cp HOSTAPD_SOURCE_TREE/hostapd.conf /etc/hostapd/hostapd.template   cp HOSTAPD_SOURCE_TREE/hostapd.conf /etc/hostapd/hostapd.template
   cp HOSTAPD_SOURCE_TREE/hostapd.wpa_psk /etc/hostapd/   cp HOSTAPD_SOURCE_TREE/hostapd.wpa_psk /etc/hostapd/
      
-Now supposing that wlan0 is the interface you will be using for creating the AP I suggest that you copy hostapd.template to wlan0.conf or br0.conf if it's bridged.+Ahora, suponiendo que wlan0 es la interfaz que utilizará para crear el AP, le sugiero que copie hostapd.template wlan0.conf br0.conf si está enlazado.
   cd /etc/hostapd   cd /etc/hostapd
   cp hostapd.template wlan0.conf   cp hostapd.template wlan0.conf
-alternatively just copy it to hostapd.conf ... but if you like to run several AP you might prefer to differentiate their config files.+como alternativa, simplemente cópielo en hostapd.conf ... pero si desea ejecutar varios AP, es posible que prefiera diferenciar sus archivos de configuración.
  
-These are the things you have-to edit in wlan0.conf+Estas son las cosas que usted tiene que editar en wlan0-conf
   * interface=wlan0   * interface=wlan0
   * driver=nl80211   * driver=nl80211
Línea 129: Línea 128:
   * wpa_ptk_rekey=600   * wpa_ptk_rekey=600
  
-This will use WPA-PSK/WPA2-PSK authenticationHave a look [[http://wireless.kernel.org/en/users/Documentation/hostapd|here]] in the section "A good starting point for a wpa wpa2 enabled access point is:" for more details on authentication.+Esto utilizará autenticación WPA-PSK/WPA2-PSK. Hecha un vistaso [[http://wireless.kernel.org/en/users/Documentation/hostapd|here]] en la sección "Un buen punto de inicio para un punto de acceso habilitado para wpa wpa2 es:" para más detalles sobre la autenticación.
  
-There are pros and cons for dealing with mac address filtering either with iptables or with mac ACL, to put it in really short terms the main difference is that doing it with iptables allows you to keep all filtering stuff in one place but has tendency to get lengthy if your network has many clients while doing it with mac ACL will require editing of separate file (containing just a newline separated list of mac addressesbut can really simplify things if you have several wired and wireless clinets.+Existen ventajas y desventajas al tratar con el filtrado de direcciones mac, ya sea con iptables o con mac ACL, para ponerlo en términos realmente breves, la principal diferencia es que hacerlo con iptables le permite mantener todas las cosas de filtrado en un solo lugar, pero tiene una tendencia prolongarse si su red tiene muchos clientes mientras lo hace con mac ACL requerirá la edición de un archivo separado (que contiene solo una lista de direcciones mac separadas en una nueva líneapero realmente puede simplificar las cosas si tiene varios clientes cableados e inalámbricas.
  
-The above hostapd configuration has mac ACL so if you followed it closely you should now create your /etc/hostapd/wlan0.accept containing a new line separated list of macs you wish to allow into your wireless networkFailing to do so will not allow any of your wireless clients to authenticate even with the correct credentials.+La configuración de hostapd anterior tiene mac ACL, por lo que si la sigue de cerca, ahora debe crear su /etc/hostapd/wlan0.accept que contiene una nueva lista de macs separados por líneas que desea permitir en su red inalámbricaNo hacerlo no permitirá que ninguno de sus clientes inalámbricos se autentique, incluso con las credenciales correctas.
  
-There is also an option for telling hostapd about bridging but the comment in hostapd.conf states: "If the bridge parameter is not setthe drivers will automatically figure out the bridge interface (assuming sysfs is enabled and mounted to /sys) and this parameter may not be needed"I followed that to the letter and ignored altogether  +También hay una opción para decirle a hostapd sobre el puente, pero el comentario en hostapd.conf dice: "Si el parámetro bridge no está establecidolos controladores descubrirán automáticamente la interfaz del bridge (suponiendo que sysfs esté habilitado y montado en /sys) y este parámetro puede no ser necesario"Lo seguí al pie de la letra y lo ignore por completo. 
-  #bridge=br0   +  #bridge=br0 
-and besides that we'll be brigding the interfaces after having setup the AP. I've not played with this option but I suspect that enabling it and/or brigding before starting up hostapd may result in having the wired clients mandated to using WPA too+y además de eso estaremos armando las interfaces después de haber configurado el AP. No he jugado con esta opción, pero sospecho que habilitarla y/o interrumpirla antes de iniciar hostapd puede resultar en que los clientes cableados tengan la obligación de usar WPA también
- +Ahora es el momento de lidiar con la frase de contraseña para asociarsehay más de una forma de tratar las contraseñas, pero me gusta usar wpa_psk_file ya que permite las contraseñas de NIC, e incluso tener contraseñas diferentes para sus diferentes estaciones wifiSi quieres mantener las cosas simples solo usa el MAC especial "00:00:00:00:00:00" que coincidirá con cada MAC, por lo tanto, tendrá la misma frase de contraseña para todos los clientesAquí hay un ejemplo:
-Now it's time to deal with the passphrase for associatingthere is more then one way of dealing with the passwords but I like to use wpa_psk_file as it allows per NIC passwordsand even have different passwords for your different Wifi staionsIf you want to keep things simple just use the special MAC "00:00:00:00:00:00" that will match with every MAC thus having the same passphrase for all the clientsHere's an example:+
  
   00:00:00:00:00:00 your_psk_for_all_stations   00:00:00:00:00:00 your_psk_for_all_stations
  
 +Ahora deberías estar listo para encender hostapd
  
-Now you should be ready to fire up hostapd 
   /usr/local/bin/hostapd -B /etc/hostapd/wlan0.conf   /usr/local/bin/hostapd -B /etc/hostapd/wlan0.conf
   iwconfig  wlan0   iwconfig  wlan0
Línea 151: Línea 149:
           Power Management:on           Power Management:on
  
-and iwconfig should report that the interface is in master modeIf this fails you either got an old version of hostapd that does not support nl80211 of your kernel lacks the necessary options for supporting nl80211.+iwconfig debe informar que la interfaz está en modo maestroSi esto falla, o bien tiene una versión anterior de hostapd que no es compatible con el nl80211 de su kernel le faltan las opciones necesarias para admitir nl80211. 
 + 
 +Si prefiere usar iw, este es el tipo de salida que debe tener:
  
-If you prefer to use iw instead this is the sort of output you should have: 
   iw dev wlan0 info   iw dev wlan0 info
   Interface wlan0   Interface wlan0
Línea 160: Línea 159:
         wiphy 0         wiphy 0
         channel 6 (2437 MHz) NO HT         channel 6 (2437 MHz) NO HT
-===== 4.2 Bridging ===== +===== 4.2 El puente ===== 
-Now it's time to bridge together wired and Wireless NICsIt's possible to use the native bridge setup from rc.inet1.conf but you may need to restart bridge after starting hostapd so here are the commands necessary to set it up manually.+Ahora es el momento de unir las NIC inalámbricas y por cableEs posible usar la configuración nativa del puente desde rc.inet1.conf, pero es posible que deba reiniciar el puente después de iniciar hostapd, por lo que aquí están los comandos necesarios para configurarlo manualmente.
  
   /usr/sbin/brctl addbr br0   /usr/sbin/brctl addbr br0
Línea 172: Línea 171:
  
  
-===== 4.3 DNS and DHCP Servers ===== +===== 4.3 Servidores DNS DHCP ===== 
-Now it's time to start dnsmasq. You can actually leave it running from boot if you like or even run specific servers at your choiceI now run separate dnsmasq instances for each AP so I've abandoned Slackware'rc.dnsmasq and start it from my custom network scripts which requires separate config files for each interface (like /etc/dnsmasq/br0.conf and /etc/dnsmasw/wlan1.conf). +Ahora es el momento de comenzar dnsmasq. Si lo desea, puede dejarlo ejecutándose desde el arranque o incluso ejecutar servidores específicos a su elección.Ahora ejecuto instancias dnsmasq separadas para cada AP, así que abandoné rc.dnsmasq de Slackware y lo inicio desde mis scripts de red personalizados que requieren archivos de configuración separados para cada interfaz (como /etc/dnsmasq/br0.conf /etc/dnsmasw/wlan1.conf). 
-Configuring it is something you should look into to suit best your networking needs ... let's just look at some of the most common tings. +La configuración es algo que debe considerar para adaptarse mejor a sus necesidades de red... Echemos un vistazo a algunos de los tings más comunes
-Supposing that you want to assign ip addresses belonging to 192.168.0.0/24 and this are the options you will need:+Suponiendo que desea asignar direcciones IP que pertenecen a 192.168.0.0/24 y estas son las opciones que necesitará:
  
   * interface=br0   * interface=br0
 es:howtos:network_services:running_an_access_point_from_a_slackware_box ()