[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/09 00:12 (UTC)] – [3.3 Other Software] antares_alfes:howtos:network_services:running_an_access_point_from_a_slackware_box [2019/06/15 03:56 (UTC)] – [4.3 Servidores DNS y DHCP] antares_alf
Línea 92: Línea 92:
  
 Si está utilizando un compilador cruzado para apuntar al hardware que no es x86, asegúrese de haberlo configurado correctamente: si tiene problemas, puede intentar una compilación nativa ya que la construcción de hostapd es realmente simple y no requiere mucho hardware. Si está utilizando un compilador cruzado para apuntar al hardware que no es x86, asegúrese de haberlo configurado correctamente: si 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 File Integrity ==== +==== 3.3.1 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"  +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'
-====== 4 Configuring ====== +====== 4 Configurando ======
-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 128: 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 150: 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 159: 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 171: 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
Línea 184: Línea 184:
   * conf-dir=/etc/dnsmasq.d   * conf-dir=/etc/dnsmasq.d
  
-The options except-interface bind-interfaces and listen-address are particularly useful if you want to run more then one instance of dnsmasq. +Las opciones except-interface bind-interface y listen-address son particularmente útiles si desea ejecutar más de una instancia de dnsmasq. 
-For the bridge to work correctly don't forget to allow forwarding either by using rc.ip_forward or by executing +Para que el puente funcione correctamente, no olvide permitir el reenvío utilizando rc.ip_forward o ejecutando
   /bin/echo 1 > /proc/sys/net/ipv4/ip_forward   /bin/echo 1 > /proc/sys/net/ipv4/ip_forward
-See section 3.1.1 for the other useful run-time kernel parameters.+Mirar la sección 3.1.1 para los otros parámetros útiles del kernel en tiempo de ejecución.
  
 ===== 4.4 Firewalling ===== ===== 4.4 Firewalling =====
 es:howtos:network_services:running_an_access_point_from_a_slackware_box ()