redd__it

u/redd__it




r/iptables•

Hi! I live in a house with a couple others, and I'm not the only one with an Apple TV. Now sometimes, by accident, people pick the wrong Apple TV to use when airplaying, which turns on the connected tv.

Now since I am the one who set up the router in our home and this router runs FreshTomato and has the ability to use iptables, I wondered if the following would work. My iPhone and Apple TV both have a static IP address.

iPhone = 10.0.0.101 Apple TV = 10.0.0.102

iptables -I FORWARD ! -s 10.0.0.101 -d 10.0.0.102 -m state --state NEW -j REJECT --reject-with icmp-host-prohibited
iptables -I FORWARD -p tcp ! -s 10.0.0.101 -d 10.0.0.102 -m state --state NEW -j REJECT --reject-with t
14