OpenWRT One: FIX: "possible DNS-rebind attack detected"

If you’re getting logspam every 15 seconds something like this:

daemon.warn: dnsmasq[1]: possible DNS-rebind attack detected: dns.msftncsi.com

… that’s the Windows Network Connectivity Status Indicator (NCSI)… block that traffic, and your Windows machines will report that they don’t have internet access (even if they do).

It’s especially bad if you’ve got lots of Windows machines… they’ll fill your logs with that logspam.

The standard resolution is to put dns.msftncsi.com in Network >> DNS >> Filter >> Domain whitelist. But I don’t consider dropping DNS rebind protection for Microsoft to be a ‘resolution’.

So I hijack those DNS requests and service them via the router, so they never reach the internet:

In Network >> DNS >> DNS Records >> Hostnames, I’ve created two entries:

  • dns.msftncsi.com as the Hostname, and 131.107.255.255 as the IP address
  • dns.msftncsi.com as the Hostname, and fd3e:4f5a:5b81::1 as the IP address

Now, from your computer, issue:

dig dns.msftncsi.com AAAA

… which should return something like:

; <<>> DiG 9.18.39-0ubuntu0.24.04.3-Ubuntu <<>> dns.msftncsi.com AAAA
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 3806
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494
;; QUESTION SECTION:
;dns.msftncsi.com.		IN	AAAA

;; ANSWER SECTION:
dns.msftncsi.com.	7194	IN	AAAA	fd3e:4f5a:5b81::1

;; Query time: 0 msec
;; SERVER: 127.0.0.53#53(127.0.0.53) (UDP)
;; WHEN: Wed Oct 28 21:44:08 CDT 2026
;; MSG SIZE  rcvd: 73

Note the:

;; Query time: 0 msec

Now, from your computer, issue:

dig dns.msftncsi.com

… which should return something like:

; <<>> DiG 9.18.39-0ubuntu0.24.04.3-Ubuntu <<>> dns.msftncsi.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 53617
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494
;; QUESTION SECTION:
;dns.msftncsi.com.		IN	A

;; ANSWER SECTION:
dns.msftncsi.com.	3395	IN	A	131.107.255.255

;; Query time: 0 msec
;; SERVER: 127.0.0.53#53(127.0.0.53) (UDP)
;; WHEN: Wed Oct 28 21:31:15 CDT 2026
;; MSG SIZE  rcvd: 61

Note the:

;; Query time: 0 msec

That means that traffic never got a chance to get out to the internet, the router returned the answer.

Now your Windows machines should happily report that they have internet access, and your router won’t have the ‘possible DNS-rebind attack detected’ logspam.

Leading on from the above, I investigated how to block Microsoft Windows telemetry. And from there, telemetry in general.

The files this script will be downloading must be in the original hosts file format (‘IP address FQDN’; 0.0.0.0 example.com and :: example.com). Or it can just be a list of domains (example.com). Be sure to use files in those formats only.

Because most hosts files only block by putting 0.0.0.0, the script adds :: to each FQDN, so IPv4 and IPv6 are blocked.

The FILE_NAME is what each list is saved as on the router. So, for instance, the entry in the script:

microsoft|https://raw.githubusercontent.com/crazy-max/WindowsSpyBlocker/master/data/hosts/spy.txt

… will be saved at /etc/dnsmasq.d/telemetry/microsoft.

cat << 'EOF' > /etc/block_telemetry.sh
#!/bin/sh

BLOCK_DIR="/etc/dnsmasq.d/telemetry"
mkdir -p "$BLOCK_DIR"

# NOTE: Blocklists must be in original hosts file format (0.0.0.0 example.com) or just domains (example.com)
# NOTE: Processed blocklists are at $BLOCK_DIR
# Multiple blocklists are listed one per line
LISTS="
microsoft|https://raw.githubusercontent.com/crazy-max/WindowsSpyBlocker/master/data/hosts/spy.txt
smartTV|https://raw.githubusercontent.com/hagezi/dns-blocklists/refs/heads/main/wildcard/native.amazon-onlydomains.txt
AdShield|https://raw.githubusercontent.com/hagezi/dns-blocklists/refs/heads/main/share/ad-shield-subdomains.txt
"

for ITEM in $LISTS; do
    # Extract the filename and url from the configuration string
    TARGET_NAME=$(echo "$ITEM" | cut -d'|' -f1)
    TARGET_URL=$(echo "$ITEM" | cut -d'|' -f2)
    HOSTS_FILE="${BLOCK_DIR}/${TARGET_NAME}"

    echo "Downloading ${TARGET_NAME} blocklist..." | tee >(logger -t block_telemetry)
    TEMP_FILE=$(mktemp)

    # Download the blocklist to a temporary file
    uclient-fetch -qO "$TEMP_FILE" "$TARGET_URL"

    if [ -s "$TEMP_FILE" ]; then
        echo "Processing entries for ${TARGET_NAME}..." | tee >(logger -t block_telemetry)

        # 1. Strip carriage returns
        # 2. Extract IP addresses and hostnames
        # 3. Double up the line to map both 0.0.0.0 and ::
        tr -d '\r' < "$TEMP_FILE" | awk '/^(0.0.0.0|127.0.0.1)/ { print "0.0.0.0 " $2 "\n:: " $2 } !/^(0.0.0.0|127.0.0.1)/ && /^[a-zA-Z0-9]/ { print "0.0.0.0 " $1 "\n:: " $1 }' > "$HOSTS_FILE"

        # Set file permissions
        chmod 644 "$HOSTS_FILE"
        echo "${HOSTS_FILE} updated." | tee >(logger -t block_telemetry)
    else
        echo "Warning: Download failed or file was empty for ${TARGET_NAME}." | tee >(logger -t block_telemetry)
    fi

    # Clean up the temp file
    rm -f "$TEMP_FILE"
done

echo "Reloading dnsmasq to commit all updated blocklists..." | tee >(logger -t block_telemetry)
/etc/init.d/dnsmasq reload
EOF

Set permissions:

chmod +x /etc/block_telemetry.sh

You’ll see logs like this:

user.notice: block_telemetry: Downloading microsoft blocklist...
user.notice: uclient-intercept: App: sh (PID: 3068) attempted to call uclient-fetch with args: -qO /tmp/tmp.dgLNgE https://raw.githubusercontent.com/crazy-max/WindowsSpyBlocker/master/data/hosts/spy.txt. Using wget-ssl instead.
user.notice: block_telemetry: Processing entries for microsoft...
user.notice: block_telemetry: /etc/dnsmasq.d/telemetry/microsoft updated.
user.notice: block_telemetry: Downloading smartTV blocklist...
user.notice: uclient-intercept: App: sh (PID: 3068) attempted to call uclient-fetch with args: -qO /tmp/tmp.fKDFNP https://raw.githubusercontent.com/hagezi/dns-blocklists/refs/heads/main/wildcard/native.amazon-onlydomains.txt. Using wget-ssl instead.
user.notice: block_telemetry: Processing entries for smartTV...
user.notice: block_telemetry: /etc/dnsmasq.d/telemetry/smartTV updated.
user.notice: block_telemetry: Downloading AdShield blocklist...
user.notice: uclient-intercept: App: sh (PID: 3068) attempted to call uclient-fetch with args: -qO /tmp/tmp.PdIMgh https://raw.githubusercontent.com/hagezi/dns-blocklists/refs/heads/main/share/ad-shield-subdomains.txt. Using wget-ssl instead.
user.notice: block_telemetry: Processing entries for AdShield...
user.notice: block_telemetry: /etc/dnsmasq.d/telemetry/AdShield updated.
user.notice: block_telemetry: Reloading dnsmasq to commit all updated blocklists...

The uclient-intercept logs are because I’ve replaced uclient-fetch with wget-ssl, to prevent uclient-fetch bypassing DoH. The procedure for doing that is here.

Set that to run however often you like via cron (System >> Scheduled Tasks):

# Update blocklists
15 10 2 * * /bin/sh -c /etc/block_telemetry.sh

Then manually run the script one time to create the file(s) and get it all set up:

/bin/sh -c /etc/block_telemetry.sh

I set it up so the files aren’t automatically activated the first time the script is run, so I can peruse the files before putting them live. Make sure the files in /etc/dnsmasq.d/telemetry/ follow the hosts file format (0.0.0.0 example.com and :: example.com).

In Network >> DNS >> Resolv & Hosts Files tab >> Additional hosts files, add the files. In my case:

/etc/dnsmasq.d/telemetry/microsoft
/etc/dnsmasq.d/telemetry/smartTV
/etc/dnsmasq.d/telemetry/AdShield

… then click the ‘+’ button next to the entry, then click Save & Apply.

Or, you can do it manually:

vi /etc/config/dhcp

… press i to enter editing mode, then under the:

config dnsmasq

… block, paste your files. For example:

list addnhosts '/etc/dnsmasq.d/telemetry/microsoft'
list addnhosts '/etc/dnsmasq.d/telemetry/smartTV'
list addnhosts '/etc/dnsmasq.d/telemetry/AdShield'

… press Esc to exit editing mode, then press :wq to save and exit, then issue:

/etc/init.d/dnsmasq restart

You can ascertain that it’s working by issuing:

logread | grep dnsmasq

… and in the text, you’ll see something like:

daemon.info dnsmasq[1]: read /etc/dnsmasq.d/telemetry/smartTV - 154 names
daemon.info dnsmasq[1]: read /etc/dnsmasq.d/telemetry/microsoft - 694 names
daemon.info dnsmasq[1]: read /etc/dnsmasq.d/telemetry/AdShield - 11612 names

Then you can try to do nslookups on some of the entries in those blocklists. For instance, in:

/etc/dnsmasq.d/telemetry/smartTV

… there are the entries:

0.0.0.0 us.ad.lgsmartad.com
:: us.ad.lgsmartad.com

… which should return (when done on the router):

nslookup us.ad.lgsmartad.com

Server:		127.0.0.1
Address:	127.0.0.1:53

Name:	us.ad.lgsmartad.com
Address: 0.0.0.0

Name:	us.ad.lgsmartad.com
Address: ::

… and (when done on a LAN computer):

nslookup us.ad.lgsmartad.com

Server:		127.0.0.53
Address:	127.0.0.53#53

Non-authoritative answer:
Name:	us.ad.lgsmartad.com
Address: 0.0.0.0
Name:	us.ad.lgsmartad.com
Address: ::

Finally, add:

/etc/block_telemetry.sh

… to the list at System >> Backup / Flash Firmware >> Configuration tab, then click the Save button, so it survives firmware updates.

1 Like

[ EDIT: I changed the format of the blocklist, so LAN devices can cache the negative lookups, and not hammer the router with repeated lookups. This doubles the size of the blocklist (because we have to list 0.0.0.0 and ::), but it allows device caching. ]

[ EDIT: I discovered that the TV was using hard-coded IPv6 addresses to get around the blocklist. I DROP’d all IPv6 packets from the TV (based upon the MAC address), forcing it to use IPv4. It freaked out, claimed the Home Screen couldn’t load due to a network problem, dropped back to IPv4 and plain http, queried European servers, invoked the Amazon Network Diagnostic domain, hammered the router with IPv6 packets, attempted to use the router to ‘echo’ IPv6 packets to the greater internet… then gave up and started behaving. ]

I have an Amazon HiSense 50QD65QFC FireTV, and I wanted to see how much data it was phoning home. It was a lot. So I blocked it.

I already have /etc/config/dhcp set up like this:

config dnsmasq
	option confdir '/etc/dnsmasq.d'

… because I’ve set up the Canary Domains (usually handled by https-dns-proxy, but it messes up the order of the servers) in /etc/dnsmasq.d/canary_domains.conf:

server=/mask.icloud.com/
server=/mask-h2.icloud.com/
server=/icloud.com/
server=/use-application-dns.net/

So, I created a file:

/etc/dnsmasq.d/HiSenseTV

I accessed the TV’s Network Settings and wrote down the MAC address.

Then I did a packet capture (in Terminal, connected to the router via ssh) to find what domains the TV was connecting to:

tcpdump -i br-lan -W 400 -C 512 -w /mnt/sda2/capture.pcap "ether host 44:0f:b4:44:b3:62 and not port 53 and not port 853 and not igmp and not icmp and not icmp6 and not arp"

I can read the packet capture file from my Linux computer as tcpdump is building it via:

tail -f -c +1 /run/user/1000/gvfs/smb-share:server=192.168.1.1,share=scratch/capture.pcap000 | tcpdump -r -

… then I loaded that data into Wireshark with a filter of tls.handshake.extensions_server_name to only show the domains the TV was connecting to.

I copied all the domains from Wireshark into a text editor, stripped out the extraneous stuff, researched each FQDN to find out what it did, then populated the /etc/dnsmasq.d/HiSenseTV file thusly:

# Blocking for HiSense FireTV

# Block Amazon telemetry
address=/aca-livecards-service.amazon.com/0.0.0.0
address=/aca-livecards-service.amazon.com/::
address=/acr-client.amazon.com/0.0.0.0
address=/acr-client.amazon.com/::
address=/ads.na.prod.channels.firetv.amazon.dev/0.0.0.0
address=/ads.na.prod.channels.firetv.amazon.dev/::
address=/amazon-adsystem.com/0.0.0.0
address=/amazon-adsystem.com/::
address=/arcus-uswest.amazon.com/0.0.0.0
address=/arcus-uswest.amazon.com/::
address=/dcape-na.amazon.com/0.0.0.0
address=/dcape-na.amazon.com/::
address=/device-metrics-us.amazon.com/0.0.0.0
address=/device-metrics-us.amazon.com/::
address=/device-metrics-us-2.amazon.com/0.0.0.0
address=/device-metrics-us-2.amazon.com/::
address=/dp-discovery-na-ext.amazon.com/0.0.0.0
address=/dp-discovery-na-ext.amazon.com/::
address=/dss-na.amazon.com/0.0.0.0
address=/dss-na.amazon.com/::
address=/firereleasenotes-na.amazon.com/0.0.0.0
address=/firereleasenotes-na.amazon.com/::
address=/fls-na.amazon.com/0.0.0.0
address=/fls-na.amazon.com/::
address=/ftvpes-na.amazon.com/0.0.0.0
address=/ftvpes-na.amazon.com/::
address=/kinesis.us-east-1.amazonaws.com/0.0.0.0
address=/kinesis.us-east-1.amazonaws.com/::
address=/kraken-measurements.s3-external-1.amazonaws.com/0.0.0.0
address=/kraken-measurements.s3-external-1.amazonaws.com/::
address=/monitoring.us-east-1.amazonaws.com/0.0.0.0
address=/monitoring.us-east-1.amazonaws.com/::
address=/msh.amazon.com/0.0.0.0
address=/msh.amazon.com/::
address=/na.prism.digital.amazon.dev/0.0.0.0
address=/na.prism.digital.amazon.dev/::
address=/pact-proxy.amazon.com/0.0.0.0
address=/pact-proxy.amazon.com/::
address=/paifas.amazon.com/0.0.0.0
address=/paifas.amazon.com/::
address=/podiumedgeservice.amazon.com/0.0.0.0
address=/podiumedgeservice.amazon.com/::
address=/prod.us-east-1.sonar.prime-video.amazon.dev/0.0.0.0
address=/prod.us-east-1.sonar.prime-video.amazon.dev/::
address=/secure-dcr.amazon.com/0.0.0.0
address=/secure-dcr.amazon.com/::
address=/todo-ta-g7g.amazon.com/0.0.0.0
address=/todo-ta-g7g.amazon.com/::
address=/unagi-na.amazon.com/0.0.0.0
address=/unagi-na.amazon.com/::
address=/us-east-1.prod.enira.devices.amazon.dev/0.0.0.0
address=/us-east-1.prod.enira.devices.amazon.dev/::
address=/web.diagnostic.networking.aws.dev/0.0.0.0
address=/web.diagnostic.networking.aws.dev/::
address=/wl.amazon-dss.com/0.0.0.0
address=/wl.amazon-dss.com/::

# Block a2z.com telemetry
address=/global.telemetry.insights.video.a2z.com/0.0.0.0
address=/global.telemetry.insights.video.a2z.com/::
address=/notify.aca.ftv.bugsnag.appstore.a2z.com/0.0.0.0
address=/notify.aca.ftv.bugsnag.appstore.a2z.com/::
address=/prod.service.minerva.devices.a2z.com/0.0.0.0
address=/prod.service.minerva.devices.a2z.com/::
address=/sessions.bugsnag.com/0.0.0.0
address=/sessions.bugsnag.com/::

# Block Alexa
address=/alexa.amazon.com/0.0.0.0
address=/alexa.amazon.com/::
address=/avs-alexa-19-na.amazon.com/0.0.0.0
address=/avs-alexa-19-na.amazon.com/::
address=/prod.cdn.ams.alexa-personality.amazon.dev/0.0.0.0
address=/prod.cdn.ams.alexa-personality.amazon.dev/::

# Block BrightLineTV
address=/brightline.tv/0.0.0.0
address=/brightline.tv/::

# Block Conviva
address=/conviva.com/0.0.0.0
address=/conviva.com/::

# Block Crashlytics
address=/crashlytics.com/0.0.0.0
address=/crashlytics.com/::

# Block DataDog
address=/browser-intake-datadoghq.com/0.0.0.0
address=/browser-intake-datadoghq.com/::

# Block DoubleClick
address=/doubleclick.net/0.0.0.0
address=/doubleclick.net/::

# Block Dynatrace
address=/dynatrace.com/0.0.0.0
address=/dynatrace.com/::

# Block Google
address=/firebaselogging-pa.googleapis.com/0.0.0.0
address=/firebaselogging-pa.googleapis.com/::

# Block HiSense VIDAA OS telemetry
address=/auth-vss.vidaahub.com/0.0.0.0
address=/auth-vss.vidaahub.com/::
address=/partner-detail-ui.vidaahub.com/0.0.0.0
address=/partner-detail-ui.vidaahub.com/::
address=/partner-home-ui.vidaahub.com/0.0.0.0
address=/partner-home-ui.vidaahub.com/::
address=/partner-layout-ui.vidaahub.com/0.0.0.0
address=/partner-layout-ui.vidaahub.com/::
address=/partner.vidaahub.com/0.0.0.0
address=/partner.vidaahub.com/::
address=/policy-jrnl.vidaahub.com/0.0.0.0
address=/policy-jrnl.vidaahub.com/::
address=/rsc-mntz.vidaahub.com/0.0.0.0
address=/rsc-mntz.vidaahub.com/::
address=/static-ui.vidaahub.com/0.0.0.0
address=/static-ui.vidaahub.com/::
address=/ter-jrnl.vidaahub.com/0.0.0.0
address=/ter-jrnl.vidaahub.com/::
address=/tracking-vss.vidaahub.com/0.0.0.0
address=/tracking-vss.vidaahub.com/::

# Block Ketch
address=/global.ketchcdn.com/0.0.0.0
address=/global.ketchcdn.com/::

# Block Kochava
address=/dewrain.life/0.0.0.0
address=/dewrain.life/::
address=/kochava.com/0.0.0.0
address=/kochava.com/::
address=/kvaedit.site/0.0.0.0
address=/kvaedit.site/::

# Block LaunchDarkly
address=/mobile.launchdarkly.com/0.0.0.0
address=/mobile.launchdarkly.com/::
address=/clientsdk.launchdarkly.com/0.0.0.0
address=/clientsdk.launchdarkly.com/::

# Block MoEngage
address=/moengage.com/0.0.0.0
address=/moengage.com/::

# Block Nielsen Digital Content Ratings
address=/nielsen.com/0.0.0.0
address=/nielsen.com/::
address=/vtwenty.com/0.0.0.0
address=/vtwenty.com/::

# Block Omniture / Adobe
# adobedtm.com tells tracking scripts what to track
address=/2o7.net/0.0.0.0
address=/2o7.net/::
address=/adobe.io/0.0.0.0
address=/adobe.io/::
address=/adobedtm.com/0.0.0.0
address=/adobedtm.com/::
address=/adobedc.net/0.0.0.0
address=/adobedc.net/::
address=/adobestats.io/0.0.0.0
address=/adobestats.io/::
address=/demdex.net/0.0.0.0
address=/demdex.net/::
address=/hstatic.io/0.0.0.0
address=/hstatic.io/::
address=/omtrdc.net/0.0.0.0
address=/omtrdc.net/::

# Block RedFast
address=/conduit.redfast.com/0.0.0.0
address=/conduit.redfast.com/::

# Block Samba Telemetry
address=/adserver.org/0.0.0.0
address=/adserver.org/::
address=/api.samba.tv/0.0.0.0
address=/api.samba.tv/::
address=/beacon.samba.tv/0.0.0.0
address=/beacon.samba.tv/::
address=/samba.tv/0.0.0.0
address=/samba.tv/::
address=/tvview.io/0.0.0.0
address=/tvview.io/::

# Block Scorecard Research
address=/scorecardresearch.com/0.0.0.0
address=/scorecardresearch.com/::

# Block SlingTV
address=/p-cg64-slinganalytics.movetv.com/0.0.0.0
address=/p-cg64-slinganalytics.movetv.com/::

# Block Xite:
address=/g.xite.com/0.0.0.0
address=/g.xite.com/::

# DO NOT BLOCK:
# {14 characters}.cloudfront.net - serves the TV Guide graphics under the big banner on the Home screen
# api.amazon.com - Core API functionality
# *.api.amazonvideo.com - Core API functionality
# aptime.movetv.com - time sync for authentication, token generation, live grid guide schedule sync
# cdws.us-east-1.amazonaws.com - Amazon Photos Cloud Drive
# cognito-identity.us-east-1.amazonaws.com - AWS secure system access
# cognito-identity.us-west-2.amazonaws.com - AWS secure system access
# dcm-allowlist-filter-prod.s3.amazonaws.com - Executable files security list
# dp-gw-na.amazon.com - Device Protocol Gateway, North America
# dp-discovery-na-ext.amazon.com – Local connection protocol routing for phone remote apps
# drive.amazonaws.com - Amazon Photos Cloud Drive
# dynaman-or-4.slg.dishtech.org - DishTV back-end session and manifest management system
# firebaseinstallations.googleapis.com - Core developer platform
# firetvcaptiveportal.com - internet connectivity check
# ftv-smtv.ntp-fireos.com - NTP updater
# ftvr-na.amazon.com – System registration and software updater verification
# geo-bas-na.vidaahub.com - VIDAA geolocation firmware updates and app availability
# images-na.ssl-images-amazon.com - core graphics
# imasdk.googleapis.com - Google IMA Ad Player SDK—blocking this freezes stream players when an ad is cued
# img.vidaahub.com - interface thumbnails
# ktpx.amazon.com - Home screen user interface
# linear-ad-segments.frequency.stream - Free Ad Supported Television (FAST) streaming
# m.media-amazon.com - thumbnails and app store icons
# mas-ext.amazon.com - Mobile Appstore Services
# mas-sdk.amazon.com - Mobile Appstore Services
# mediaservices.cdn-apple.com – Handles Apple AirPlay mirroring and the Apple TV app layer if installed.
# p-cdn8-807-cg14-linear-cbd46b77.movetv.com - SlingTV streaming
# p-cmwnext-fast.movetv.com - "Fast Channel" programming frameworks and real-time push events
# p-cmwpush-fast.movetv.com - "Fast Channel" programming frameworks and real-time push events
# p-drmwv.movetv.com - SlingTV Widevine DRM (Digital Rights Management) licensing handshakes
# p-dynaman.movetv.com - SlingTV back-end session and manifest management system
# p-geo.movetv.com - geolocation for regional blackout restrictions, will lock you out completely if blocked
# p-img.movetv.com - SlingTV images and logos
# preprod.amazoncrl.com - verifies security certificates
# saa.pluto.tv - Pluto Service Authentication and Authorization
# spectrum.s3.amazonaws.com - Captive Portal detection
# splice.paramountplus.com - Paramount dynamic streaming
# {29 characters}.ta.pop-vod-dash.main.amazon.pv-cdn.net - Point of Presence - Video on Demand - Dynamic Adaptive Streaming over HTTP (DASH) Prime Video Content Delivery Network

Apparently, if you block enough of the Amazon FireOS telemetry, the underlying OS (VIDAA from HiSense) comes out to play… note the vidaahub.com entries that are coming up in the packet capture.

Then I restarted dnsmasq:

/etc/init.d/dnsmasq restart

NOTE: In this case, you can’t just reload dnsmasq:

/etc/init.d/dnsmasq reload

… that reloads configuration files and hosts files, but not files under the confdir. You have to restart it.

Now the huge ads on the Home Screen are gone, that area just flips between teasers for available videos. The interface is much simpler. The traffic rate is much lower… I captured ~300 MB worth of data with the stock configuration; with the blocklist enabled, and for the same length of time, I captured ~42 MB, and most of that was actual video as I tested the various video sources.

NOTE: You can block:

# ktpx.amazon.com - Home screen user interface

… but it’ll claim there is a network connectivity issue, and the Home screen won’t show up. You can still access all the various video sources, though.

Of course, as soon as I got it all finished, the TV had an “update” to install, despite the fact that I’d just checked for updates when starting this procedure, and there were none… so I’m doing another packet capture, and I’ll block any domains phoning home.

The TV was still connecting out, even after the blocklist above was implemented. I found it was using hard-coded IPv6 server addresses, and hard-coded IPv4 and IPv6 DNS IP addresses. It specifically injects 8.8.8.8 as a DNS server, even if you set it up to use your own DNS servers.

No problem. We can handle that. Just go into the Network Settings on the TV, get its MAC address, then add the following rules to /etc/config/firewall, using the MAC address of your TV.

config rule
	option src 'lan'
	option dest '*'
	option name 'TV_IPv6_DROP - prevents IPv6 telemetry'
	option family 'ipv6'
	list src_mac '44:0F:B4:44:B3:62'
	option target 'DROP'
	option enabled '1'
	list proto 'all'

config rule
	option src 'lan'
	option dest '*'
	list src_mac '44:0F:B4:44:B3:62'
	list dest_ip '8.8.8.8'
	list dest_ip '8.8.4.4'
	list dest_ip '2001:4860:4860::8888'
	list dest_ip '2001:4860:4860::8844'
	option target 'DROP'
	option name 'TV_DNS_DROP'
	option enabled '1'
	list proto 'all'

That blocks the telemetry the TV was sending out via IPv6 (the TV will get an IPv6 address no matter what, because we’re using SLAAC, so we can only block all IPv6 traffic), and blocks the TV from resolving domains via 8.8.8.8, getting around the blocklist above.

In the /etc/dnsmasq.d/canary_domains.conf file, I also added:

server=/resolver.fn.cloudfront.net/

The TV is going to complain at first… it’ll claim there is a networking error; it won’t load the Home Screen; no images will load; if you’re doing a packet capture on the TV, it’ll hammer the router with IPv6 connection attempts and DNS queries to 8.8.8.8… but it’ll eventually figure out that it’s locked down, and everything will settle down, load in, and work properly.

1 Like