This post explains the procedure to disable TR069 on a Youhua PT926G fiber optic modem, to prevent China Telecom from pushing config/firmware updates, and void your change of switching to bridging mode or setting port-forward rules.
In the WAN settings of the management portal of this modem, the TR069 connection can neither be modified nor removed. But with a simple patch on the management portal's code, you can break the limitation on the modem.
First, you should follow my previous post: Hacking a Youhua PT926G Fiber Optic Modem, to obtain the Telnet Root password.
Then Telnet in, run su
, and type in the password to get to Root Shell. When
you do that correctly, the command-line will prompt #
.
Then follow these steps:
-
Type
cp /home/httpd/web/net_eth_links.asp /var/
and hit Enter.- We're going to modify this file, but it's on a read-only partition. So we first copy it to somewhere writable first.
-
Type
vi /var/net_eth_links.asp
to edit the file.vi
is famous for being difficult to use, so let's go through this step by step:-
Type
/is_configurable
and Enter, which is searching for stringis_configurable
. The cursor should jump to somewhere around://If connection type is TR069 return false, else return true function is_configurable() { var lk = document.forms[0].lkname.value; var province= <%checkWrite("PROVINCE");%>; /* Some code redacted here */ return true; }
-
Use your arrow keys to move to the line with
var lk
, and press the D key twice. Now that line is removed. -
Press D repeatedly until you removed the line right before
return true;
(not includingreturn true;
), so the whole function will look like://If connection type is TR069 return false, else return true function is_configurable() { return true }
-
Type
:wq
and press Enter to save the file and close the editor.
-
-
Type
mount --bind /var/net_eth_links.asp /home/httpd/web/net_eth_links.asp
and Enter.- Although we cannot modify the original file, we can use the new file "in place of" the old file, so the system will automatically use the new copy when trying to access the file.
- This is what this line is doing.
-
Open your browser and visit the management portal at 8080. Now the TR069 connection in WAN settings can be edited.
- You may remove it, change its type to
Internet
orOther
, or set it toBridge
mode. It's up to you. - Now, the modem's TR069 settings are no longer valid, and it won't be able to connect to China Telecom's central management services.
- You may remove it, change its type to