Diferencias
Muestra las diferencias entre dos versiones de la página.
Ambos lados, revisión anterior Revisión previa Próxima revisión | Revisión previa Próxima revisiónAmbos lados, revisión siguiente | ||
configuraciones:routerprincipal [2018/03/13 13:35] – /etc/init.d/servicio restart strysg | configuraciones:routerprincipal [2018/08/26 20:03] – [Configuración del Firewall] strysg | ||
---|---|---|---|
Línea 6: | Línea 6: | ||
===== Router principal con OpenWrt ===== | ===== Router principal con OpenWrt ===== | ||
+ | |||
+ | <WRAP center round important 60%> | ||
+ | El enrutador debería tener instalado el S.O. openwrt o similares, [[guias: | ||
+ | </ | ||
Su misión básica es enrutar todo el tráfico que va a/llega de LOR: además suele ser el router principal de la red, en el lugar donde se ubica el nodo. | Su misión básica es enrutar todo el tráfico que va a/llega de LOR: además suele ser el router principal de la red, en el lugar donde se ubica el nodo. | ||
Línea 26: | Línea 30: | ||
option proto ' | option proto ' | ||
# asignamos IPv4 al router | # asignamos IPv4 al router | ||
- | option ipaddr 10.64.7.1 | + | option ipaddr |
- | option netmask ' | + | |
# asignamos IPv6 al router | # asignamos IPv6 al router | ||
option ip6addr ' | option ip6addr ' | ||
Línea 65: | Línea 68: | ||
config plugin | config plugin | ||
option plugin ' | option plugin ' | ||
- | |||
- | config plugin | ||
- | option plugin ' | ||
# Anuncios nativos (IPv6) | # Anuncios nativos (IPv6) | ||
Línea 77: | Línea 77: | ||
# Anuncia aquí tu bloque IPv4 junto a una IP asignada al router (probablemente sea la IP gateway) | # Anuncia aquí tu bloque IPv4 junto a una IP asignada al router (probablemente sea la IP gateway) | ||
# El bloque completo pertenece aquí, no importa si subdividiste tu /27 o no. | # El bloque completo pertenece aquí, no importa si subdividiste tu /27 o no. | ||
+ | # Además, debes agregar en tun6address tu primera dirección del /56 asignado. | ||
config tunDev ' | config tunDev ' | ||
option tunDev ' | option tunDev ' | ||
option tun4Address ' | option tun4Address ' | ||
+ | option tun6Address ' | ||
# Receptor de anuncios por túnel (IPv4v6) | # Receptor de anuncios por túnel (IPv4v6) | ||
Línea 86: | Línea 88: | ||
option tunOut ' | option tunOut ' | ||
option network ' | option network ' | ||
- | option maxPrefixLen '30' | + | option maxPrefixLen '28' |
option minPrefixLen ' | option minPrefixLen ' | ||
+ | |||
+ | # Aceptar anuncios de redes IPv4v6 LOR (sólo anycast) | ||
+ | config tunOut | ||
+ | option tunOut ' | ||
+ | option network ' | ||
+ | option maxPrefixLen ' | ||
+ | option minPrefixLen ' | ||
+ | |||
+ | config tunOut | ||
+ | option tunOut ' | ||
+ | option network ' | ||
+ | option maxPrefixLen ' | ||
+ | option minPrefixLen ' | ||
# Experimental, | # Experimental, | ||
Línea 94: | Línea 109: | ||
option network ' | option network ' | ||
option maxPrefixLen ' | option maxPrefixLen ' | ||
- | option minPrefixLen '20' | + | option minPrefixLen '19' |
# Experimental: | # Experimental: | ||
Línea 103: | Línea 118: | ||
option minPrefixLen ' | option minPrefixLen ' | ||
+ | # Experimental: | ||
+ | config tunOut | ||
+ | option tunOut ' | ||
+ | option network ' | ||
+ | option maxPrefixLen ' | ||
+ | option minPrefixLen ' | ||
</ | </ | ||
Línea 118: | Línea 139: | ||
Para LOR, se necesita agregar una sola zona adicional: | Para LOR, se necesita agregar una sola zona adicional: | ||
- | * Zona LOR, accept/ | + | * Zona LOR, accept/ |
* Ésta zona involucra a todas las piezas de LOR, incluyendo redes abiertas o nubes LOR. | * Ésta zona involucra a todas las piezas de LOR, incluyendo redes abiertas o nubes LOR. | ||
* Crear una regla de traspaso (forwarding) desde LAN hacia LOR. | * Crear una regla de traspaso (forwarding) desde LAN hacia LOR. | ||
Línea 130: | Línea 151: | ||
option forward ' | option forward ' | ||
option output ' | option output ' | ||
- | option name 'lor' | + | option name 'laotrared' |
- | option network 'meshlocal' | + | option network 'laotrared' |
# La siguiente regla agrega a la zona LOR los túneles IPv4v6 que bmx7 crea: | # La siguiente regla agrega a la zona LOR los túneles IPv4v6 que bmx7 crea: | ||
- | list devices | + | list device |
config forwarding | config forwarding | ||
option src ' | option src ' | ||
- | option dest 'lor' | + | option dest 'laotrared' |
+ | |||
+ | config rule ' | ||
+ | option name ' | ||
+ | option src ' | ||
+ | option proto ' | ||
+ | option icmp_type ' | ||
+ | option family ' | ||
+ | option target ' | ||
+ | |||
+ | config rule ' | ||
+ | option name ' | ||
+ | option src ' | ||
+ | option proto ' | ||
+ | list icmp_type ' | ||
+ | list icmp_type ' | ||
+ | list icmp_type ' | ||
+ | list icmp_type ' | ||
+ | list icmp_type ' | ||
+ | list icmp_type ' | ||
+ | list icmp_type ' | ||
+ | list icmp_type ' | ||
+ | list icmp_type ' | ||
+ | list icmp_type ' | ||
+ | list icmp_type ' | ||
+ | option limit ' | ||
+ | option family ' | ||
+ | option target ' | ||
+ | |||
+ | config rule ' | ||
+ | option name ' | ||
+ | option src ' | ||
+ | option dest ' | ||
+ | option proto ' | ||
+ | list icmp_type ' | ||
+ | list icmp_type ' | ||
+ | list icmp_type ' | ||
+ | list icmp_type ' | ||
+ | list icmp_type ' | ||
+ | list icmp_type ' | ||
+ | list icmp_type ' | ||
+ | option limit ' | ||
+ | option family ' | ||
+ | option target ' | ||
+ | |||
+ | config rule ' | ||
+ | option target ' | ||
+ | option src ' | ||
+ | option name ' | ||
+ | option proto ' | ||
+ | option dest ' | ||
+ | option dest_port ' | ||
</ | </ | ||
- | Si quieres abrir una IP para recibir tráfico externo: | + | :!: Aplica los cambios con ''/ |
+ | |||
+ | === Abriendo una IP para recibir tráfico externo === | ||
+ | |||
+ | Si quieres abrir una IP para recibir tráfico externo | ||
* Agregar una regla de tráfico, sourcezone=LOR, | * Agregar una regla de tráfico, sourcezone=LOR, | ||
* Agregar una regla de tráfico, sourcezone=LOR, | * Agregar una regla de tráfico, sourcezone=LOR, | ||
+ | Esto se puede lograr fácilmente desde la interfaz gráfica del router (LUCI) o editando el archivo ''/ | ||
- | :!: Aplica los cambios con ''/ | + | **Abriendo IP desde LUCI** |
+ | En el panel de administración (abre un navegador web y coloca la IP del enrutador) ingresa a '' | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | Ahí se ven todas las reglas de tráfico y agregamos una en la sección que dice "New Forward Rule" con el nombre que queramos y hacemos click en "Add and edit". | ||
+ | |||
+ | {{ : | ||
+ | Luego se especifican los detalles de la nueva regla. | ||
+ | {{ : | ||
+ | |||
+ | Guardamos los cambios con "Save & Apply" | ||
+ | |||
+ | **Abriendo IP editando / | ||
+ | |||
+ | Si prefieres editar el archivo directamente puedes agregar las siguientes líneas modificando según la IP que requieras hacer pública: | ||
+ | |||
+ | <code bash> | ||
+ | config rule | ||
+ | option target ' | ||
+ | option src ' | ||
+ | option name ' | ||
+ | option dest_ip ' | ||
+ | option proto ' | ||
+ | option dest 'lan | ||
+ | </ | ||
+ | |||
+ | :!: Aplica los cambios con ''/ | ||
==== DNS ==== | ==== DNS ==== | ||
Línea 159: | Línea 263: | ||
list server '/ | list server '/ | ||
list server '/ | list server '/ | ||
- | | + | |
list server '/ | list server '/ | ||
+ | list server '/ | ||
# Servidor DNS global por defecto, si tienes internet. | # Servidor DNS global por defecto, si tienes internet. | ||
- | list server '8.8.8.8' # DNS de Google. Naturalmente, | + | list server '1.1.1.1' # DNS de CloudFlare. Naturalmente, |
| | ||
# Resolvedores adicionales, | # Resolvedores adicionales, | ||
- | list server '/ | ||
list server '/ | list server '/ | ||
- | list server '/ | ||
</ | </ | ||
:!: Aplica los cambios con ''/ | :!: Aplica los cambios con ''/ |