Tech Junky
Part of the Furniture
So, I finally got the urge to dig into how to setup my DIY router / VPN to split tunnel off crap like Prime to make it work through the streamer box and all devices to avoid the infamous....
Anyway... I got it working on the streamer by adding some routes after messing around with trying to do it the what I thought would be the easier way through iptables.
Of course this could be a real PITA since there's so many hostnames and reapplying the commands generates the new DNS names each time.
I decoded some of the info from - https://askubuntu.com/questions/26870/exempt-programs-or-domain-from-vpn-connection
So, with playing around with things a bit and noticing the "fix" being a bit spotty I came across a list of Amazon IP / CIDR for hopefully making life easier.
Went over to https://bgp.he.net/ to figure out the CIDR based off the "ip route" output to just add them enmasse instead of running the commands each time it spazzes out due to VPN.
Seems to be working on all platforms from phone / browser / app / etc. Everything for Telemetry is still blocked through PIHOLE though so, I get the goods w/o the sale of my use history. The same could be done for any stupid GEO blocked crap like netflix / hulu / etc.
Now to make them permanent / persistent across reboots.
Took a few attempts to get the routes to load from /etc/network/interfaces based on the various syntax from doing it by hand to adding them to the file to do it automatically.
Anyway... I got it working on the streamer by adding some routes after messing around with trying to do it the what I thought would be the easier way through iptables.
Code:
sudo route add -host amazonvideo.com gw 192.168.12.1 dev bo0
sudo route add -host api.us-east-1.aiv-delivery.net gw 192.168.12.1 dev bo0
sudo route add -host na.api.amazonvideo.com gw 192.168.12.1 dev bo0
sudo route add -host cloudfront.xp-assets.aiv-cdn.net gw 192.168.12.1 dev bo0
sudo route add -host assets.aiv-cdn.net gw 192.168.12.1 dev bo0
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default 192.168.12.1 0.0.0.0 UG 0 0 0 bo0
ec2-3-95-89-5.c 192.168.12.1 255.255.255.255 UGH 0 0 0 bo0
ec2-3-138-205-1 192.168.12.1 255.255.255.255 UGH 0 0 0 bo0
ec2-34-216-88-7 192.168.12.1 255.255.255.255 UGH 0 0 0 bo0
s3-website-us-e 192.168.12.1 255.255.255.255 UGH 0 0 0 bo0
server-108-156- 192.168.12.1 255.255.255.255 UGH 0 0 0 bo0
server-108-156- 192.168.12.1 255.255.255.255 UGH 0 0 0 bo0
server-108-157- 192.168.12.1 255.255.255.255 UGH 0 0 0 bo0
link-local 0.0.0.0 255.255.0.0 U 1000 0 0 lo
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 br0
192.168.12.0 0.0.0.0 255.255.255.0 U 0 0 0 bo0
Of course this could be a real PITA since there's so many hostnames and reapplying the commands generates the new DNS names each time.
I decoded some of the info from - https://askubuntu.com/questions/26870/exempt-programs-or-domain-from-vpn-connection
So, with playing around with things a bit and noticing the "fix" being a bit spotty I came across a list of Amazon IP / CIDR for hopefully making life easier.
Went over to https://bgp.he.net/ to figure out the CIDR based off the "ip route" output to just add them enmasse instead of running the commands each time it spazzes out due to VPN.
Code:
sudo ip route add 3.16.0.0/14 via 192.168.12.1 dev bo0
sudo ip route add 3.80.0.0/12 via 192.168.12.1 dev bo0
sudo ip route add 3.136.0.0/13 via 192.168.12.1 dev bo0
sudo ip route add 18.189.0.0/16 via 192.168.12.1 dev bo0
sudo ip route add 34.208.0.0/12 via 192.168.12.1 dev bo0
sudo ip route add 44.224.0.0/11 via 192.168.12.1 dev bo0
sudo ip route add 52.10.0.0/15 via 192.168.12.1 dev bo0
sudo ip route add 54.160.0.0/14 via 192.168.12.1 dev bo0
sudo ip route add 54.231.128.0/19 via 192.168.12.1 dev bo0
sudo ip route add 108.156.208.0/21 via 192.168.12.1 dev bo0
sudo ip route add 108.156.240.0/21 via 192.168.12.1 dev bo0
sudo ip route add 108.157.136.0/21 via 192.168.12.1 dev bo0
sudo ip route add 108.157.152.0/21 via 192.168.12.1 dev bo0
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default 192.168.12.1 0.0.0.0 UG 0 0 0 bo0
3.16.0.0 192.168.12.1 255.252.0.0 UG 0 0 0 bo0
3.80.0.0 192.168.12.1 255.240.0.0 UG 0 0 0 bo0
3.136.0.0 192.168.12.1 255.248.0.0 UG 0 0 0 bo0
13.224.0.0 192.168.12.1 255.252.0.0 UG 0 0 0 bo0
18.189.0.0 192.168.12.1 255.255.0.0 UG 0 0 0 bo0
34.208.0.0 192.168.12.1 255.240.0.0 UG 0 0 0 bo0
44.224.0.0 192.168.12.1 255.224.0.0 UG 0 0 0 bo0
52.10.0.0 192.168.12.1 255.254.0.0 UG 0 0 0 bo0
54.160.0.0 192.168.12.1 255.252.0.0 UG 0 0 0 bo0
54.231.128.0 192.168.12.1 255.255.224.0 UG 0 0 0 bo0
65.8.0.0 192.168.12.1 255.255.0.0 UG 0 0 0 bo0
108.156.0.0 192.168.12.1 255.252.0.0 UG 0 0 0 bo0
108.156.208.0 192.168.12.1 255.255.248.0 UG 0 0 0 bo0
108.156.240.0 192.168.12.1 255.255.248.0 UG 0 0 0 bo0
108.157.136.0 192.168.12.1 255.255.248.0 UG 0 0 0 bo0
108.157.152.0 192.168.12.1 255.255.248.0 UG 0 0 0 bo0
link-local 0.0.0.0 255.255.0.0 U 1000 0 0 lo
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 br0
192.168.12.0 0.0.0.0 255.255.255.0 U 0 0 0 bo0
Seems to be working on all platforms from phone / browser / app / etc. Everything for Telemetry is still blocked through PIHOLE though so, I get the goods w/o the sale of my use history. The same could be done for any stupid GEO blocked crap like netflix / hulu / etc.
Now to make them permanent / persistent across reboots.
Took a few attempts to get the routes to load from /etc/network/interfaces based on the various syntax from doing it by hand to adding them to the file to do it automatically.
Code:
up route add -net 3.16.0.0/14 gw 192.168.12.1 dev bo0
up route add -net 3.80.0.0/12 gw 192.168.12.1 dev bo0
up route add -net 3.136.0.0/13 gw 192.168.12.1 dev bo0
up route add -net 18.189.0.0/16 gw 192.168.12.1 dev bo0
up route add -net 34.208.0.0/12 gw 192.168.12.1 dev bo0
up route add -net 44.224.0.0/11 gw 192.168.12.1 dev bo0
up route add -net 52.10.0.0/15 gw 192.168.12.1 dev bo0
up route add -net 54.160.0.0/14 gw 192.168.12.1 dev bo0
up route add -net 54.231.128.0/19 gw 192.168.12.1 dev bo0
up route add -net 108.156.208.0/21 gw 192.168.12.1 dev bo0
up route add -net 108.156.240.0/21 gw 192.168.12.1 dev bo0
up route add -net 108.157.136.0/21 gw 192.168.12.1 dev bo0
up route add -net 108.157.152.0/21 gw 192.168.12.1 dev bo0
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default 192.168.12.1 0.0.0.0 UG 0 0 0 bo0
3.16.0.0 192.168.12.1 255.252.0.0 UG 0 0 0 bo0
3.80.0.0 192.168.12.1 255.240.0.0 UG 0 0 0 bo0
3.136.0.0 192.168.12.1 255.248.0.0 UG 0 0 0 bo0
18.189.0.0 192.168.12.1 255.255.0.0 UG 0 0 0 bo0
34.208.0.0 192.168.12.1 255.240.0.0 UG 0 0 0 bo0
44.224.0.0 192.168.12.1 255.224.0.0 UG 0 0 0 bo0
52.10.0.0 192.168.12.1 255.254.0.0 UG 0 0 0 bo0
54.160.0.0 192.168.12.1 255.252.0.0 UG 0 0 0 bo0
54.231.128.0 192.168.12.1 255.255.224.0 UG 0 0 0 bo0
108.156.208.0 192.168.12.1 255.255.248.0 UG 0 0 0 bo0
108.156.240.0 192.168.12.1 255.255.248.0 UG 0 0 0 bo0
108.157.136.0 192.168.12.1 255.255.248.0 UG 0 0 0 bo0
108.157.152.0 192.168.12.1 255.255.248.0 UG 0 0 0 bo0
link-local 0.0.0.0 255.255.0.0 U 1000 0 0 lo
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 br0
192.168.12.0 0.0.0.0 255.255.255.0 U 0 0 0 bo0