Forked from LuisPalacios/sur_cliente_access_de_norte_DOWN.sh
Created
June 3, 2025 20:12
-
-
Save xergio/a207d6e6593c2ef65caabe7121f4f54e to your computer and use it in GitHub Desktop.
Sur: Script que se ejecuta al tirar el túnel de acceso.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Script que se ejecuta al tirar el tunel | |
# | |
# /etc/openvpn/client/sur_cliente_access_de_norte_DOWN.sh | |
# | |
# Documentado en: | |
# https://www.luispa.com/linux/2014/10/19/bridge-ethernet.html | |
# | |
# Interfaces, rutas + IP y MACs asociaré a las interfaces tap y bridge | |
. /etc/openvpn/client/sur_cliente_access_de_norte_CONFIG.sh | |
# Quito MASQUERADE para los clientes de LAN | |
iptables -t nat -D POSTROUTING -o ${ifNorteTunel} -j MASQUERADE | |
## Tabla de routing para la LAN | |
## | |
## Equipos que salen a internet vía el router de Movistar en NORTE | |
## | |
ip rule del from ${ipNorteLanRango} table Norte 2>/dev/null | |
ip route del default via ${ipNorteTunelRouter} table Norte 2>/dev/null | |
ip route del ${ipNorteLanRango} dev ${ifNorteLan} table Norte 2>/dev/null |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment