So, I seem to have broken something here on my hAP Lite My router is still passing traffic (via vpn) but I can’t access the management anymore. I initially followed the published nordvpn tutorial and my last goal is to ensure no traffic can pass when the VPN is down
So, clearly I have misunderstood something. I guess I applied this to the wrong chain, and because my management IP is in the address list I want to NAT, I’ve screwed it up?
Regular traffic is passing through just fine.
What did I do wrong here?
Is there a way I can recover this, or do I need to factory reset? Thankfully, I ran export before applying!
Thanks for the fast response! I’ve not set up Winbox and figured it would probably be quicker to just wipe it and restore the config (which I also seemed to make a mess of, with duplicate configs etc when I was pasting my prior export..any best practice there appreciated!)
So, I am back to where I was, but I am still not sure why the blackhole config I added, stopped me getting access
You’ve answered yourself already: because you’ve put the rule to mangle chain output, which handles packets sent by the router itself. As the router’s own IP address is also covered by the subnet you’ve set as address in the address-list, whatever the router wants to send anywhere, including your management laptop, also gets the routing-mark and gets sent nowhere via the blackhole interface. Place the rule to mangle chain prerouting where it belongs and you should be OK. Packets for the router (which also pass through chain prerouting) are not affected by any routing-mark, and packets from the router are not handled by prerouting.
Fantastic, thankyou! I was tinkering with safe mode and it seemed to be OK with prerouting, but now I’ve committed the change and it works well. Plus now when the VPN drops and I try a new ping/new website it will fail and I see the traffic hitting the blackhole. I seem to recall in another thread, you suggested setting the blackhole route distance to 20. Any merit of doing that in this usecase?
Well, hopefully this will help someone else in the future. The best way to learn, is to break it first and then do it properly! (except in production, of course )
Well, there’s a type=blackhole route, and there’s a route with gateway=bridge-interface-named-blackhole, and each of these is used with a different VPN type. The type=blackhole one with some high value of distance makes sense when the traffic is routed through a VPN using some other route, i.e. if the VPN provides a virtual interface (L2TP, SSTP, …); the one with gateway=bridge-interface-named-blackhole is necessary for bare IPsec which needs the traffic to be routed via some interface (no matter which one) so that the IPsec policy’s traffic selector could match it.