Skip to content

Instantly share code, notes, and snippets.

View LuisPalacios's full-sized avatar
🏠
Working from home

Luis Palacios Derqui LuisPalacios

🏠
Working from home
View GitHub Profile
@LuisPalacios
LuisPalacios / dhcpcd.conf
Last active June 3, 2025 20:08
Servidor Norte: /etc/dhcpcd.conf
##
## Fichero /etc/dhcpcd.conf para Raspberry Pi OS 64 bits
## Servidor ‘norte’
##
## Este fichero está relacionado con este apunte:
## https://www.luispa.com/linux/2014/10/19/bridge-ethernet.html
##
## Configuración IP:
## `eth0` con una dirección IP fija.
## `eth1` inicialmente sin servicio.
@LuisPalacios
LuisPalacios / norte_access_server.conf
Last active June 3, 2025 20:11
Norte: /etc/openvpn/server/norte_access_server.conf
## Este fichero está relacionado con este apunte:
## https://www.luispa.com/linux/2014/10/19/bridge-ethernet.html
#
# Configuración de "Access Server" de OpenVPN
#
# Server (Servidor de Acceso) exponiendo el siguiente
# rango dentro del tunel. Escucho en un puerto cualquiera libre.
server 192.168.224.0 255.255.255.0
@LuisPalacios
LuisPalacios / ipp.txt
Created March 6, 2023 08:09
Norte: /etc/openvpn/server/ipp.txt
cliente_sur,192.168.224.107,
@LuisPalacios
LuisPalacios / cliente_sur
Created March 6, 2023 08:10
Norte: /etc/openvpn/server/ccd/cliente_sur
# Nueva ruta a la que tengo acceso via `sur`, su LAN.
iroute 192.168.107.0 255.255.255.0
@LuisPalacios
LuisPalacios / norte_bridge_ethernet_server.conf
Last active September 13, 2025 10:47
Norte: /etc/openvpn/server/norte_bridge_ethernet_server.conf
# Configuración "Bridge Ethernet Server" de OpenVPN
# Fichero xxxxxxx_bridge_ethernet_server.conf
#
# Soy un Servidor que va a escuchar por un puerto (cualquiera libre)
server-bridge
port 12346
# Creo un device de tipo `tap` y uso udp como prortocolo.
dev tap206
proto udp
# Resto de parámetros del servidor
@LuisPalacios
LuisPalacios / norte_bridge_ethernet_server_CONFIG.sh
Last active June 3, 2025 20:11
Norte: /etc/openvpn/server/norte_bridge_ethernet_server_CONFIG.sh
#!/bin/bash
# Fichero xxxxxxx_bridge_ethernet_server_CONFIG.sh
# Este fichero contiene los nombres de las interfaces y parámetros de cada uno de
# ellas. Los utilizan los scripts de arranque y parada del servicio Bridge Ethernet
# Configuración General
export mtu="1492"
# Configuración para el tunel openvpn (interfaz tapXXX)
# Las direcciones MAC's pueden ser cualquiera, obviamente que no se usen en otro sitio.
@LuisPalacios
LuisPalacios / norte_bridge_ethernet_server_FW_CLEAN.sh
Created March 6, 2023 08:15
Norte: /etc/openvpn/server/norte_bridge_ethernet_server_FW_CLEAN.sh
#!/bin/bash
# Este script desactiva por completo el firewall a nivel 2 y 3
# Interfaces, rutas + IP y MACs asociaré a las interfaces tap y bridge
. /etc/openvpn/server/norte_bridge_ethernet_server_CONFIG.sh
# Elimino filtros L3 antiguos
for i in `echo ${EB_TAP} ${IF_IPTV}`; do
iptables -D INPUT -i ${i} -j ACCEPT 2> /dev/null
iptables -D FORWARD -i ${i} -j ACCEPT 2> /dev/null
@LuisPalacios
LuisPalacios / norte_bridge_ethernet_server_UP.sh
Last active September 14, 2025 05:48
Norte: /etc/openvpn/server/norte_bridge_ethernet_server_UP.sh
#!/bin/bash
# Script que se ejecuta al hacer un `start` del servicio Bridge Ethernet
# Interfaces, rutas + IP y MACs asociaré a las interfaces tap y bridge
. /etc/openvpn/server/norte_bridge_ethernet_server_CONFIG.sh
# Activo el tunel IPSec
ip link set ${EB_TAP} address ${mac_tap}
ip link set ${EB_TAP} up
ip link set ${EB_TAP} mtu ${mtu}
@LuisPalacios
LuisPalacios / norte_bridge_ethernet_server_DOWN.sh
Last active June 3, 2025 20:11
Norte: /etc/openvpn/server/norte_bridge_ethernet_server_DOWN.sh
#!/bin/bash
# Script que se ejecuta al hacer un `stop` del servicio Bridge Ethernet
# Interfaces, rutas + IP y MACs asociaré a las interfaces tap y bridge
. /etc/openvpn/server/norte_bridge_ethernet_server_CONFIG.sh
# Elimino filtros L2 y L3
/etc/openvpn/server/norte_bridge_ethernet_server_FW_CLEAN.sh
# Elimino la asociación de flujos RTSP a su helper
@LuisPalacios
LuisPalacios / igmpproxy.conf
Created March 6, 2023 10:36
Norte: /etc/igmpproxy.conf
## Este fichero está relacionado con este apunte:
## https://www.luispa.com/linux/2014/10/19/bridge-ethernet.html
#
########################################################
#
# Fichero de configuración de IgmpProxy para `norte`
# --------------------------------------------------
#
########################################################