Quantcast
Channel: MikroTik
Viewing all articles
Browse latest Browse all 15434

Beginner Basics • Re: Wireguard LAN to LAN (one side behind NAT) not working

$
0
0
I've come back to this after not working on it for some time. I implemented the steps mentioned in an earlier reply and I now see Wireguard initiation packets being sent from B to A, but A never responds or initiates a tunnel.

My lab configs are as follows (anonymised)

A:
Code:
/interface ethernetset [ find default-name=ether3 ] name=ether1set [ find default-name=ether1 ] name=ether2set [ find default-name=ether2 ] name=ether3/interface wireguardadd listen-port=51820 mtu=1420 name=vpn-to-b/interface wireguard peersadd allowed-address=192.168.88.0/24,10.255.255.2/32 endpoint-port=51820 interface=vpn-to-b public-key="zW5HwHVFpqDwxRt1fKb/Yv+uSNKZhLXYnLm9TwwHsUA="/ip addressadd address=1.2.3.247/24 interface=ether1 network=1.2.3.0add address=192.168.77.1/24 interface=ether2 network=192.168.77.0add address=10.255.255.1/30 interface=vpn-to-b network=10.255.255.0/ip firewall filteradd action=accept chain=forwardadd action=accept chain=inputadd action=accept chain=output/ip firewall natadd action=masquerade chain=srcnat out-interface=ether1 src-address=192.168.77.0/24/ip routeadd distance=1 gateway=1.2.3.1add dst-address=192.168.88.0/24 gateway=vpn-to-b/system identityset name=RouterA

B:
Code:
/interface ethernetset [ find default-name=ether3 ] name=ether1set [ find default-name=ether1 ] name=ether2set [ find default-name=ether2 ] name=ether3/interface wireguardadd listen-port=51820 mtu=1420 name=vpn-to-a/interface wireguard peersadd allowed-address=192.168.77.0/24,10.255.255.1/32 endpoint-address=1.2.3.247 endpoint-port=51820 interface=\    vpn-to-a persistent-keepalive=35s public-key="2UZ1OE9TFaS0V/shFmTPKqLLgOeJjwovZZSbdsk/PhU="/ip addressadd address=10.0.0.1/24 interface=ether1 network=10.0.0.0add address=192.168.88.1/24 interface=ether2 network=192.168.88.0add address=10.255.255.2/30 interface=vpn-to-a network=10.255.255.0/ip firewall filteradd action=accept chain=forwardadd action=accept chain=inputadd action=accept chain=output/ip firewall natadd action=masquerade chain=srcnat out-interface=ether1 src-address=192.168.88.0/24/ip routeadd distance=1 gateway=10.0.0.2add dst-address=192.168.77.0/24 gateway=vpn-to-a/system identityset name=RouterB
I see lots of Wireguard handshake packets but the tunnel never establishes. Feels like the config is nearly right, what am I missing?

Statistics: Posted by btong — Thu Feb 29, 2024 12:06 am



Viewing all articles
Browse latest Browse all 15434

Trending Articles