[codex] Allow DNS for NTP while blocking WAN#51
Open
EpicPi wants to merge 2 commits into
Open
Conversation
|
@EpicPi is attempting to deploy a commit to the david's projects Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
/etc/resolv.confwhile WAN blocking is enabled.systemd-timesyncdable to resolve NTP hostnames such aspool.ntp.orgafterblock_internet_access.shapplies final DROP rules.unblock_internet_access.shso reapplying the block script does not leave stale IPv6 DROP rules ahead of the new DNS allowances.Root Cause
The block script already allowed UDP/123 for NTP, but
timesyncduses hostnames. On an affected pod,/etc/resolv.confpointed at DNS resolvers like50.0.1.1and50.0.2.2. Those resolvers were outside the LAN allow ranges, so DNS traffic was dropped beforetimesyncdcould resolvepool.ntp.org.The result was:
nslookup pool.ntp.orgfailed under the blocked firewall rules.timedatectlreportedSystem clock synchronized: no.During live testing, I also found
unblock_internet_access.shonly flushed IPv4 rules. That meant old IPv6 DROP rules could remain in place and appear before newly added IPv6 DNS allowances when the block script was rerun.Implementation Notes
block_internet_access.shnow reads/etc/resolv.confand allows DNS to each configurednameserver:unblock_internet_access.shnow clears IPv6 filter rules too, and best-effort clears IPv6 NAT rules where supported.Validation
Local checks:
bash -n scripts/block_internet_access.shbash -n scripts/unblock_internet_access.shLive pod validation on a Pod 3 running Free Sleep
2.1.5:block_internet_access.shandunblock_internet_access.shover the2.1.5install.unblock_internet_access.sh, then the patchedblock_internet_access.sh.50.0.1.1and50.0.2.2are before the final IPv4 DROP.nslookup pool.ntp.orgresolves successfully while WAN blocking is active.timedatectlreportsSystem clock synchronized: yesand the RTC has a current 2026 timestamp./api/deviceStatusreportsfreeSleep.versionas2.1.5./api/serverStatusshows jobs, power schedule, temperature schedule, Franken socket, and Franken monitor healthy after reconnect.