Skip to content

Instantly share code, notes, and snippets.

@ErikFontanel
Last active July 31, 2018 13:08
Show Gist options
  • Save ErikFontanel/2e3d3409bbb1b78c1726188a3905cb75 to your computer and use it in GitHub Desktop.
Save ErikFontanel/2e3d3409bbb1b78c1726188a3905cb75 to your computer and use it in GitHub Desktop.
Block Google DNS on R7800
#!/bin/sh
# Use together with Voxel Firmware
# Symlink this file from optware root to /root/firewall-start.sh
# Make script executable with chmod +x
#
# More info: https://www.reddit.com/r/pihole/comments/930g2z/psa_google_services_including_ads_and_others_try/
iptables -t nat -I PREROUTING -i br0 ! -s 192.168.1.13 -p tcp --dport 53 -j DNAT --to 192.168.1.13
iptables -t nat -I PREROUTING -i br0 ! -s 192.168.1.13 -p udp --dport 53 -j DNAT --to 192.168.1.13
iptables -t nat -A POSTROUTING -j MASQUERADE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment