Hello. I set up OpenVPN on my router and set my default gateway to WAN. And I want my list of IPs traffic from file go through OpenVPN connection. But I 'm getting 'Error running custom user file '/etc/vpn-policy-routing.community.user'
This is my File:
#!/bin/sh
TARGET_IPSET='tun0'
TARGET_URL="https://community.antifilter.download/list/community.lst"
TARGET_FNAME="/tmp/community"
_ret=1
if [ ! -s "$TARGET_FNAME" ]; then
curl "$TARGET_URL" 2>/dev/null > "$TARGET_FNAME"
fi
if [ -s "$TARGET_FNAME" ]; then
awk -v ipset="$TARGET_IPSET" '{print "add " ipset " " $1}' "$TARGET_FNAME" | ipset restore -! && _ret=0
fi
rm -f "$TARGET_FNAME"
return $_ret
Also I want netflix traffic go throun VPN as well. Default file 'vpn-policy-routing.netflix.user' is set to wan, so I change only TARGET_IPSET from 'wan' to 'tun0', and after that I'm getting same error 'Error running custom user file '/etc/vpn-policy-routing.netflix.user'. What am I doing wrong?
Sorry for stupid question