Thx U so much.
The concern script as follows:
Code: Select all
# model = RB760iGS
/interface wireguard
add listen-port=13231 mtu=1420 name=WG-Surfshark
/ip pool
add name=dhcp_pool0 ranges=192.168.1.101-192.168.1.164
/ip dhcp-server
add address-pool=dhcp_pool0 interface=LAN name=LocalDHCP
/routing table
add disabled=no fib name=to-WGuard
/interface wireguard peers
add allowed-address=0.0.0.0/0 endpoint-address=hk-hkg.prod.surfshark.com \
endpoint-port=51820 interface=WG-Surfshark public-key=\
"JYHdktdtuM7inbtsxRKSDpnBVTWQ5+QLZ/cWWmf4VRg="
/ip address
add address=192.168.1.1/24 interface=LAN network=192.168.1.0
add address=10.14.0.2/16 interface=WG-Surfshark network=10.14.0.0
/ip dhcp-server network
add address=10.14.0.0/16 dns-server=162.252.172.57,149.154.159.92 gateway=\
10.14.0.1
/ip dns
set servers=162.252.172.57,149.154.159.92
/ip firewall mangle
add action=accept chain=forward out-interface=WG-Surfshark src-address=\
192.168.1.0/24
/ip firewall nat
add action=masquerade chain=srcnat out-interface=WG-Surfshark
/ip route
add check-gateway=bfd disabled=no dst-address=0.0.0.0/0 gateway=WG-Surfshark \
routing-table=to-WGuard suppress-hw-offload=no
/routing rule
add action=lookup disabled=no src-address=192.168.1.0/24 table=to-WGuard
No trafic found in /ip firewall nat but found in WG interface as you see in pictures Case I route a local IP to WG, the client cannot access internet any more.
Code: Select all
add action=mark-routing chain=prerouting dst-address-list=!DomesticIP \
dst-address-type=!local new-routing-mark=to-WGuard passthrough=no \
src-address=192.168.1.7
Code: Select all
#
# Use this configuration with WireGuard client
#
[Interface]
Address = 10.14.0.2/16
PrivateKey = <Private Key here>
DNS = 162.252.172.57, 149.154.159.92
[Peer]
PublicKey = JYHdktdtuM7inbtsxRKSDpnBVTWQ5+QLZ/cWWmf4VRg=
AllowedIPs = 0.0.0.0/0
Endpoint = hk-hkg.prod.surfshark.com:51820