Skip to content

Instantly share code, notes, and snippets.

@VTacius
Created March 16, 2020 20:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save VTacius/4d27faa0e0ce7a5fd53133b141088483 to your computer and use it in GitHub Desktop.
Save VTacius/4d27faa0e0ce7a5fd53133b141088483 to your computer and use it in GitHub Desktop.
Sobre la cuestión de router multi-tenant en Linux

Teniendo Tabla: PROVEEDOR Red interna: 10.10.21.0/24 Interfaz interna = enp6s0 Interfaz salida = enp2s0 Gateway final = 10.10.20.1

Se configura de la siguiente forma:

ip rule add from 10.10.21.0/24 table proveedor
ip route add 10.10.21.0/24 dev enp6s0 src 10.10.21.1 table proveedor
ip route add default via 10.10.20.1 dev enp2s0 table proveedor

Y se borra de la siguiente:

ip rule del from 10.10.21.0/24 table proveedor
ip route flush table proveedor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment