ok, so I managed to import my VPN client, wg11. set it to policy mode and add rules to route my subnet 192.168.1.1/24 via VPN but the rest via WAN. this works great!
then I added my 2 ipsets (attempting to run these through WAN) but this has basically no effect:
	
	
	
		Code:
	
	
		E:Option ==> peer wg11
        Peers (Auto=P - Policy, Auto=X - External i.e. Cell/Mobile)
Client  Auto  IP              Endpoint                   DNS          MTU   Public                                        Private                                       Annotate
wg11    P     10.0.69.214/24  wireguard.5july.net:48574  192.168.1.1  1420  <hidden>                                        <hidden>  # N/A
        Selective Routing RPDB rules
ID  Peer  Interface  Source          Destination     Description
2   wg11  WAN        0.0.0.0/0       192.168.1.1/16  local WAN
3   wg11  VPN        192.168.1.1/24  Any             LAN to VPN
IPSet        Enable  Peer  FWMark  DST/SRC
NETFLIX-DNS  Y       wg11  0x8000  dst
MYIP         Y       wg11  0x8000  dst
        WireGuard ACTIVE Peer Status: Clients 1, Servers 0
E:Option ==> ipset
        Table:ipset Summary
Total  IPSet
1      MYIP
1      NETFLIX-DNS
Total  IPSet        Peer
1      MYIP         wg11
1      NETFLIX-DNS  wg11
FWMark  Interface
0x1000  wg11
0x2000  wg12
0x4000  wg13
0x7000  wg14
0x3000  wg15
0x8000  wan
	 
 
so checking the iptables if the mark is set:
	
	
	
		Code:
	
	
		admin@RT-AC86U-D7D8:/tmp/mnt/UsbDrv/entware/etc/wireguard# iptables -t mangle -L -v
Chain PREROUTING (policy ACCEPT 24275 packets, 11M bytes)
pkts bytes target     prot opt in     out     source               destination
4201 2612K MARK       all  --  wg11   any     anywhere             anywhere             /* WireGuard 'client' */ MARK xset 0x1/0x7
    0     0 MARK       all  --  any    any     anywhere             anywhere             match-set NETFLIX-DNS dst MARK or 0x8000
   51  4623 MARK       all  --  any    any     anywhere             anywhere             match-set MYIP dst MARK or 0x8000
	 
 yep...
checking the rules:
	
	
	
		Code:
	
	
		admin@RT-AC86U-D7D8:/tmp/mnt/UsbDrv/entware/etc/wireguard# ip rule
0:      from all lookup local
9910:   from all to 192.168.1.1/16 lookup main
9911:   from 192.168.1.1/24 lookup 121
32766:  from all lookup main
32767:  from all lookup default
	 
 nope...
manually adding
	
	
	
		Code:
	
	
		ip rule add fwmark 0x8000 table main prio 9907
	 
 breaks the connection to these ipsets.
also setting the reverse path filter for wan to loose mode:
	
	
	
		Code:
	
	
		echo 2 > /proc/sys/net/ipv4/conf/eth0/rp_filter
	 
 then it seems to work.
is there something I have failed to configure for ipsets? or am I meant to add the rest in my user sripts?
//Zeb
EDIT: did a search through the wg_manager and wg_client scripts and found basically no entries were any "ip rule add fwmark" is added. so I guess that answers it. unless this is done through NAT:ing but I cant find anything in the NAT table....