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 / pi_eth1_up.sh
Created March 7, 2023 11:16
Activar USB Dongle TP-Link UE300 GigabitEthernet en Raspberry Pi OS tras reboot
#!/bin/bash
## Con un par de Pi 4B v1.5 tengo problemas con el dispositivo
## TP-Link UE300 10/100/1000 LAN (ethernet mode) [Realtek RTL8153]
##
## Funciona perfectamente, pero al hacer reboot no lo activa. Sí que
## aparece en el bus USB pero no lo activa, por lo que el device
## eth1 no se me activa en el servidor.
##
## Este script lo soluciona :-)
@LuisPalacios
LuisPalacios / norte_firewall_inames.sh
Last active June 3, 2025 20:10
Norte: Script que define las interfaces para el firewall
#!/bin/bash
##
## /root/firewall/norte_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 / norte_firewall_clean.sh
Last active June 3, 2025 20:10
Norte: parte del firewall, limpia iptables
#!/bin/bash
#
## Servidor ‘norte’
##
## 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_post_network.service
Last active June 3, 2025 20:10
Norte: Servicio para la activación del firewall. Parte 2
# Este servicio activa reglas con iptables llamando a un script
#
# Instalar con:
# systemctl enable firewall_2_post_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 17:56
Norte: Servicio para la activación del firewall. Parte 1
# 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 / 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