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 / firewall_1_pre_network.service
Created March 6, 2023 16:56
Sur: Instalar reglas iptables
# Este servicio activa reglas con iptables llamando a un script
#
# Instalar con:
# systemctl enable firewall_1_pre_network.service
#
[Unit]
Description=Activar reglas iptables antes que la red
Wants=network-pre.target
Before=network-pre.target
@LuisPalacios
LuisPalacios / internet_wait.service
Last active June 3, 2025 20:10
Servicio systemd
# Este servicio comprueba si tengo acceso a internet y mientras que
# no lo tenga se queda esperando (sleep's de 1 seg). Es bastante útil
# cuando queremos que otros servicios esperen a tener internet.
#
# Crea el fichero /etc/systemd/system/internet_wait.service
# Instalar con:
# systemctl enable internet_wait.service
#
# En aquellos servicios que queremos que esperen a tener interent
# tenemos que modificar su fichero .service y añadir al final de
@LuisPalacios
LuisPalacios / 03-pihole-decos.conf
Created March 6, 2023 11:30
Sur: /etc/dnsmasq.d/03-pihole-decos.conf
##
## Fichero /etc/dnsmasq.d/03-pihole-decos.conf
## En Servidor ‘sur’
##
## Este fichero está relacionado con este apunte:
## https://www.luispa.com/linux/2014/10/19/bridge-ethernet.html
##
# DECOS
dhcp-range=set:decos,192.168.206.10,192.168.206.20,1h
@LuisPalacios
LuisPalacios / sur_cliente_bridge_ethernet_de_norte_DOWN.sh
Last active June 3, 2025 20:12
Sur: /etc/openvpn/client/sur_cliente_bridge_ethernet_de_norte_DOWN.sh
#!/bin/bash
##
## Fichero /etc/openvpn/client/sur_cliente_bridge_ethernet_de_norte_DOWN.sh
## En Servidor ‘sur’
##
## Este fichero está relacionado con este apunte:
## https://www.luispa.com/linux/2014/10/19/bridge-ethernet.html
##
@LuisPalacios
LuisPalacios / sur_cliente_bridge_ethernet_de_norte_UP.sh
Last active June 3, 2025 20:12
Sur: /etc/openvpn/client/sur_cliente_bridge_ethernet_de_norte_UP.sh
#!/bin/bash
##
## Fichero /etc/openvpn/client/sur_cliente_bridge_ethernet_de_norte_UP.sh
## En Servidor ‘sur’
##
## Este fichero está relacionado con este apunte:
## https://www.luispa.com/linux/2014/10/19/bridge-ethernet.html
##
@LuisPalacios
LuisPalacios / sur_cliente_bridge_ethernet_de_norte_CONFIG.sh
Last active June 3, 2025 20:12
Sur: /etc/openvpn/client/sur_cliente_bridge_ethernet_de_norte_CONFIG.sh
#!/bin/bash
##
## Fichero /etc/openvpn/client/sur_cliente_bridge_ethernet_de_norte_CONFIG.sh
## En Servidor ‘sur’
##
## Este fichero está relacionado con este apunte:
## https://www.luispa.com/linux/2014/10/19/bridge-ethernet.html
##
@LuisPalacios
LuisPalacios / sur_cliente_bridge_ethernet_de_norte.conf
Created March 6, 2023 11:15
Sur: /etc/openvpn/client/sur_cliente_bridge_ethernet_de_norte.conf
##
## Fichero /etc/openvpn/client/sur_cliente_bridge_ethernet_de_norte.conf
## En Servidor ‘sur’
##
## Este fichero está relacionado con este apunte:
## https://www.luispa.com/linux/2014/10/19/bridge-ethernet.html
##
# Cliente de un "Bridge Ethernet" OpenVPN
#
@LuisPalacios
LuisPalacios / vlans
Last active June 3, 2025 20:11
Sur: /etc/network/interfaces.d/vlans
##
## Fichero /etc/network/interfaces.d/vlans para Raspberry Pi OS 64 bits
## Servidor ‘sur’
##
## Este fichero está relacionado con este apunte:
## https://www.luispa.com/linux/2014/10/19/bridge-ethernet.html
##
## Relacionado: https://gist.github.com/LuisPalacios/7f36aa70890dbf9a9cb72fda3250ef7a
##
auto eth1.206
@LuisPalacios
LuisPalacios / dhcpcd.conf
Last active June 3, 2025 20:11
Sur: /etc/dhcpcd.conf
##
## Fichero /etc/dhcpcd.conf para Raspberry Pi OS 64 bits
## Servidor ‘sur’
##
## Este fichero está relacionado con este apunte:
## https://www.luispa.com/linux/2014/10/19/bridge-ethernet.html
##
## Configuración IP:
## `eth0` Recibe IP, DNS y Router vía DHCP
## `eth1` Puerto principal para TRUNK Vlans, sin IP:
@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`
# --------------------------------------------------
#
########################################################