Kitz Forum

Broadband Related => Router Monitoring Software => Topic started by: roseway on December 17, 2013, 08:27:12 PM

Title: Embedded webserver - advice needed
Post by: roseway on December 17, 2013, 08:27:12 PM
I'm intending to add a simple embedded webserver to DSLstats, so that users can view their stats and graphs remotely. I've got it working to the point where users on the LAN can view the pages it serves, but now I have to make it available to remote connections, and I'm outside my comfort zone here. As I see it, there are three possibilities:

- put the PC running DSLstats in a DMZ
- use an unallocated port chosen by the user, and the user forwards that port in their firewall
- use uPnP

The first option is probably a non-starter, except for a small minority.
The second is easy to implement, but I'm unsure about the security implications.
I know next to nothing about uPnP.

Any advice would be welcome.

Title: Re: Embedded webserver - advice needed
Post by: ryant704 on December 17, 2013, 08:56:14 PM
DMZ wouldn't be an option for me as it's already in use.

Security port would be most favorable depending upon the security issues it could raise.

Not too sure on uPnP but I've assumed it to be rather vulnerable unless it's been fixed in the last year or so.

I think this is a very good idea overall!
Title: Re: Embedded webserver - advice needed
Post by: roseway on December 17, 2013, 10:46:06 PM
Thanks for that.
Title: Re: Embedded webserver - advice needed
Post by: burakkucat on December 17, 2013, 11:49:48 PM
Of your three options, I would not be happy using either the first or third (DMZ or UPnP).  :no:

The second, however, is reasonable and I would be prepared to configure my firewall appropriately -- if I ever require remote access to the statistics.  :)
Title: Re: Embedded webserver - advice needed
Post by: roseway on December 18, 2013, 07:24:54 AM
Thanks, that ties up with a couple of opinions I've received privately.
Title: Re: Embedded webserver - advice needed
Post by: broadstairs on December 18, 2013, 08:10:10 AM
I'd go for option 2 as well if I ever needed it. I'm sure that you have considered making the embedded web server an option as I probably would not use it anyway.

Stuart
Title: Re: Embedded webserver - advice needed
Post by: roseway on December 18, 2013, 08:25:14 AM
Thanks Stuart, yes it will be optional. There will be another tab under 'Configuration', where you can enable/disable it and set parameters such as the port number.
Title: Re: Embedded webserver - advice needed
Post by: broadstairs on December 18, 2013, 08:51:47 AM
One thought about this which has just struck me. What happens if someone already runs an Apache (other web servers are available  :angel: ) on the same PC? Could there be a problem with which port(s) this DSLStats server listens on?

Stuart
Title: Re: Embedded webserver - advice needed
Post by: roseway on December 18, 2013, 10:11:06 AM
I guess the answer to that is that it's up to the user to choose a port which isn't currently in use on their system. I'm intending to stick to the officially unassigned ports (49152 - 65535) because the port authority says: "Assigned ports both System and User ports SHOULD NOT be used without or prior to IANA registration."

http://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml
Title: Re: Embedded webserver - advice needed
Post by: Ronski on December 18, 2013, 10:12:43 AM
@broadstairs You just configure it to use a different port.

You'll also need to open the relevant port  in your pc's firewall.
Title: Re: Embedded webserver - advice needed
Post by: broadstairs on December 18, 2013, 10:36:15 AM
@broadstairs You just configure it to use a different port.

You'll also need to open the relevant port  in your pc's firewall.

Yes I know but since you can re-direct ports as well in most routers I just wanted to make sure that the server itself was not limited to port 80 or 8080 and relied on redirection.

Stuart
Title: Re: Embedded webserver - advice needed
Post by: roseway on December 18, 2013, 11:21:47 AM
Just to be clear, DSLstats will use the port chosen by the user. To access the webserver remotely, you'll point your browser at <IP address>:<Port number>/<Page name> (e.g. 50.60.70.80:55555/snrm.html).
Title: Re: Embedded webserver - advice needed
Post by: burakkucat on December 18, 2013, 04:22:49 PM
Excellent. That is just what I would have expected.  :)