Maintainer: (not sure, mupliple people editing the makefile
Environment: Any recent LEDE (17.0.4). It does not matter which router is used.
Description: Even when one opens a port for transmission running on the router itself, Transmission still claims the port is closed: 
This is a longstanding issue as can be seen here: https://forum.lede-project.org/t/transmission-always-reports-listening-port-closed/2615/27
No matter what configuration we put into /etc/config/firewall, the port stays closed. There are no problems with running transmission on one's PC as opposed to the router itself.
config rule
option target 'ACCEPT'
option src 'wan'
option proto 'tcp udp'
option dest_port '51422'
option name 'Transmission-router1'
config redirect
option target 'DNAT'
option src 'wan'
option dest 'lan'
option proto 'tcp udp'
option src_dport '51422'
option dest_ip '192.168.2.1'
option dest_port '51422'
option name 'trans?'
config rule
option enabled '1'
option target 'ACCEPT'
option src 'wan'
option dest 'lan'
option name 'Transmission-router2'
option dest_port '51422'
Some other people having htis problem: https://forum.openwrt.org/viewtopic.php?id=62761
https://forum.openwrt.org/viewtopic.php?id=65856
https://forum.openwrt.org/viewtopic.php?id=70871
https://forum.openwrt.org/viewtopic.php?id=62250
It is reallt not a matter of misconfiguration.
It's probably an issue with the way transmission detects a closed port. It directs itself to visit a website and see the result. If anything fails, it reports a closed port. It should say unknown if the result from the website is not returned.
What is weird is that it works when I install transmission on my PC and Transmission does not report an open port even when I try to use some scanner website and it says the port in question is open.
Yeah. Like I said, transmission on OpenWrt cannot even get to the website due to some bug whereas it can on your computer. We'll see if I have time to investigate.
Debugged this a little bit...
transmission seems to require ca-bundle to work properly. Also CURL_CA_BUNDLE needs to be set. Once all that is done, it manages to connect to the test webpage with an HTTP code of 200. And fail to receive any data...
This might need adjustments to curl. Will investigate.
Thanks for investigation!
Good news. I found the issue. The libcurl in OpenWrt is built by default with zlib and verbose error strings disabled. After enabling both, The port checking feature correctly shows open. I'll figure out which but in the meantime, just ignore what transmission tells you.
@neheb If you really found the issue, you will please many people very much! I suppose the fix can be applied to LEDE, right?
Could you help us enable zlib and verbose error strings, while you search for an exact solution? If yes, please give newbie directions, me at least need a copy-paste guide to configure files and services. And please specify how your fix applies to LEDE if you can, because some configuration files are not the same as OpenWRT.
Sorry if I ask for too much and many thanks for any help!
@vasilis74 pull request for transmission is here: https://github.com/transmission/transmission/pull/495
Apply the patch to your local build. Or wait until I submit my version bump in 1 or 2 days. I'm testing out some stuff currently.
Thanks again! I will wait for a method I can follow.
Latest version fixes the issue. Please close.
Thanks, taht was quick!
Most helpful comment
Good news. I found the issue. The libcurl in OpenWrt is built by default with zlib and verbose error strings disabled. After enabling both, The port checking feature correctly shows open. I'll figure out which but in the meantime, just ignore what transmission tells you.