You are not logged in.
I have an apple tv 4k. I'd like it to use a proxy. But there's no way to add a proxy for an apple tv 4k in an apple tv 4k.
I also have a Linux NAS that has two Ethernet ports.
And a Linux server outside my country that runs nothing but sshd.
I don't want to config anything on my router or using apple's Configurator.
I want to connect the apple tv 4k to the second Ethernet port on the NAS. Then create a docker in my NAS that runs sshuttle. So there's no TCP-over-TCP issue. Then let apple tv 4k connect to the internet of the docker that runs sshuttle in the NAS while still have access to the NFS service of the NAS.
I've tried to use the following command, but it didn't work.
sudo iptables -t nat -I POSTROUTING -s 169.254.10.10 -j SNAT --to-source 172.18.0.2
This does give apple tv 4k internet access, but it's the internet of the NAS rather than of the remote Linux server.
sudo iptables -t nat -D POSTROUTING 1
sudo iptables -t nat -I POSTROUTING -s 169.254.10.10 -j SNAT --to-source 192.168.123.123
How should I configure the iptables? What should I do?
Last edited by 1ndeed (2020-04-01 08:09:41)
Offline
After further learning on the internet, I realized that this is not something that iptables can do alone. It seems that I should configure the route rule on my Linux NAS. But this is still too hard for me to understand. I put the network information below. Please help me with How To Configure Route Rule to Let Apple TV 4k Use The Internet of The Container. Thanks!!
Network Interfaces:
# ifconfig -a
br-3434aecffbad: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
(The Container That Runs Sshuttle)
inet 172.30.0.1 netmask 255.255.0.0 broadcast 172.30.255.255
ether 02:42:db:b8:fc:a0 txqueuelen 0 (Ethernet)
RX packets 2643 bytes 133017 (129.8 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 2683 bytes 171525 (167.5 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
enp3s10: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
(Connected Directly to Apple TV)
inet 169.254.31.131 netmask 255.255.255.0 broadcast 169.254.31.255
ether 00:19:e0:0a:eb:d8 txqueuelen 1000 (Ethernet)
RX packets 6238 bytes 603703 (589.5 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 3199 bytes 1698625 (1.6 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
(Connected To The Router In My Home)
inet 192.168.31.131 netmask 255.255.255.0 broadcast 192.168.31.255
inet6 fe80::1c25:ce9d:2894:5789 prefixlen 64 scopeid 0x20<link>
ether 00:01:6c:50:84:39 txqueuelen 1000 (Ethernet)
RX packets 22693 bytes 3966518 (3.7 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 6964 bytes 795564 (776.9 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 17
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
loop txqueuelen 1000 (Local Loopback)
RX packets 14 bytes 1232 (1.2 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 14 bytes 1232 (1.2 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Route Rules:
# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default _gateway 0.0.0.0 UG 101 0 0 ens33
169.254.31.0 0.0.0.0 255.255.255.0 U 0 0 0 enp3s10
172.30.0.0 0.0.0.0 255.255.0.0 U 0 0 0 br-3434aecffbad
192.168.31.0 0.0.0.0 255.255.255.0 U 101 0 0 ens33
Interfaces On the Container:
# ifconfig -a
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 172.30.0.10 netmask 255.255.0.0 broadcast 172.30.255.255
ether 02:42:ac:1e:00:0a txqueuelen 0 (Ethernet)
RX packets 2683 bytes 171525 (167.5 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 2643 bytes 170019 (166.0 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
loop txqueuelen 1000 (Local Loopback)
RX packets 183 bytes 12907 (12.6 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 183 bytes 12907 (12.6 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Offline