Skip to content

Instantly share code, notes, and snippets.

@omauriciofala
Last active March 3, 2024 16:44
Show Gist options
  • Select an option

  • Save omauriciofala/511b1d33232e2cdbe543ab520584a563 to your computer and use it in GitHub Desktop.

Select an option

Save omauriciofala/511b1d33232e2cdbe543ab520584a563 to your computer and use it in GitHub Desktop.
gre-mikrotik
# GRE-MIKROTIK
===========================
# Definindo as variáveis
:local NOME "nome_da_iface_gre"
:local CLIENTE "ip_publico_do_cliente"
:local IP_TUNNEL "ip_local_do_tunnel"
# Configurando a interface Tunnel
/interface gre
add keepalive=5m10s name=$NOME remote-address=$CLIENTE
/ip address
add address=$IP_TUNNEL interface=$NOME
===========================
# GRE-HUAWEI-NE
===========================
# Definindo as variáveis
IP_TUNNEL2="ip_local_do_tunnel"
IP_LOOPBACK0="ip_do_loopback0"
SERVIDOR_GRE="ip_do_servidor_gre"
# Configurando a interface Tunnel
interface Tunnel21
description GRE-MIKROTIK
ip address $IP_TUNNEL2
tunnel-protocol gre
source $IP_LOOPBACK0
destination $SERVIDOR_GRE
# Configurando a interface LoopBack0
interface LoopBack0
binding tunnel gre
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment