Dears,
first message in this forum, so I introduce myself. I currently have one hAP AC2 as router (running ROS 7.8), behind a fiber ONT in Spain.
I’ve sucessfully setup Surfshark Wireguard VPN, and now looking to implement a kill switch (if VPN connection is lost, VPN traffic is blackholed). I only have one device in my LAN going through the VPN, rest is non-VPN.
I’ve already gone through http://forum.mikrotik.com/t/nordlynx-server-wireguard-setup/156064/22 but I’m not getting it.
See my configuration bellow for Mangle - NAT, as well as routing - rules - tables.
I guess I’m missing something with rules?
Mangle
/ip firewall mangle
add action=mark-routing chain=prerouting disabled=yes new-routing-mark=
Surfshark_blackhole passthrough=yes src-address-list=Under_VPN
add action=change-mss chain=forward new-mss=clamp-to-pmtu out-interface=
WG-Surfshark passthrough=yes protocol=tcp tcp-flags=syn
add action=set-priority chain=postrouting new-priority=4 out-interface=vlan3
passthrough=yes
add action=set-priority chain=postrouting new-priority=1 out-interface=
pppoe-out1
NAT
/ip firewall nat
add action=masquerade chain=srcnat comment=“defconf: masquerade”
ipsec-policy=out,none out-interface-list=WAN
add action=masquerade chain=srcnat comment=masquerade-ovpn src-address=
192.168.76.0/24
add action=masquerade chain=srcnat comment=“default configuration”
out-interface-list=Vlan2&3
add action=masquerade chain=srcnat comment=masq-surfshark out-interface=
WG-Surfshark
ROUTE
/ip route
add disabled=no distance=1 dst-address=0.0.0.0/0 gateway=WG-Surfshark
pref-src=“” routing-table=Surfshark scope=30 suppress-hw-offload=no
target-scope=10
TABLE
/routing table
add disabled=no fib name=Surfshark
RULES
/routing rule
add action=lookup-only-in-table disabled=no interface=bridge src-address=
192.168.87.241/32 table=Surfshark
Thanks in advance for your support!
Regards,