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_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
@LuisPalacios
LuisPalacios / 03-pihole-decos.conf
Last active June 3, 2025 20:12
Pi-hole: Configuración DHCP para Decos Movistar
# Pi-hole: Configuración DHCP
# /etc/dnsmasq.d/03-pihole-decos.conf
#
# Este fichero está referenciado en este apunte:
# https://www.luispa.com/linux/2014/10/19/bridge-ethernet.html
#
# DECOS
# Rango
@LuisPalacios
LuisPalacios / 04-pihole-sur.conf
Last active June 3, 2025 20:12
Pi-hole: Configuración DHCP vlan eth1.10
# Pi-hole: Configuración DHCP
# /etc/dnsmasq.d/04-pihole-sur.conf
#
# Este fichero está referenciado en este apunte:
# https://www.luispa.com/linux/2014/10/19/bridge-ethernet.html
#
# SUR
# VLAN eth1.10
@LuisPalacios
LuisPalacios / 50-usb-realtek-net.rules
Created March 7, 2023 22:16
Cambiar la configuración de los adaptadores ethernet Realtek USB
# This is used to change the default configuration of Realtek USB ethernet adapters
ACTION!="add", GOTO="usb_realtek_net_end"
SUBSYSTEM!="usb", GOTO="usb_realtek_net_end"
ENV{DEVTYPE}!="usb_device", GOTO="usb_realtek_net_end"
# Modify this to change the default value
ENV{REALTEK_MODE1}="1"
ENV{REALTEK_MODE2}="3"
@LuisPalacios
LuisPalacios / watch_eth_bridge_con_norte.service
Created March 7, 2023 20:44
Sur: Vigila el túnel bridge ethernet con norte
# Documentado en:
# https://www.luispa.com/linux/2014/10/19/bridge-ethernet.html
#
[Unit]
Description=Vigilante Bridge Ethernet con Norte
Wants=network-online.target internet_wait.service
After=network-online.target internet_wait.service
[Service]
Type=simple
@LuisPalacios
LuisPalacios / watch_eth_bridge_con_norte.timer
Created March 7, 2023 20:42
Sur: Vigila el túnel bridge ethernet con norte
# Documentado en:
# https://www.luispa.com/linux/2014/10/19/bridge-ethernet.html
#
[Unit]
Description=Vigila y activa el tunel ethernet bridge con Norte
[Timer]
# Cuanto espero tras el boot para ejecutar por primera vez
OnBootSec=1min
# Tiempo entre ejecuciones
@LuisPalacios
LuisPalacios / watch_eth_bridge_con_sur
Last active March 12, 2023 10:52
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. 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.service
Created March 7, 2023 20:29
Norte: Vigila el túnel bridge ethernet con sur
[Unit]
Description=Vigilante Bridge Ethernet con Sur
Wants=network-online.target internet_wait.service
After=network-online.target internet_wait.service
[Service]
Type=simple
ExecStart=/usr/bin/watch_eth_bridge.sh $WATCH_ETH_BRIDGE_OPTS
EnvironmentFile=-/etc/default/watch_eth_bridge_con_sur