Skip to content

Instantly share code, notes, and snippets.

@0ff
0ff / iptables.sh
Created March 27, 2016 00:06
iptables for OpenWrt to unlock netflix using getflix.com.au
YOUR_GETFLIX_SERVER=1.2.3.4 # see https://www.getflix.com.au/setup/overview
YOUR_ATV_MAC=AA:BB:CC:DD:EE # see ”DHCP and DNS" in OpenWrt
iptables -A zone_lan_forward ! -d $YOUR_GETFLIX_SERVER/32 -p tcp -m tcp --dport 53 -m mac --mac-source $YOUR_ATV_MAC -m comment --comment "restrict dns" -j zone_wan_dest_REJECT
iptables -A zone_lan_forward ! -d $YOUR_GETFLIX_SERVER/32 -p udp -m udp --dport 53 -m mac --mac-source $YOUR_ATV_MAC -m comment --comment "restrict dns" -j zone_wan_dest_REJECT