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 / sur_firewall_clean.sh
Created March 6, 2023 17:03
Sur: Script parte del firewall /root/firewall/
#!/bin/bash
#
## Servidor ‘sur’
##
## Este fichero está relacionado con este apunte:
## https://www.luispa.com/linux/2014/10/19/bridge-ethernet.html
##
#
# Quita las iptables por completo, lo permite todo.
#
@LuisPalacios
LuisPalacios / firewall_2_pre_network.service
Created March 6, 2023 16:58
Sur: segunda para de la activación de reglas iptables durante el boot
# Este servicio activa reglas con iptables llamando a un script
#
# Instalar con:
# systemctl enable firewall_2_pre_network.service
#
[Unit]
Description=Activar reglas iptables despues de la red
Wants=network-online.target internet_wait.service
After=network-online.target internet_wait.service
@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 September 14, 2025 05:52
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
Last active September 13, 2025 10:46
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