Configurando un Mikrotik con Wireguard VPN

En este post te voy a mostrar como configurar wireguard vpn con un router mikrotik, el software para tu pc lo puedes descargar aqui

  1. Crear la interfaz WireGuard.- Para ello dentro de winbox vamos al menu Wireguard del panel izquierdo le damos en + New.
Name: wg-admin

Listen Port: 13231 (puede ser otro, este es el default)

MTU: deja default

Private Key: 👉 al dar apply se va generar la llave

✔️ Guarda

2. Asignar IP a la interfaz WireGuard

Abrimos IP –> addresses

Address: 172.16.10.1/24

Interface: wg-admin

Comment: Gateway VPN WireGuard

👉 OK

3.-Abrir el puerto WireGuard (Firewall) IP → Firewall → Filter Rules → +

🔹Pestaña General

Chain: input

Protocol: udp

Dst. Port: 13231

In. Interface: ether1

🔹 Pestaña Action

Action: accept

Comment: Allow WireGuard VPN

👉 OK

4. Permitir acceso VPN → red administrativa. IP → Firewall → Filter Rules → +

🔹 General

Chain: forward

In interface: wg-admin

out interface: ether3 (red administrativa)

🔹 Action

Action: accept

Comment: Allow wireguard to router

👉 OK

En nuestra PC descargamos wireguard y configuramos el peer:

[Interface]
PrivateKey = tu clave privada
Address = 172.16.10.3/32
DNS = 8.8.8.8

[Peer]
PublicKey = aquivalaclavepublica del Mikrotik al cual vamos a conectarnos
AllowedIPs = 0.0.0.0/0
Endpoint = la ippublica o DDNS del mikrotik:13231

en nombre ponemos el del router mikrotik al cual nos vamos a conectar.

Creamos el peer en Wireguard –> peer

guardamos y ejecutamos wireguard en nuestra pc

Deja un comentario