Kodi Community Forum
webserver listening port - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: Linux (https://forum.kodi.tv/forumdisplay.php?fid=52)
+---- Thread: webserver listening port (/showthread.php?tid=62524)



webserver listening port - pbrille - 2009-11-25

Hi,

Ubuntu 9.04 with 9.11~beta1-jaunty1:

When I set the listening port to 80 instead of 8080 the webservice stops working. When I reset it to port 8080 it's working again.
Is this maybe a bug? I wanted to ask before I submit this as one.


- jonassw - 2009-11-25

If I'm not mistaken, it requires root privileges to start anything on a TCP Port below 1024 on Linux.

As far as I know, there is no way to circumvent this, in my personal opinion, outdated security measure other than routing everyone going in on port 80 to port 8080 in iptables or something.


- pbrille - 2009-11-26

jonassw Wrote:If I'm not mistaken, it requires root privileges to start anything on a TCP Port below 1024 on Linux.

As far as I know, there is no way to circumvent this, in my personal opinion, outdated security measure other than routing everyone going in on port 80 to port 8080 in iptables or something.

I know that it worked in a former installation of the stable version of xbmc...


- topfs2 - 2009-11-26

pbrille Wrote:I know that it worked in a former installation of the stable version of xbmc...

Then you must have run XBMC as root, this isn't a new phenomenom.

Cheers,
Tobias


- pbrille - 2009-11-26

topfs2 Wrote:Then you must have run XBMC as root, this isn't a new phenomenom.

Cheers,
Tobias

Yeah, very funny.
I think it should be working out of the box or changing the port to a privileged one needs to be deactivated. Now it's too confusing to the user because he does not get a feedback. It's just not working.


- jonassw - 2009-11-26

pbrille Wrote:Yeah, very funny.
I think it should be working out of the box or changing the port to a privileged one needs to be deactivated. Now it's too confusing to the user because he does not get a feedback. It's just not working.
It can't really be disabled, since it's a Linux thing. And it's been like that since the dawn of time and space it self - give or take a few hours.

While we can all probably agree that this oldschool security measure doesn't really make that much sense anymore, Linux (or well, Ubuntu/Debian/Every Linux Distribution I've worked with) simply wont allow you to listen on anything below port 1024 unless you're root.

If it's worked before, then you've at the time been running XBMC with root privileges.

However, I do agree that XBMC probably should inform the user that any port below 1024 is a no go - at least on the Linux version.


- topfs2 - 2009-11-26

pbrille Wrote:Yeah, very funny.
I think it should be working out of the box or changing the port to a privileged one needs to be deactivated. Now it's too confusing to the user because he does not get a feedback. It's just not working.

I didnt' mean to offend you incase you got that from my response.
Definatly agree with you that we should pop up a warning message and I'd love if you could post a ticket about it and CC me, then I'll take a look at implementing it, as said we can't really circumvent it.

I'd love if someone could post a ticket about the port rerouting aswell since that might be nice to have on XBMC Live by default.

Cheers,
Tobais


- pbrille - 2009-11-26

topfs2 Wrote:I didnt' mean to offend you incase you got that from my response.
Definatly agree with you that we should pop up a warning message and I'd love if you could post a ticket about it and CC me, then I'll take a look at implementing it, as said we can't really circumvent it.

I'd love if someone could post a ticket about the port rerouting aswell since that might be nice to have on XBMC Live by default.

Cheers,
Tobais

I I'm not offended. I just find it a funny idea to run XBMC as root user. I won't do that btw.
This is the ticket.