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 / watch_eth_bridge_con_norte
Last active June 3, 2025 20:11
Sur: Fichero de configuración para watch_eth_bridge_con_xxxxx.service
# /etc/default/watch_eth_bridge_con_norte
# Fichero de configuración para watch_eth_bridge_xxxxx.service
#
# Un ejemplo de caso de uso está descrito en este apunte:
# https://www.luispa.com/linux/2014/10/19/bridge-ethernet.html
#
# Opciones watch_eth_bridge.sh
# -l <name> Nombre DNS Público de este host (i.e. sur.midominio.com)
# -r <name> Nombre DNS Público del host remoto (i.e. norte.midominio.com)
# -b <interface> Nombre del interfaz utilizado para montar el BRIDGE
@LuisPalacios
LuisPalacios / watch_eth_bridge_con_sur
Last active June 3, 2025 20:11
Norte: Fichero de configuración para watch_eth_bridge_con_xxxxx.service
# /etc/default/watch_eth_bridge_con_sur
# Fichero de configuración para watch_eth_bridge_xxxxx.service
#
# Un ejemplo de caso de uso está descrito en este apunte:
# https://www.luispa.com/linux/2014/10/19/bridge-ethernet.html
#
# Opciones watch_eth_bridge.sh
# -l <name> Nombre DNS Público del este host (i.e. norte.midominio.com)
# -r <name> Nombre DNS Público del host remoto (i.e. sur.midominio.com)
# -b <interface> Nombre del interfaz utilizado para montar el BRIDGE
@LuisPalacios
LuisPalacios / sur_cliente_bridge_ethernet_de_norte_RT_DOWN.sh
Last active June 3, 2025 20:12
Sur: Fichero de apoyo al tirar el túnel bridge-ethernet
#!/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/client/sur_cliente_bridge_ethernet_de_norte_CONFIG.sh
##
## Equipos (Decos) que llegan a Movistar IPTV
##
ip rule del from ${bridge_ip_rango} table Decos 2>/dev/null
@LuisPalacios
LuisPalacios / sur_cliente_bridge_ethernet_de_norte_RT_UP.sh
Last active June 3, 2025 20:12
Sur: Fichero de apoyo al montar el túnel bridge-ethernet
#!/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/client/sur_cliente_bridge_ethernet_de_norte_CONFIG.sh
##
## Equipos (Decos) que llegan a Movistar IPTV
##
# Creo una tabla de routing dedicada
@LuisPalacios
LuisPalacios / sur_cliente_access_de_norte_DOWN.sh
Last active June 3, 2025 20:12
Sur: Script que se ejecuta al tirar el túnel de acceso.
#!/bin/bash
# Script que se ejecuta al tirar el tunel
#
# /etc/openvpn/client/sur_cliente_access_de_norte_DOWN.sh
#
# Documentado en:
# https://www.luispa.com/linux/2014/10/19/bridge-ethernet.html
#
# Interfaces, rutas + IP y MACs asociaré a las interfaces tap y bridge
@LuisPalacios
LuisPalacios / sur_cliente_access_de_norte_CONFIG.sh
Last active June 3, 2025 20:12
Sur: script de apoyo para crear un túnel de acceso
#!/bin/bash
#
# /etc/openvpn/client/sur_cliente_access_de_norte_CONFIG.sh
#
# Documentado en:
# https://www.luispa.com/linux/2014/10/19/bridge-ethernet.html
#
export ifNorteTunel="tun1"
export ipNorteTunelRouter="192.168.224.1"
@LuisPalacios
LuisPalacios / sur_cliente_access_de_norte_UP.sh
Last active June 3, 2025 20:12
Sur: Script que se ejecuta al levantar el tunel OpenVPN
#!/bin/bash
# Script que se ejecuta al levantar el tunel OpenVPN
#
# /etc/openvpn/client/sur_cliente_access_de_norte_UP.sh
#
# Documentado en:
# https://www.luispa.com/linux/2014/10/19/bridge-ethernet.html
#
# Interfaces, rutas + IP y MACs asociaré a las interfaces tap y bridge
. /etc/openvpn/client/sur_cliente_access_de_norte_CONFIG.sh
@LuisPalacios
LuisPalacios / sur_cliente_access_de_norte.conf
Last active June 3, 2025 20:12
Cliente de un tunel "Access Server" OpenVPN
#
# Configuración CLIENTE de un tunel "Access Server" OpenVPN
# Documentado en:
# https://www.luispa.com/linux/2014/10/19/bridge-ethernet.html
#
# Soy "cliente", expondré el device tun1
client
dev tun1
proto udp
@LuisPalacios
LuisPalacios / 01-pihole.conf
Created March 8, 2023 15:17
Pi-hole automatically generated file
# Pi-hole: A black hole for Internet advertisements
# (c) 2017 Pi-hole, LLC (https://pi-hole.net)
# Network-wide ad blocking via your own hardware.
#
# Dnsmasq config for Pi-hole's FTLDNS
#
# This file is copyright under the latest version of the EUPL.
# Please see LICENSE file for your rights under this license.
###############################################################################
@LuisPalacios
LuisPalacios / 02-pihole-dhcp.conf
Created March 8, 2023 15:16
Pi-Hole dhcp file automatically generated
###############################################################################
# DHCP SERVER CONFIG FILE AUTOMATICALLY POPULATED BY PI-HOLE WEB INTERFACE. #
# ANY CHANGES MADE TO THIS FILE WILL BE LOST ON CHANGE #
###############################################################################
dhcp-authoritative
dhcp-range=192.168.107.10,192.168.107.200,24h
dhcp-option=option:router,192.168.107.1
dhcp-leasefile=/etc/pihole/dhcp.leases
#quiet-dhcp