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_verifica_conectividad.sh
Last active June 3, 2025 20:11
Sur: Comprobar conectividad
#!/bin/bash
#
##
## /root/firewall/sur_verifica_conectividad.sh
##
## Script que configura iptables en un servidor Raspbian OS
##
## Este fichero está relacionado con este apunte:
## https://www.luispa.com/linux/2014/10/19/bridge-ethernet.html
##
@LuisPalacios
LuisPalacios / sur_firewall_1_pre_network.sh
Last active June 3, 2025 20:11
Sur: Script que configura iptables antes de que se active la red
#!/bin/bash
##
## /root/firewall/sur_firewall_1_pre_network.sh
##
## Script que configura iptables en un servidor Raspbian OS
##
## Este fichero está relacionado con este apunte:
## https://www.luispa.com/linux/2014/10/19/bridge-ethernet.html
##
@LuisPalacios
LuisPalacios / sur_firewall_inames.sh
Last active June 3, 2025 20:11
Sur: Nombres de interfaces para montar el firewall
#!/bin/bash
##
## /root/firewall/sur_firewall_inames.sh
##
## Script que configura iptables en un servidor Raspbian OS
##
## Este fichero está relacionado con este apunte:
## https://www.luispa.com/linux/2014/10/19/bridge-ethernet.html
##
@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
##