Community discussions

MikroTik App
 
igorjob
just joined
Topic Author
Posts: 1
Joined: Mon Apr 11, 2022 6:30 am

Mikrotik wireguard as server and client at same time

Mon Apr 11, 2022 7:18 am

On hEX S (RB760iGS) with RouterOS v7.2 and firmware 7.2 trying to run:
* wireguard client to support tunnel to another site
* wireguard server to serve local users

Client config:
/interface/wireguard/add mtu=1420 name=wireguard_client private-key="***" listen-port=12345 
/ip/address/add interface=wireguard_client address=10.x.x.xx/24 network=10.x.x.x
/interface/wireguard/peers add interface=wireguard_client public-key="**" allowed-address=0.0.0.0/0 endpoint-address=x.x.x.x endpoint-port=xxxxx persistent-keepalive=25
Server config on same device:
/interface/wireguard/add listen-port=yyyyy mtu=1420 name=wireguard_srv
/ip/address/add address=192.168.100.1/24 interface=wireguard_srv network=192.168.100.0
/ip/firewall/filter/add action=accept chain=input dst-port=yyyyy protocol=udp
/interface/wireguard/peers/add allowed-address=192.168.100.100/32 interface=wireguard_srv public-key="***" comment="vpn client 1"
Mikrotik warguard client works good. Tunnel work and stable.
But i can't connect to router from android phone. With
/tool/sniffer
i see android phone wireguard handshake request, but there is no any answer from Mikrotik router. It seems that keys in android client correct.

Also one more question: How can i debug\monitor wireguard connections, status and so one. In /log/print there is no enough information.

Thank you.
ps. Sorry if it is double question, but i did't find similar situation on forum and in documentation.

Who is online

Users browsing this forum: Bing [Bot], Egate, johnson73, Majestic-12 [Bot], reinerotto and 79 guests