Hi John, good details, thank you for sharing all that.
OpenWrt doesn’t use sudo, so the correct command to edit would be:
vi /etc/config/dhcp
That said, you usually shouldn’t need to edit DNS or DHCP settings through the console unless something’s really stuck.
Can I first check whether you’ve used the PiFi App before, or if you’re managing everything purely through OpenWrt’s LuCI interface?
The wget returned 4 error often points to a system time mismatch, which breaks HTTPS connections. To confirm:
- Run
date in the console, or
- In LuCI: go to System → System and check the displayed time.
If it’s incorrect, you can:
- In the PiFi App, open Settings → More Settings → Refresh Timezone to sync it instantly, or
- In LuCI, click Sync with browser.
If you prefer to manually set your DNS servers, you can do so cleanly from:
PiFi App → Settings → AdGuard Home → Settings → DNS settings
Enter your preferred upstream DNS (e.g. 8.8.8.8 and 1.1.1.1) there.
If you’ve already customised your LAN IP or have other settings you’d rather not reset, you can alternatively edit via console:
vi /etc/config/dhcp
and under the config dhcp 'lan' section, add:
option dhcp_option '6,8.8.8.8,1.1.1.1'
then restart DNS:
/etc/init.d/dnsmasq restart
If this doesn’t do the job, I have another suggestion that does it via AGHome but let’s see how we get on with this