RalphTrimble
TVWBB Diamond Member
I decided to make this post because recently Bryan shared with us how to make the HM listen to a port other than Port 80, which may be locked down on some routers.
It's rather simple to do, the code to get it done is:
So that code is to add/remove port 8080, you can substitute whatever port you decide to use. The HM will listen to Port 80 AND the port you add unless you use the second command to remove Port 80 (not necessary)
The easiest way to execute this command is to go to CONFIG/SYSTEM/STARTUP, and in the LOCAL STARTUP window add in the code.
I put in the code WITHOUT the reboot line (because you do not want to use startup code that will REBOOT the HM and cause a reboot loop), then hit the commit button, then restart the HM. It will actually take TWO reboot before your HM starts listening to the new port because the code will be executed after the first reboot but will not take effect until the HM reboots again. After you have reboot twice the HM should respond to the new port, at this point you need to go back into CONFIG/SYSTEM/STARTUP and REMOVE those lines you added from the Local Startup section. Reason being, once this change has been committed it is permanent, so you don't want the HM to try and commit this change over and over at every boot...
I'm sure this info will come in handy from time to time and hope this thread can be found easier than the original location which was in a thread just titled "New Build".
EDIT: 5-27-17
Recently some of the HM software has changed and the above code no longer works for adding listening ports, the code needs to be changed slightly to work on the newer HM releases. The code for the new releases is below, the good news is you don't need to know which version you have, you can put both codes in and the appropriate one will take hold. (Make sure you remember to remove or comment out the entire code (using # before each line) after the port has been added)
Here is the code for both versions:
It's rather simple to do, the code to get it done is:
Code:
# To add port 8080
uci add_list lucid.http.address=8080
uci commit lucid
reboot
# To remove port 8080
uci del_list lucid.http.address=8080
uci commit lucid
reboot
So that code is to add/remove port 8080, you can substitute whatever port you decide to use. The HM will listen to Port 80 AND the port you add unless you use the second command to remove Port 80 (not necessary)
The easiest way to execute this command is to go to CONFIG/SYSTEM/STARTUP, and in the LOCAL STARTUP window add in the code.
Code:
uci add_list lucid.http.address=8080
uci commit lucid
I put in the code WITHOUT the reboot line (because you do not want to use startup code that will REBOOT the HM and cause a reboot loop), then hit the commit button, then restart the HM. It will actually take TWO reboot before your HM starts listening to the new port because the code will be executed after the first reboot but will not take effect until the HM reboots again. After you have reboot twice the HM should respond to the new port, at this point you need to go back into CONFIG/SYSTEM/STARTUP and REMOVE those lines you added from the Local Startup section. Reason being, once this change has been committed it is permanent, so you don't want the HM to try and commit this change over and over at every boot...
I'm sure this info will come in handy from time to time and hope this thread can be found easier than the original location which was in a thread just titled "New Build".
EDIT: 5-27-17
Recently some of the HM software has changed and the above code no longer works for adding listening ports, the code needs to be changed slightly to work on the newer HM releases. The code for the new releases is below, the good news is you don't need to know which version you have, you can put both codes in and the appropriate one will take hold. (Make sure you remember to remove or comment out the entire code (using # before each line) after the port has been added)
Here is the code for both versions:
Code:
# To add port 8080
uci add_list lucid.http.address=8080
uci commit lucid
exit 0
uci add_list uhttpd.main.listen_http=0.0.0.0:8080
uci commit uhttpd
/etc/init.d/uhttpd restart
Last edited: