Having a hard time setting up a wireguard connection
Hey, I'm trying to set up a wireguard tunnel to connect to my home network from the outside. Here are the commands I used:
/interface wireguard
add listen-port=24814 mtu=1420 name=Wg_Home
/interface wireguard peers
add allowed-address=192.168.110.3/32 client-address=192.168.110.3/32 \
client-allowed-address=0.0.0.0/0 client-dns=9.9.9.9 client-endpoint=\
x.x.x.x:24814 interface=Wg_Home name=Phone \
public-key="xxx="
I create the wireguard profile using the QR code and paste the phone's public key to peer options. The connection doesn't work and I believe it is because of the firewall or NAT:
/ip firewall filter
add action=accept chain=input comment="Accept wireguard home connections " \
dst-port=24814 in-interface-list=WAN protocol=udp
/ip firewall nat
add action=dst-nat chain=dstnat dst-port=24814 in-interface-list=WAN \
protocol=udp to-addresses=192.168.110.2 to-ports=24814
I have the wireguard firewall rule above the default WAN drop rule but it's not getting any matches when I try connecting. The NAT rule however gets a match everytime I try to connect. I'm not sure what is the problem here, if I should provide more information please tell me what. Thanks a lot
Wireguard interface IP=192.168.110.2