Last active
November 23, 2024 14:15
-
-
Save LuisPalacios/3d898a5c7a9ce48eff77896763c99ecd to your computer and use it in GitHub Desktop.
Sur: Fichero de apoyo al montar el túnel bridge-ethernet
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 hacer un `start` del servicio Bridge Ethernet | |
# Interfaces, rutas + IP y MACs asociaré a las interfaces tap y bridge | |
. /etc/openvpn/client/sur_cliente_bridge_ethernet_de_norte_CONFIG.sh | |
## | |
## Equipos (Decos) que llegan a Movistar IPTV | |
## | |
# Creo una tabla de routing dedicada | |
grep -i "^206 Decos" /etc/iproute2/rt_tables > /dev/null 2>&1 | |
if [ "$?" = 1 ]; then | |
sudo echo "206 Decos" >> /etc/iproute2/rt_tables | |
fi | |
ip route add ${bridge_ip_rango} dev ${EB_BRIDGE} table Decos 2>/dev/null | |
ip route add default via ${bridge_ip_remota} table Decos 2>/dev/null | |
# Creo una regla que indica qué equipos deben usar dicha tabla de routing | |
ip rule add from ${bridge_ip_rango} table Decos 2>/dev/null |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment