Hi All,
Hope everyone is doing well!
For the past day or so, I’ve been trying to get Nordlynx (wireguard) working on my Mikrotik RB941-2nD. I am running the latest 7.11.2 firmware. Router is reset to default configuration, LAN and WLAN are bridged and i am loggin in as 192.168.88.1.
Having read various post on this forum, I have obtained my public / private keys for Wireguard and all is good.
The script i am using is as follows, but unfortunately i cannot get it to work. Can anyone spot what maybe wrong here or give a newbie some guidance?
/ip firewall address-list
add address=192.168.88.1 list=allow_vpn
/interface wireguard
add listen-port=38914 mtu=1420 name=wg0 private-key="ENTER PRIVATE KEY HERE "
/interface list
add name=WG
/routing table
add disabled=no fib name=useWG0
/interface list
member add interface=wg0 list=WG
/interface wireguard peers
add allowed-address=0.0.0.0/0 endpoint-address=uk1800.nordvpn.com endpoint-port=51820 interface=wg0 persistent-keepalive=25s public-key=“ENTER PUBLIC KEY HERE”
/ip address
add address=10.5.0.2/24 interface=wg0 network=10.5.0.0
/ip route
add disabled=no distance=1 dst-address=0.0.0.0/0 gateway=wg0 pref-src=0.0.0.0 routing-table=useWG0 scope=30 suppress-hw-offload=no target-scope=10
/ip firewall filter
add action=accept chain=forward comment=“defconf: accept in wireguard” connection-mark=useWG0 in-interface-list=WG out-interface-list=LAN place-before=[find where action=fasttrack-connection]
add action=accept chain=forward comment=“defconf: accept out wireguard” connection-mark=useWG0 in-interface-list=LAN out-interface-list=WG place-before=[find where action=fasttrack-connection]
/ip firewall mangle
add action=mark-connection chain=prerouting comment="defconf: wg0 mark (connection & routing) and mss change " new-connection-mark=useWG0 passthrough=yes src-address-list=allow_vpn
add action=mark-routing chain=prerouting connection-mark=useWG0 new-routing-mark=useWG0 passthrough=no src-address-list=allow_vpn
add action=change-mss chain=forward new-mss=clamp-to-pmtu out-interface-list=WG passthrough=yes protocol=tcp src-address-list=allow_vpn tcp-flags=syn
/ip firewall nat
add action=src-nat chain=srcnat comment=“defconf: lan → wg0 10.5.0.2” connection-mark=useWG0 out-interface-list=WG src-address=192.168.88.0/24 to-addresses=10.5.0.2 place-before=0
Thanks!