Last active
December 4, 2024 11:41
-
-
Save LuisPalacios/b54b27d34e9f3c718eb27fc3de977559 to your computer and use it in GitHub Desktop.
Sur: Script que se ejecuta al tirar el túnel de acceso.
This file contains 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