ZebMcKayhan
Very Senior Member
Nat-start should be early enough but perhaps you need anI have being trying to use ipsets and while the routing rules
work perfectly and I can run cru to save the ipset the restore command is the problem.Code:iptables -t mangle -I PREROUTING -m set --match-set wg11-mac src -j MARK --set-mark 0x1000/0x1000 ip6tables -t mangle -I PREROUTING -m set --match-set wg11-mac src -j MARK --set-mark 0x1000/0x1000
The issue is not the script, rather I cannot get it to run early enough, i.e. before WireGuard so that the wg11-mac value is picked up and restored before wg11-up.sh is run
I have tried running the code in wan-event, nat-start and services-start and (in case loading entware was the issue) moved the saved version from /opt/tmp to /jffs/addons/wireguard. Nothing helps and I always get
Once the router is up, then I can re-run any of these (wan-event, nat-start and services-start or a stand alone script) and I then getCode:ipset list -n wg11-mac ipset v7.6: The set with the given name does not exist
Code:ipset list -n wg11-mac wg11-mac
It may be that the ipset module is busy with loading the Skynet ipsets or just that ipset is not yet functional when wgm starts. I can try disabling Skynet and trying again but for now, I have rebooted the router too many times for everyone's liking and will need to come back to this later.
sleep 10
before it to let other processes finish.You could also put it in wg11-route-up.sh which is executed just after wg11 is brought up and before rules and routes are put in.