6

I was trying to use Transmission's Web Interface, and it worked perfectly. I could access it via http://localhost:8080/transmission/web/, I could use my local IP, I could use 127.0.0.1, I could, after port-forwarding, even use my actual IP. A DNS connection even succeeded!

I was annoyed by the :8080 tacked onto the URL, and wanted to remove it, so, I went into Transmission's settings and changed it to port 80. All of a sudden, I couldn't connect via any method! They all failed. Even pressing the "Open web client" button in Transmission's settings didn't work. (just a generic "could not establish connection" message, incase you were curious.)
NOTE: I do not have Apache or any other server software installed.

I then, in a panic, switched back to port 8080, and everything was fine. Another try on 80, and failure. Restarting Transmission didn't fix anything, either. (On a hunch, I tried connecting to the :8080 url while I'd set it to port 80, just to see if it was still using the old port. It wasn't.)

Anyway, this isn't a critical issue, but I'd really like to be able to use port 80 for my web client! (well, I'd actually like to be able to use 443, but that's another question...)

2
  • I have sort of rigged up a solution: port forward 80->8080. This does not work when connecting via anything local, however, and will not work when I decide to run a web server. (Basically, I still need help.) Dec 6, 2012 at 5:24
  • @JamesTheAwesomeDude The port forwarding that I did was done at my router, not my computer. I've tried port-forwarding with iptables, but that doesn't seem to work. Dec 6, 2012 at 5:54

2 Answers 2

7

The first 1024 ports are restricted; you need to be root or to have the appropriate CAP_NET_BIND_SERVICE capability.

If you really wanted to use port 80 you could give transmission that capability with the setcap command.

This is the correct command for Transmission:

sudo setcap cap_net_bind_service+ep /usr/bin/transmission-daemon
3
  • I can't make heads nor tails of the man page, and setcap --help is useless. Can you just give me the command I need to allow Transmission to run on port 80? Dec 6, 2012 at 4:52
  • I'm comfortable working with usergroups (I set one up for Truecrypt, so I can mount w/o entering the password, and unmount w/o having to open truecrypt.) I don't know how to manipulate them by myself, but I don't lock up if somebody tells me to "add a new group with these permissions." Dec 6, 2012 at 5:41
  • 1
    Aha, thanks. The command was broken: transmission-daemon insteal of transmission-gtk, and you forgot the sudo, but those problems were fairly easy to correct once I had the whole command put in. Thank you. Dec 6, 2012 at 6:23
0

Another approach, if you didn't want to give additional privileges to transmission, and you happened to already have Apache or nginx installed, would be to use Apache or nginx to proxy forward connections from port 80 to port 8080.

See this approach:

https://serverfault.com/questions/141904/forwarding-apache-requests-port-80-to-tomcat-port-8080

In summary it involves installing Apache with mod_proxy and then:

ProxyPass        / http://hostname:8080/
ProxyPassReverse / http://hostname:8080/

And you can even change the path names as needed if you had other stuff you wanted to run on port 80 too.

The equivalent in nginx would also be easy.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .