Transmission unable to use port 80 for Web UI?

Status
Not open for further replies.

Intel

Explorer
Joined
Sep 30, 2014
Messages
51
I installed the transmission plugin; changed the web ui port from the default to 80 so that I can simply go to http://torrent/ and manage all my torrents within my local lan.

Problem is that although the setting in the json file gets modified it is not applied, transmission will not open socket port 80. If I move it back to default 9091 it will work.

Code:
root@transmission_1:/ # cat /var/db/transmission/settings.json
{
    "alt-speed-down": 50,
    "alt-speed-enabled": false,
    "alt-speed-time-begin": 540,
    "alt-speed-time-day": 127,
    "alt-speed-time-enabled": false,
    "alt-speed-time-end": 1020,
    "alt-speed-up": 50,
    "bind-address-ipv4": "0.0.0.0",
    "bind-address-ipv6": "::",
    "blocklist-enabled": false,
    "blocklist-url": "http://www.example.com/blocklist",
    "cache-size-mb": 4,
    "dht-enabled": true,
    "download-dir": "//Downloads",
    "download-queue-enabled": true,
    "download-queue-size": 5,
    "encryption": 1,
    "idle-seeding-limit": 30,
    "idle-seeding-limit-enabled": false,
    "incomplete-dir": "",
    "incomplete-dir-enabled": false,
    "lpd-enabled": false,
    "message-level": 2,
    "peer-congestion-algorithm": "",
    "peer-id-ttl-hours": 6,
    "peer-limit-global": 200,
    "peer-limit-per-torrent": 50,
    "peer-port": 51413,
    "peer-port-random-high": 65535,
    "peer-port-random-low": 49152,
    "peer-port-random-on-start": false,
    "peer-socket-tos": "default",
    "pex-enabled": true,
    "pidfile": "/var/run/transmission/daemon.pid",
    "port-forwarding-enabled": true,
    "preallocation": 1,
    "prefetch-enabled": 1,
    "queue-stalled-enabled": true,
    "queue-stalled-minutes": 30,
    "ratio-limit": 2,
    "ratio-limit-enabled": false,
    "rename-partial-files": true,
    "rpc-authentication-required": false,
    "rpc-bind-address": "0.0.0.0",
    "rpc-enabled": true,
    "rpc-password": "{da39a3ee5e6b4b0d3255bfef95601890afd80709",
    "rpc-port": 80,
    "rpc-url": "/transmission/",
    "rpc-username": "",
    "rpc-whitelist": "",
    "rpc-whitelist-enabled": false,
    "scrape-paused-torrents-enabled": true,
    "script-torrent-done-enabled": false,
    "script-torrent-done-filename": "",
    "seed-queue-enabled": false,
    "seed-queue-size": 10,
    "speed-limit-down": 100,
    "speed-limit-down-enabled": false,
    "speed-limit-up": 100,
    "speed-limit-up-enabled": false,
    "start-added-torrents": true,
    "trash-original-torrent-files": false,
    "umask": 18,
    "upload-slots-per-torrent": 14,
    "utp-enabled": true,
    "watch-dir": "",
    "watch-dir-enabled": false
}


and
root@transmission_1:/ # sockstat -4 -l
USER COMMAND PID FD PROTO LOCAL ADDRESS FOREIGN ADDRESS
root python2.7 52642 3 tcp4 172.32.0.89:12349 *:*
transmission transmissi52309 7 udp4 *:* *:*
transmission transmissi52309 8 tcp4 *:51413 *:*
transmission transmissi52309 10 udp4 *:51413 *:*
root syslogd 52274 7 udp4 *:514 *:*
 

Intel

Explorer
Joined
Sep 30, 2014
Messages
51
https://forums.freenas.org/index.php?threads/getting-plugins-to-run-on-port-80.14321/
the simplest way to do this is setting
net.inet.ip.portrange.reservedhigh for your transmission jail on the jails tab

Hi! Thanks for the quick response.

I went into the Jails tab > under the individual jail (transmission_1) and tried the following combinations under sysctl but after hitting 'save' they disappear (not sticking):

allow.raw_sockets=true
allow.net.inet.ip.portrange.reservedhigh=true

also tried to change to
net.inet.ip.portrange.reservedhigh
net.inet.ip.portrange.reservedhigh=true
net.inet.ip.portrange.reservedhigh=1

But none of the above combinations seem to work or stick; maybe I have to hard code it using vim and shell into the freenas host to edit the sysctl file?

This post seems to suggest to run inside the jail shell the following:
echo "net.inet.ip.portrange.reservedhigh=0" >> /etc/sysctl.conf

But also this post seem to suggest to edit it at freenas host level to remove the security feature of any port under 1024 requiring root access:
/etc/sysctl.conf
net.inet.ip.portrange.reservedhigh=79

I however like your solution and would prefer to edit the individual jail to change the 'net.inet.ip.portrange.reservedhigh' setting but this seems to be broken on the web or don't understand why its disappearing and not being applied?
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
I think you should set it to 79, the true part is breaking stuff. that thread is outdated, since then the jails configuration menu is the better way to set sysctls for jails.
 

Intel

Explorer
Joined
Sep 30, 2014
Messages
51
I think you should set it to 79, the true part is breaking stuff. that thread is outdated, since then the jails configuration menu is the better way to set sysctls for jails.

I tried to set it up; but the sysctl field although taking my input will revert back to what it was after I hit save.
WTzvb3U.png


So if this should not happen, is it a bug?
Thanks
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
maybe this actually needs to be set on the host? I thought it'd be jail specific but I'm not sure.
 

Intel

Explorer
Joined
Sep 30, 2014
Messages
51
maybe this actually needs to be set on the host? I thought it'd be jail specific but I'm not sure.

The solution that seems to fix this and work after rebooting the jail is to ssh into the specific jail you want and run
# echo "net.inet.ip.portrange.reservedhigh=79" >> /etc/sysctl.conf

Then reboot the jail from freenas; it should boot up and now port 80 is free.

Submitted a bug/feature request so that the Web UI will allow this in the future: https://bugs.freenas.org/issues/13835
 
Last edited:
Status
Not open for further replies.
Top