Page 1 of 1

Changing default web access port from 9999

Posted: Thu Feb 04, 2016 6:08 pm
by CTM Tom
Hey,

Still trying to poke around the Linux files, i assume that their is a start up script that is telling the mongoose server to enable http to port 9999 - just wondering how i would go around changing this port?

Many thanks!

Re: Changing default web access port from 9999

Posted: Thu Feb 04, 2016 9:12 pm
by janosvitok
The port is hardcoded.

You'll need to recompile QLC+ (or at least the webaccess component).

Re: Changing default web access port from 9999

Posted: Thu Feb 04, 2016 9:50 pm
by CTM Tom
Damn, i had a feeling it might have been was hoping for a best case scenario. Is the version on the github the same as the one that is bundled with the Raspberry Pi edition? If i remember correctly it was different (or am i just talking total rubbish) - Either way thank you for your response!

Re: Changing default web access port from 9999

Posted: Thu Feb 04, 2016 9:56 pm
by janosvitok
Github contains sources for both the "normal" QLC+ and Raspberry version. In fact, they are the same, just configured differently.

Quick look at history shows that the line in question is from 2014, first appeared in version 4.7.1 (https://github.com/mcallegari/qlcplus/b ... s.cpp#L102)

Re: Changing default web access port from 9999

Posted: Thu Feb 04, 2016 10:02 pm
by CTM Tom
Hey,

Again I can only say thank you for your help. With regards to pulling the source for the Raspberry Pi - how do you mean they are just configured differently? Just dont want to be sticking the full version on the Pi! So sorry for the stupid questions.

Re: Changing default web access port from 9999

Posted: Fri Feb 05, 2016 1:44 am
by CTM Tom
Managed to compile my own with the changed port but as i thought, I have lost the ethernet and wifi editing in network configuration. the investigation carries on!

After browsing i have seen this, i assume this has something todo with enabling the config for the wifi SSID and such:

iface->name = "";
iface->isStatic = false;
iface->isWireless = false;
iface->address = "";
iface->gateway = "";
iface->gateway = "";
iface->enabled = false;
iface->ssid = "";
iface->wpaPass = "";

Re: Changing default web access port from 9999

Posted: Sun Feb 21, 2016 3:32 am
by chispito
Have you tried iptables? There's a tutorial http://proghowto.com/iptables-redirect- ... -port-8080 that boils down to:

Code: Select all

iptables -A INPUT -i eth0 -p tcp --dport 80 -j ACCEPT
iptables -A INPUT -i eth0 -p tcp --dport 8080 -j ACCEPT
iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8080
Of course, just replace 8080 with 9999. Then you'd have to put it in a startup script. I'll try it later when I have a minute and report back.