Categories
DNS

How to change DNS server on a Huawei B535-232 router

By default, the router will use the DNS server of your ISP without the option to specify the DNS server of your choice. The router does support the ability to specify a custom DNS server, but for unknown reasons, this option is not available by default in the administration interface. Fortunately, it only takes a bit of technical understanding, albeit a bit cumbersome, too open for access to the DNS server settings.

Step 1: Log into the router

Enter http://192.168.8.1/ in the address bar of your browser to access the router’s administration interface. You must be connected to the router via Wi-Fi or cable to be able to change settings.

Step 2: Go to the DHCP settings

First, click on “Advanced” in the top menu. Secondly, click on “Router” in the menu at the left side, and select “DHCP” in the submenu (selected by default).

Step 3: Access the command line in your browser

How to access the command line depends on your browser.

Chrome

To access the JavaScript Console:

  • On macOS press: “Command + Option (Alt) + J”
  • On Windows/Linux press: “Shift + CTRL + J”

Firefox

To access the Web Console:

  • On macOS press: “Command + Option (Alt) + K”
  • On Windows/Linux press: “Ctrl + Shift + K”

Safari

Press “Command + Option (Alt) + C” to access the JavaScript Console.

Edge

To access the Console:

  • On macOS press: “Command + Option (Alt) + J”
  • On Windows/Linux press: “Ctrl + Shift + J”

Step 4: Get access to DNS settings

On the command line enter:

$('#dhcp_dns').show();

The router’s administration interface for DHCP will now include an option to specify a DNS server of your choice. If necessary, close the command line window to return to the administration interface in full size.

Step 5: Specify the IP address of a DNS server

  • Click the check box next to “Set up the DNS server manually”.
  • Enter an IP address of a DNS server in the field “Primary DNS server”. It is not mandatory to enter a secondary IP address, but many providers also provide a secondary IP address in case of server or network problems.
  • Finally, save the settings.

Some fast stable public DNS servers are:

Cloudflare DNS

  • Primary server: 1.1.1.1
  • Secondary server: 1.0.0.1

Quad9

  • Primary server: 9.9.9.9
  • Secondary server: 149.112.112.112

Step 6: Reboot the router

Reboot the router by clicking the reboot icon at the top. It takes approx. a few minutes and all connected devices will briefly lose the connection. The router now uses your chosen DNS server.

Troubleshooting

If one or more of your devices continue to connect to a different DNS server other than the one you added to the router, you can try out a few things.

Check if the new DNS settings are saved

Make sure you are logged out of the router, and then login in again following steps 1-4. If you do not see the DNS servers you previously added, your configuration was not saved. Continue with steps 5-6, and make sure you save your settings before restarting the router.

Restart the devices connecting to the router

You can restart the device connecting to the router. It could be that the old DNS settings are still a “ghost” in the cache of the device. A restart will often force the system to apply the new DNS settings.

Check the DNS settings of the device

Make sure that the individual devices are not configured with a custom DNS server. If your device has been assigned a custom DNS server, this will override the DNS assigned by the router. E.g., you have manually specified a DNS server or some software such as a VPN application has modified the default DNS settings.

You can go to the network settings on your device to see details about the DNS settings. From Mac, Windows, and Linux machines you use the command prompt to see which DNS servers your system is using:

  • Windows: ipconfig /displaydns
  • Mac and several Linux distributions: cat /etc/resolv.conf

Alternatively, you can use the online tool DNS leak test to get details about which DNS server you are using.

DNS server with IPv6 address

Some ISPs assign IPv6 addresses to their DNS servers. The IPv6 address will sometimes get added as the primary DNS server to your device. Check which DNS servers your system uses. If an IPv6 address is listed as the top one, it will have a higher priority than the IPv4 addresses. Since the B535-232 router only supports IPv4 addresses for custom DNS servers, no straightforward solution exists. One potential solution is to disable IPv6 on the devices assigned to the router, but this is not always desirable. See the section above for how to get details about the DNS servers used by your system.

10 replies on “How to change DNS server on a Huawei B535-232 router”

Thanks for your bring up this issue. The formatting of the text caused the syntax error when the command was copy/pasted. The command is now formatted as code so it is possible to copy/paste it.

Thanks for posting.
Really bummed about the ipv6 DNS adress, I have this exact problem. Even though I have set a custom ipv4 adress in my B535 I still get a ipv6 adress as my top DNS-server.
Disabling ipv6 on (all) my devices is not an option for me.
Hoping to find a solution somehow.

hello my 535-333 allows me to change the DHCP DNS settings as per your clear instructions and says saved when I click save so all looking good but the changes don’t seem take with or without a reboot, i try renewing DHCP on a windows machine and still get the router as DNS server then i go back to router do same thing and its back to what it was prior to change. Any ideas what i could try its annoying because i want to shift all DNS traffic to pi hole server and rather do through DHCP.
Thanks

hi, the same problem as Scott. the settings won’t save. I’ve tried multiple times , each time hitting save and then restarting. when I go back to check, the settings have reverted.

Hi, same for me. The settings do not get saved. Maybe Three UK prevents the change? Or maybe the problem is caused by the expired certificate warning on https I get when logging into the router?

Same for me. I have the huawei b535-c230.
I works like a charm but it refuses to change the DNS primary and secondary when i press save according to the instructions. I reset the router and they are back to the original.

Same problem here with the B535-333, the changes are not saved. But a way around it is to turn off the DHCP on the router and use an alternative DHCP server. The pi-hole mentioned above will do this.

Please help me.
My notebook with this router has no Internet access if only IPV4 enabled and IPV6 disabled.
When I enable IPV6 too, Internet Access working good.

But Surfshark VPN not working with IPV6 and if I has no another Internet point, only 4G router, VPN can’t connect.

How to make possible to connect to Internet via router with DISABLED IPV6?

Leave a Reply

Your email address will not be published. Required fields are marked *