Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transmission says port is closed even though it is open #5459

Closed
felagund opened this issue Jan 16, 2018 · 13 comments
Closed

Transmission says port is closed even though it is open #5459

felagund opened this issue Jan 16, 2018 · 13 comments

Comments

@felagund
Copy link

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: screenshot from 2018-01-16 12-25-18

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'
@felagund
Copy link
Author

@felagund
Copy link
Author

@neheb
Copy link
Contributor

neheb commented Jan 21, 2018

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.

@felagund
Copy link
Author

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.

@neheb
Copy link
Contributor

neheb commented Jan 22, 2018

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.

@neheb
Copy link
Contributor

neheb commented Jan 24, 2018

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.

@felagund
Copy link
Author

Thanks for investigation!

@neheb
Copy link
Contributor

neheb commented Jan 30, 2018

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.

@vasilis74
Copy link

@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!

@neheb
Copy link
Contributor

neheb commented Feb 1, 2018

@vasilis74 pull request for transmission is here: transmission/transmission#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.

@vasilis74
Copy link

Thanks again! I will wait for a method I can follow.

@neheb
Copy link
Contributor

neheb commented Feb 3, 2018

Latest version fixes the issue. Please close.

@felagund felagund closed this as completed Feb 4, 2018
@felagund
Copy link
Author

felagund commented Feb 4, 2018

Thanks, taht was quick!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants