btsync using port 80 for gui

Status
Not open for further replies.

FlangeMonkey

Contributor
Joined
Dec 6, 2012
Messages
111
Hi Guys,

I cannot find info on this within the forum but I'd like to change the GUI to port 80. However when I do I cannot connect to the GUI using this port.

Other ports seem to work such as 8889. Any ideas or reason for this?

Thanks,
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
binding to port 1-1024 requires the root user. you have a few choices for accessing btsync's webui at port 80.

edit btsync' user to root in /etc/rc.conf.local
use nginx (running on port 80) to proxy to btsync
use NAT on you router when accessing btsync, NAT can have different source and destination ports
 

FlangeMonkey

Contributor
Joined
Dec 6, 2012
Messages
111
Thanks for your help on this. I wasn't aware that binding port 1-1024 requires root.

I'd prefer to just change the port if possible rather than using a reverse-proxy. I found the config in btsync.config but that change didn't help. What would I need to add to rc.conf?

Thanks,
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
make an /etc/rc.conf.local with

btsync_user="root"

I think that should do it
 

FlangeMonkey

Contributor
Joined
Dec 6, 2012
Messages
111
I had to do it on the service but changing the user to root worked. Do you know why this is, is it a BTsync thing or an OS thing?
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
its a UNIX thing. port 1-1024 are reserved for root. that's why webservers have to be started by root, it opens the socket, then drops down to a different user.
 

FlangeMonkey

Contributor
Joined
Dec 6, 2012
Messages
111
Thanks for the direction. I've done a little research, because I don't want to run as root for security reasons, although its in a segmented jail and has the same access to my data.

I've changed the security setting of the high reserve (1024) and reduced it to 79. This is the config I changed:

/etc/sysctl.conf
net.inet.ip.portrange.reservedhigh=79
 
Status
Not open for further replies.
Top