Skip to content

Instantly share code, notes, and snippets.

@xpepper
Last active October 31, 2025 21:54
Show Gist options
  • Save xpepper/35ed3a6dd27ce5d8694b9b2034b9f406 to your computer and use it in GitHub Desktop.
Save xpepper/35ed3a6dd27ce5d8694b9b2034b9f406 to your computer and use it in GitHub Desktop.
How to setup a custom DNS on your TIM ZTE H388X router

To setup a custom DNS on your TIM ZTE H388X router:

  • head to "Rete Locale" -> "LAN" -> Server DHCP
  • execute this script in the browser dev tools console
document.querySelectorAll('#template_DHCPBasicCfg [style*="display: none;"]').forEach(el => {
    el.style.display = ''; // Removes inline display:none
});
  • you should see
image
  • set your preferred DNS
  • save
@Livius0
Copy link

Livius0 commented Jan 20, 2025

Ottimo quello che stavo cercando.

@ziltoid-linux
Copy link

ziltoid-linux commented Jun 30, 2025

Grazie per lo script, funziona perfettamente!

@WhiteGamer89
Copy link

THANK YOU, I LOVE YOU, I SEARCHED EVERYWHERE FOR THIS

@Mat12143
Copy link

Funziona alla perfezione, grazie mille

@tanathos
Copy link

Thank you man, I was about to smash the router with an hammer

@casungo
Copy link

casungo commented Oct 26, 2025

Fantastic

@alevollo
Copy link

Thank you!
I managed to unlock the hidden DNS fields on the TIM ZTE H388X using the script posted above.

The fields appear and I can save them successfully:

  • Primary DNS = 192.168.1.5 (AdGuard Home running on Home Assistant)
  • Secondary DNS = 1.1.1.1
  • ISP DNS = OFF

AdGuard does receive queries, but the router rewrites all hostnames by appending the local suffix .homenet.telecomitalia.it, so lookups fail and resolve to 127.0.0.1.

Do you know if there’s any way to disable this hostname rewriting (the homenet.telecomitalia.it suffix), or to make the router forward DNS queries exactly as received to AdGuard?
Alternatively, is there any hidden setting or API endpoint to disable the internal DNS proxy altogether?

Thanks in advance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment