Further to my previous post I'm trying to set up a wireguard tunnel on an LtAP so that it can be accessed remotely using a private IP.
For clarity:
- The LtAP will initiate a wireguard connection to a data centre over the internet
- The wireguard IP of the LtAP will be in a private range local to the data centre
I set up a dstnat rule to change the destination IP of traffic coming from the wireguard interface (10.122.128.26) to the ip of the LtAP's (192.168.3.253 - ether1 is connected to another LAN which is providing internet access and this IP comes from DHCP there):
Code: Select all
/ip firewall nat
add action=dst-nat chain=dstnat comment="this is probably wrong" dst-address=10.122.128.26 log=yes to-addresses=192.168.3.253
Code: Select all
/ip route
add disabled=no distance=1 dst-address=10.122.0.0/16 gateway=wireguard1 routing-table=main suppress-hw-offload=no
I expected dstnat to magically track the connections and route packets back - am I missing something?
I suspect I'm wrong in using dstnat to transform the destination address to 192.168.3.253, and should instead use a different local IP?