Image to run to serve the correct response for Kindle WiFi probes. Allows you to block all traffic from a Kindle device and redirect all traffic with destination TCP Port 80 to this container. Makes Kindle think internet is working and prevents it from disconnecting. Verified on Kindle Scribe, firmware 5.16.2.0.1 with SNAT, DNAT and Firewall rule to allow for the redirected traffic on Opnsense firewall.
Image content:
FROM docker.io/library/nginx:alpine
LABEL org.opencontainers.image.title="kindle-probe" \
org.opencontainers.image.description="Serves Amazon's Kindle Wi-Fi reachability probe locally"
RUN set -eux; \
mkdir -p /usr/share/nginx/html/kindle-wifi; \
printf '%s' '<html><head><title>Kindle Reachability Probe Page</title></head><body>81ce4465-7167-4dcb-835b-dcc9e44c112a</body></html>' \
> /usr/share/nginx/html/kindle-wifi/wifistub-eink.html; \
printf '%s\n' \
'log_format probe "$remote_addr host=$host \"$request\" $status ua=\"$http_user_agent\"";' \
'server {' \
' listen 8080 default_server;' \
' server_name _;' \
' root /usr/share/nginx/html;' \
' access_log /dev/stdout probe;' \
' location = /healthz { access_log off; return 200 "ok\n"; }' \
' location / { try_files $uri /kindle-wifi/wifistub-eink.html; }' \
'}' \
> /etc/nginx/conf.d/default.conf; \
nginx -t
EXPOSE 8080
Example of probes I managed to intercept (might be of interest for debugging purposes):
GET /wifistub.html HTTP/1.1
Host: kindle-wifi-cn.amazon.cn
User-Agent: Mozilla /5.0 (Linux; like iPhone; U; en-US) AppleWebKit/528.5+ (KHTML, like Gecko, Safari/528.5+) Version/4.0
Accept: */*
Accept-Encoding: identity, gzip
Cache-Control: no-cache
Pragma: no-cache
GET /kindle-wifi/wifistub-eink.html HTTP/1.1
Host: spectrum.s3.amazonaws.com
User-Agent: Mozilla /5.0 (Linux; like iPhone; U; en-US) AppleWebKit/528.5+ (KHTML, like Gecko, Safari/528.5+) Version/4.0
Accept: */*
Accept-Encoding: identity, gzip
Cache-Control: no-cache
Pragma: no-cache
Content type
Image
Digest
sha256:46956780f…
Size
27.4 MB
Last updated
about 1 month ago
docker pull michalkeit/kindle-wifi-probe-responder