[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.
Diferencias
Muestra las diferencias entre dos versiones de la página.
Ambos lados, revisión anteriorRevisión previaPróxima revisión | Revisión previa | ||
es: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 | es:howtos:network_services:running_an_access_point_from_a_slackware_box [2019/07/05 02:07 (UTC)] (actual) – [4.6 Dynamic DNS] antares_alf | ||
---|---|---|---|
Línea 93: | Línea 93: | ||
Si está utilizando un compilador cruzado para apuntar al hardware que no es x86, asegúrese de haberlo configurado correctamente: | Si está utilizando un compilador cruzado para apuntar al hardware que no es x86, asegúrese de haberlo configurado correctamente: | ||
==== 3.3.1 Integridad de archivos ==== | ==== 3.3.1 Integridad de archivos ==== | ||
- | Si su AP también actúa como un enrutador, probablemente estará expuesto a malware e incluso si hace todo lo posible por mantener a los usuarios malintencionados fuera de su trabajo, es posible que todavía encuentren una forma de ingresar. Si 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 manipulados. La verificación de la integridad de los archivos podría ser un artículo completo, por lo que no voy a entrar en detalles más allá de recomendar que lea más sobre las comunidades orientadas a la seguridad como [[http: // | + | Si su AP también actúa como un enrutador, probablemente estará expuesto a malware e incluso si hace todo lo posible por mantener a los usuarios malintencionados fuera de su trabajo, es posible que todavía encuentren una forma de ingresar. Si 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 manipulados. La verificación de la integridad de los archivos podría ser un artículo completo, por lo que no voy a entrar en detalles más allá de recomendar que lea más sobre las comunidades orientadas a la seguridad como [[http:// |
====== 4 Configurando ====== | ====== 4 Configurando ====== | ||
Línea 184: | Línea 184: | ||
* conf-dir=/ | * conf-dir=/ | ||
- | The options | + | Las opciones |
- | For the bridge to work correctly don't forget to allow forwarding either by using rc.ip_forward | + | Para que el puente funcione correctamente, |
/bin/echo 1 > / | /bin/echo 1 > / | ||
- | See section | + | Mirar la sección |
- | + | ||
- | ===== 4.4 Firewalling ===== | + | |
- | Now is a good time to configure your firwall protection. | + | |
- | Supposing that the box will be routing packages thought it I'll show some rules that you might find helpfull. | + | |
- | This is the output of iptables-save, | + | |
- | The iptables-save/ | + | |
+ | ===== 4.4 Cortafuegos ===== | ||
+ | Ahora es un buen momento para configurar su protección de firewall. | ||
+ | Suponiendo que la caja estará enrutando paquetes, creo que le mostraré algunas reglas que le pueden resultar útiles. | ||
+ | Esta es la salida de iptables-save, | ||
+ | Iptables-save / iptables-restore es una forma práctica de mantener la configuración para una fácil activación y edición del cortafuegos. | ||
| | ||
*mangle | *mangle | ||
Línea 225: | Línea 224: | ||
COMMIT | COMMIT | ||
- | NOTE *: Clamping | + | NOTA *: La fijación de MSS a PMTU puede hacer que la navegación por Internet funcione desde su LAN, pero puede frenar los paquetes |
- | I generally put the content above in / | + | Generalmente pongo el contenido arriba en / |
- | If you want to manage your AP via ssh now is a good time to restart | + | Si desea administrar su AP a través de ssh ahora es un buen momento para reiniciar |
/ | / | ||
- | If you're going to share internet connection you might want to stop ssh access from internet by adding | + | Si va a compartir la conexión a Internet, es posible que desee detener el acceso a ssh desde Internet agregando una regla de firewall |
- | Longer | + | Las cadenas de iptabls |
ListenAddress 192.168.0.1 | ListenAddress 192.168.0.1 | ||
+ | En este punto, debe poder asociar clientes al AP. | ||
+ | Con las reglas de iptables anteriores, el cliente con MAC 0a: | ||
+ | Otra forma de implementar MAC ACL aún más compleja para decidir quién administra AP, quién solo puede enrutar y quién puede hacer ambas cosas se puede hacer mediante ebtables (es necesario agregar eso a la lista de software que no está presente en Slackware) y jugar con el cadena de broute En todos los casos, puede encontrar interesante el [[http:// | ||
- | At this point you should be able to associate clients to the AP. | + | Si no desea la ACL de la dirección |
- | With the above iptables rules client with MAC 0a: | + | |
- | client with MAC 00: | + | |
- | An other way to implement even more complex MAC ACL to decide who manages | + | |
- | |||
- | |||
- | If you don't want MAC address ACL or you only implement MAC ACL for the AP you could replace | ||
- | | ||
-A INPUT -p icmp -s 192.168.1.0/ | -A INPUT -p icmp -s 192.168.1.0/ | ||
-A INPUT -p tcp --dport 53 -s 192.168.0.0/ | -A INPUT -p tcp --dport 53 -s 192.168.0.0/ | ||
Línea 252: | Línea 247: | ||
-A FORWARD -m mac --mac-source 00: | -A FORWARD -m mac --mac-source 00: | ||
- | With something like this | + | Con algo como esto |
| | ||
-A INPUT -p all -i br0 -j ACCEPT | -A INPUT -p all -i br0 -j ACCEPT | ||
-A FORWARD -p all -i br0 -j ACCEPT | -A FORWARD -p all -i br0 -j ACCEPT | ||
- | Most off the shelf AP also let you do a number of port forwarding, this is also an iptables | + | La mayoría de los AP disponibles también le permiten hacer una cantidad de reenvío de puertos, esto también es un trabajo de iptables. |
- | + | ||
-A FORWARD -p tcp -d 192.168.0.2 -m multiport --dports 80,443 -j ACCEPT -m comment --comment "allow http traffic to be routed thought the box only to the correct server" | -A FORWARD -p tcp -d 192.168.0.2 -m multiport --dports 80,443 -j ACCEPT -m comment --comment "allow http traffic to be routed thought the box only to the correct server" | ||
- | and a rule like this in the PREROUTING | + | y una regla como esta en la cadena |
| | ||
-A PREROUTING -p tcp -m multiport --dports 80,443 -j DNAT --to-destination 192.168.0.2 -m comment --comment "nat incomming http requests to local destination before routing" | -A PREROUTING -p tcp -m multiport --dports 80,443 -j DNAT --to-destination 192.168.0.2 -m comment --comment "nat incomming http requests to local destination before routing" | ||
- | To understand how this works you need to look at the [[http:// | + | Para entender cómo funciona esto, debe consultar el [[http:// |
- | As a http request arrives to the AP from the internet link it will first have the DNAT changed in the nat prerouting stage, but it would get dropped by the filter policy if we don't find a way to let it in, that's where the forward filter rule comes in to play. | + | Cuando una solicitud |
+ | |||
+ | Si comienza a volverse loco con la transferencia de archivos grandes a través de redes rápidas para un problema que parece estar relacionado con mtu pero no es posible que desee considerar la posibilidad de desactivar net.ipv4.tcp_sack. | ||
- | If you start going crazy over transferring large files over fast networks for a problem that seems like mtu related but is not you might want to consider turning net.ipv4.tcp_sack off. | + | Si su ISP le da algún tipo de cuota de tráfico, es posible que desee agregar algunas cuotas |
- | If your ISP gives you some sort of traffic quota you may want to add some quotas to your firewall configuration. You may fully understand the consequences of streaming on your ISP quota but maybe the rest of the family may not: giving them a quota might save you a fit when you need to do an urgent job that requires internet connection. There a re various ways you could go about putting quotas on specific clients on your LAN just keep in mind a few things: | + | |
- | | + | * el lavado de sus tablas reiniciará todos los contadores de cuotas |
- | * flushing your tables will reset all quota counters | + | * los contadores de cuota no se reinician cuando su ISP restablece su cuota de Internet |
- | * quota counters do not reset themselves whenever your ISP resets your internet quota | + | |
- | Here's an example of how you could go about putting a quota on the FORWARD | + | Este es un ejemplo de cómo podría poner una cuota en la cadena |
| | ||
-A FORWARD -p all -m conntrack --ctstate ESTABLISHED, | -A FORWARD -p all -m conntrack --ctstate ESTABLISHED, | ||
Línea 284: | Línea 279: | ||
-A FORWARD -s 192.168.0.200 -d 192.168.0.0/ | -A FORWARD -s 192.168.0.200 -d 192.168.0.0/ | ||
- | Or you could use a user-defined chain to group all your quoted traffic into a single quota like this: | + | O puede usar una cadena definida por el usuario para agrupar todo su cuota de tráfico en una sola cuota como esta: |
| | ||
-A FORWARD -d 192.168.1.0/ | -A FORWARD -d 192.168.1.0/ | ||
Línea 291: | Línea 286: | ||
-A QUOTA -m comment --comment "when quota is exceeded start rejecting" | -A QUOTA -m comment --comment "when quota is exceeded start rejecting" | ||
- | Along with this you need to flush the iptables | + | Junto con esto, debe vaciar los contadores de iptables |
iptables -Z | iptables -Z | ||
- | I generally do this with an AT job because | + | |
- | Here's one possible way of making an AT job re schedule itself every day at 00:30: | + | Generalmente hago esto con un trabajo de AT porque |
+ | Aquí hay una manera posible de hacer que un trabajo de AT se programe todos los días a las 00:30: | ||
# cat / | # cat / | ||
/ | / | ||
/usr/bin/at -f / | /usr/bin/at -f / | ||
# | # | ||
- | Just run it once and it should then re schedule itself. On a readonly system you will need to have atjobs directory on tmpfs and run it the first time from rc.local. | ||
+ | Simplemente ejecútelo una vez y luego debería volver a programarse. En un sistema de solo lectura, deberá tener el directorio atjobs en tmpfs y ejecutarlo la primera vez desde rc.local. | ||
===== 4.5 PPP ===== | ===== 4.5 PPP ===== | ||
- | Tectonically you're not going to need this on a pure access point (AP) but it's common that the AP also acts as router for your internet access, in this case you will need to configure your PPP link from your AP. | + | Tectónicamente, |
- | Depending on how your ISP provides your internet access you might or might not have an external modem which may or may not understand | + | Dependiendo de la forma en que su ISP le brinde acceso a Internet, puede tener o no un módem externo que puede o no entender el protocolo |
- | If you have installed both ppp and rp-pppoe | + | Si ha instalado tanto ppp como rp-pppoe, encontrará que la mayoría de la configuración ya se ha realizado con las opciones más comunes en / |
- | To do this you need to create a file in / | + | Para hacer esto, necesita crear un archivo en / |
| | ||
plugin rp-pppoe.so | plugin rp-pppoe.so | ||
Línea 340: | Línea 336: | ||
updetach | updetach | ||
- | If your ISM charges you based on time rather than band usage you might want to uncomment the idle and demand options so that the PPP connection will not stay alive when it's not actually in use. | + | Si su ISM le cobra por tiempo en lugar del uso de la banda, es posible que desee descomentar las opciones de inactividad y demanda para que la conexión |
- | Pot as much as you can here in the peer and as little as possible in the / | + | Haga lo mejor que pueda aquí en el par y tan poco como sea posible en el archivo |
- | If these options do not work for you I suggest you read the / | + | Si estas opciones no funcionan para usted, le sugiero que lea la documentación |
- | We're not done yet we need to edit pap-secrets | + | Aún no hemos terminado. Necesitamos editar |
- | | ||
# Secrets for authentication using PAP | # Secrets for authentication using PAP | ||
# client | # client | ||
" | " | ||
- | You can now fire up your internet connection with | + | Ahora puede activar su conexión a Internet con |
pppd call telco | pppd call telco | ||
- | ===== 4.6 Dynamic | + | ===== 4.6 DNS Dinámico |
- | If you are going to do the port forwarding thing and if you ISP is not giving you a static | + | Si va a hacer el reenvío de puertos y si su ISP no le proporciona una IP estática, es posible que desee utilizar algún tipo de servicio de DNS dinámico para que las personas puedan acceder al servicio que está reenviando. |
- | There are many free dynamic | + | |
+ | Hay muchos proveedores de servicios | ||
* http:// | * http:// | ||
* http:// | * http:// | ||
Línea 363: | Línea 360: | ||
- | Most give you a client for managing the update | + | La mayoría le brinda un cliente para administrar la actualización... todo lo que necesita hacer es organizar que el cliente se ejecute desde el enrutador o desde cualquier otra PC de su LAN con acceso a Internet. |
- | + | ||
===== 4.7 Configuring Clients ===== | ===== 4.7 Configuring Clients ===== | ||
For the client side configurations there are many ways too, to keep things simple let's just go about it by using wpa_supplicant. Remember that regardless of whether it's a wired or wireless client: if you're using managing MAC ACL from iptables your client' | For the client side configurations there are many ways too, to keep things simple let's just go about it by using wpa_supplicant. Remember that regardless of whether it's a wired or wireless client: if you're using managing MAC ACL from iptables your client' |