Hi Xentrk. I have tried to simplify my script since there wasn't really any need for the parts that showed errors consistently anyway, and only one ip was in OVPNC1The tuning part can take some time. For my routing, It would work most of the time. But sometimes, it would default back to another Openvpn tunnel. If I rebooted the Roku, that would fix it sometimes. I did some more mining and editing of the domain names before it was consistent. I would focus on using the domain names until you finish tuning it. Then, try the conversion to ip addresses.
For example, try removing domain names that don't have the iplayer or uk reference in them to see if that solves the problem with getting other streaming to work after you have finished watching iplayer:
Code:guzzoni.apple.com itunes.apple.com.edgekey.net sylvan.apple.com
Or, try to see if the above domains are logged when navigating or watching other streaming media on the Apple TV. If you see them, then these are probably candidates for removal from selective routing and may fix your issue.
nat-start works for me. If you have to bounce a VPN client or do something other changes in the gui, then you may probably will need to rerun the script.
Here is my new script and it works fine, but with some issues that I will go into.
https://pastebin.com/raw/MGNdb4N0
Basically, when I load up the script it will only show about 107 lines when I test the iptables with "iptables -nvL PREROUTING --line -t mangle"
There are a few domains that return the no match/chain error. But if I run it again and again, it will eventually fill up to about 151 lines and then the script will work perfectly as all domains are covered.
What the heck could be causing this? Is it tripping over itself? Could there be a need for some delay in the script?
Also, I can't find the answer to when exactly the nat-start script is started. I thought it was only at bootup, but you seem to be saying it loads up when your VPN client connects or reconnects too.
Another also: Do you know how to wipe the iptables lines clean again without me toggling the firewall in the gui? That is slowing me down. Thanks.