I have 2 Mikrotiks:
1. hap ac2, installed in my home. Wireguard server.
2. mAP Lite, my road warrior router. Wireguard client.
When I go somewhere I take my road warrior with me and forward all my traffic to my home router via wireguard VPN.
But sometimes It cannot complete wireguard handshake with my home router.
For instance, I arrive to the hotel and turn on my mAP Lite. After that I try to ping something using wireguard interface:
Code: Select all
ping address=8.8.8.8 interface=WgHome
But if I try to ping something using WAN interface, it is successful.
I think sometimes(!) my mAP Lite is not able to complete wireguard handshake.
But finally, I connect my laptop to the hotel wifi and make a direct wireguard connection from my laptop to my home router (using another peer record) without any problems. Then I just go to my home mikrotik and try to disable-enable wireguard peer which is used by my mAP Lite. Usually it fixes my problem and I have my mAP Lite completed handshake and working VPN.
But what is the problem exactly? My laptop never has any problems with wireguard connection and I don’t need to do any extra activities.
My mAP Lite wireguard configuration:
Code: Select all
/interface wireguard
add disabled=yes listen-port=13232 mtu=1420 name=AnotherWG
add listen-port=13231 mtu=1420 name=WgHome
/interface wireguard peers
add allowed-address=0.0.0.0/0 comment="My home" endpoint-address=hidden endpoint-port=14142 interface=WgHome persistent-keepalive=10s public-key="hidden"
add allowed-address=0.0.0.0/0 comment="Another peer" disabled=yes endpoint-address=hidden endpoint-port=12330 interface=AnotherWg persistent-keepalive=10s public-key="hidden"
Code: Select all
/interface wireguard
add comment="Wireguard connection to Frankfurt" listen-port=13231 mtu=1420 name=Frankfurt
add comment="Selectel wg" listen-port=13232 mtu=1420 name=Selectel
add comment="Wireguard for home" listen-port=14142 mtu=1420 name=WgServer
/interface wireguard peers
add allowed-address=0.0.0.0/0 comment="For work" endpoint-address=hidden endpoint-port=51820 interface=Frankfurt public-key="hidden"
add allowed-address=172.17.100.0/24,172.17.9.0/24,10.255.148.0/24 comment="For work" endpoint-address=hidden endpoint-port=51820 interface=Selectel persistent-keepalive=10s public-key="hidden"
add allowed-address=192.168.100.11/32 comment=MBP interface=WgServer persistent-keepalive=10s public-key="hidden"
add allowed-address=192.168.100.10/32 comment="For my friend1" interface=WgServer persistent-keepalive=10s public-key="hidden"
add allowed-address=192.168.100.12/32 comment="For my friend2" interface=WgServer persistent-keepalive=10s public-key="hidden"
add allowed-address=192.168.100.13/32 comment="For my friend3" interface=WgServer public-key="hidden"
add allowed-address=192.168.100.14/32 comment="For my friend4" interface=WgServer persistent-keepalive=10s public-key="hidden"
add allowed-address=192.168.100.15/32 comment="mAP Lite" interface=WgServer persistent-keepalive=10s public-key="hidden"
On my hap ac2 I have a lot of peers and two connections. mAP Lite connects to WgServer interface and known as Peer with comment "mAP Lite"