Download Station and DHT

Post your questions about BT download, FTP download, HTTP download, or QGet download software here.
Post Reply
ehjay
Starting out
Posts: 13
Joined: Fri Jan 31, 2014 11:47 am

Download Station and DHT

Post by ehjay »

I'm have a TS-212P with two WDEFRX 3TB drives running 4.0.5. I don't use Download Station for bittorrents, I only use it for HTTP type downloads. I've noticed that even though I have DHT unchecked, also UPNP unchecked in Download Station my NAS still opens TCP port 6881 on my router and starts communicating with other DHT clients all over the world. I'm not fond of this behaviour.

I have since disabled UPNP on my router and blocked TCP and UDP port 6881 on my router to compensate for Download Stations poor behaviour. The problem I seem to be having since I've done this is when I leave Download Station enabled on my NAS it will restart unexpectedly every one to two days. If I disable Download Station altogether my NAS seems to chug along fine for days without trouble.

Now the obvious fix is to just disable Download Station when I'm not using it, but that's not the point. Does anyone know if there is a way to disable DHT and UPNP on Download Station besides using the settings that obviously don't work as they are supposed to? Is it possible this has been addressed in 4.1?

Thanks!
User avatar
schumaku
Guru
Posts: 43579
Joined: Mon Jan 21, 2008 4:41 pm
Location: Kloten (Zurich), Switzerland -- Skype: schumaku
Contact:

Re: Download Station and DHT

Post by schumaku »

A BitTorrent with DHT enabled does become a DHT "node" based an UDP communication only - no TCP involved on DHT.

With the (well known) TCP port exposed to the Internet, it is becoming a "peer", that's a client/server listening on a TCP port that implements the BitTorrent protocol.
ehjay wrote:I've noticed that even though I have DHT unchecked,also UPNP unchecked in Download Station my NAS still opens TCP port 6881 on my router and starts communicating with other DHT clients all over the world
I doubt it starts communication on it's own, neither as a DHT node, nor as a BT peer. With DHT disable, it does not send any UDP traffic on 6881/UDP, nor does it answer to any incoming connections. Similar for 6881/TCP - I don't see any NAS initiated traffic if not used. Yes, many consumer (and even business class) routers struggle especially on UDP, as this is a connection-less protocol - to display the effective direction ... most show just the presence.

If the Download Station does ignore the Download Station UPnP enable/disable control, this is potentially a bug. Have double checked your router does not store UPnP configuration changes permanently? Following a router reboot, with the NAS offline, is the port still forwarded? When bringing up the NAS again, is the router UPnP configuration changed again, and the port 6881/TCP forwarded? Same for 6881/UDP by the way?

All observations here are including QTS 4.1 builds by the way.

Sorry, lack of UPnP capable routers I can't test if the Download Station does properly open (and close) the ports - and in absence of such a device it won't try to change the config.

Clear shortcoming is the lack of full control to enable/disable BT in the Download Station context.
ehjay
Starting out
Posts: 13
Joined: Fri Jan 31, 2014 11:47 am

Re: Download Station and DHT

Post by ehjay »

I tested this again to confirm and I had a few facts incorrect in my first description of the problem. The NAS opens TCP 6881 for a short period of time and then closes it, UDP port 6881 is opened until I disable Download Station in Application Manager. Once disabled the NAS does close all of the ports on the router. I do see a lot of traffic coming into UDP port 6881 even without torrents running when the port is open.

The NAS does appear to ignore the UPnP enable/disable setting and I assume the DHT enable/disable setting as well. I have UPnP disabled on my router now, I'm going to try removing the outgoing block on TCP and UDP port 6881 and see if just having UPnP disabled will stop the traffic. Maybe this will also stop the unexpected NAS reboots.

Thanks for your very informative post schumaku, I learned quite a bit about DHT from the information you provided.
User avatar
schumaku
Guru
Posts: 43579
Joined: Mon Jan 21, 2008 4:41 pm
Location: Kloten (Zurich), Switzerland -- Skype: schumaku
Contact:

Re: Download Station and DHT

Post by schumaku »

With the port open, the incoming connection (attempts) to the will remain. Of course, with DHT enabled, each BT DHT system is active - but with the DHT disabled, it' wont answer. Clearly visible if analysing the traffic - sorry, as mentioned, UDP is connection-less, there wont be a reset or go-away answer - and as long as the UDP port is open the DHT packets are arriving on the stack, but won't be handled.
ehjay wrote:The NAS does appear to ignore the UPnP enable/disable setting and I assume the DHT enable/disable setting as well
As mentioned, well possible the UPnP handling does not work as expected - I can't test, so I can neither confirm nor decline. Again, if the UDP based DHT is disabled, it does not answer - regardless the packets will come in.

Disputable if disabling DHT should close the UDP port if UPnP control is enabled of course, too.

However, for your usage, a control to disable BT in the Download Station would be the much better way to go.
ehjay
Starting out
Posts: 13
Joined: Fri Jan 31, 2014 11:47 am

Re: Download Station and DHT

Post by ehjay »

So the real issue is the NAS ignoring the UPnP enable/disable setting then. For now disabling UPnP on my router will take care of the problem. With all of the exploits I've read about with UPnP it would probably be good practice for me to leave UPnP disabled on my router permanently anyway.

Thanks again for your posts schumaku.
ehjay
Starting out
Posts: 13
Joined: Fri Jan 31, 2014 11:47 am

Re: Download Station and DHT

Post by ehjay »

Just a quick follow up to clear up one thing. The spontaneous restarts my NAS was experiencing had nothing to do with Download Station being enabled or ports being blocked. It had everything to do with v4.0.5 software. After upgrading to 4.1 beta 1219 my spontaneous restarts have disappeared and I am able to leave Download Station enabled permanently. I have upnp (or NAT-PMP since I changed my router to an Apple AirPort Extreme, the Netgear r6300v2 and it's buggy firmware was also malfunctioning) disabled in my router and that has taken care of all the DHT traffic. Hope this follow up helps someone trying to troubleshoot their similar problems...
Qnaddict
First post
Posts: 1
Joined: Tue Jul 29, 2014 2:44 pm

Re: Download Station and DHT

Post by Qnaddict »

I believe I experienced this behavior as well and existed even through the upgrade to 4.1. Basically I bought my qnap used and it looked like it was factory reset. I upgraded to the latest os immediately as requested by the old version. After about a week I noticed in my router logs ( asus n66u) 6881 open both tcp and udp and tons of incoming and originating traffic (as well as some port in the 40000s) Lots of connections in "assured" state which I don't know what that means. I had a share available to everyone but I thought I was safe as this is just my home network and forwarded no ports from the router on my own. I'm just glad FTP wasn't opened willy nilly. From network volume traffic (bytes transferred through to the internet ) I'm fairly certain I wasn't sharing large whole files. It finally stopped when I enabled (was already disabled and I have no use for dl station) and disabled again. I want to know if files are only accessible in this case from running dl station in which case I will relax or if files that are in a share (not download) readable by anyone were allowed out. Thanks
Post Reply

Return to “Download Station and QGet”