In case anyone else is looking for a solution. I got this working to add a network "lock" with iptables to ensure all non-LAN internet traffic goes over wireguard by adding the following in /storage/.config/iptables/rules.v4
Code
*filter
:INPUT DROP [12:909]
:FORWARD ACCEPT [0:0]
:OUTPUT DROP [0:0]
-A INPUT -s 192.168.0.0/16 -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -i wg0 -j ACCEPT
-A INPUT -s WG_CONFIG_IP/32 -j ACCEPT
-A INPUT -p udp -m udp --dport PORT_FROM_WG_CONFIG -j ACCEPT
-A OUTPUT -s 192.168.0.0/16 -j ACCEPT
-A OUTPUT -o lo -j ACCEPT
-A OUTPUT -o wg0 -p icmp -j ACCEPT
-A OUTPUT -o wg0 -j ACCEPT
-A OUTPUT -d WG_CONFIG_IP/32 -j ACCEPT
-A OUTPUT -p udp -m udp --dport PORT_FROM_WG_CONFIG -j ACCEPT
-A OUTPUT -o wg0 -j ACCEPT
COMMIT
Display More
I believe you need to also first allow custom firewall rules in Kodi with:
1) Set kodi's network/firewall config to custom
2) Reboot