Blog‎ > ‎

How to change DHCP provided DNS servers on a Huawei B593s-22

posted Dec 13, 2014, 3:12 AM by Pasi Orovuo   [ updated Dec 13, 2014, 11:51 PM ]
I my previous post Getting SSH access on a Huawei B593s-22 I went on a quest to change the DHCP provided DNS servers on my Huawei B593s-22. Getting SSH access to poke around the filesystem came about a bit tricky, so I figured it merits it's own post. Once I gained root access on the box, I went on to look on how to change the DNS servers. There are several places I looked into and things I tried - which I don't bother you with.

With root FTP explained in the previous post, download and edit /app/curcfg.xml. It's the base that's used to create /var/dhcp/dhcps/config upon each boot.

DNS servers can be found at Xpath: /InternetGatewayayDevice/LANDevice/LANDeviceInstance/LANHostConfigManagement/@DNSServers

i.e.

$ xmllint --xpath '/InternetGatewayDeviceConfig/InternetGatewayDevice/LANDevice/LANDeviceInstance/LANHostConfigManagement/@DNSServers' curcfg.xml; echo ""
 DNSServers="8.8.8.8,8.8.4.4"

Comments