No direct connection

Windows specific questions, problems.
Post Reply
Mugwoof
Newbie
Newbie
Posts: 3
Joined: Sat Feb 17, 2024 5:24 pm

No direct connection

Post by Mugwoof »

Been using different versions over the years, on a windows 11 lap top. Have started to get "no direct connection", no settings on router of firewall have been changed, any one got any ideas? Plain answers please
unseen19
Veteran
Veteran
Posts: 189
Joined: Mon Mar 15, 2021 1:36 pm

Re: No direct connection

Post by unseen19 »

hi,

I guess you rely on the automatic setup done through UPNP. Check the routeur/ISP device, an update may have disabled it
If you configured the port forwarding yourself (advised for my concern) the likly cause should be an local IP chanfed on the laptop or a selected port not above 50000 range
Mugwoof
Newbie
Newbie
Posts: 3
Joined: Sat Feb 17, 2024 5:24 pm

Re: No direct connection

Post by Mugwoof »

Hi, upnp is enabled, have not configured the port manually
unseen19
Veteran
Veteran
Posts: 189
Joined: Mon Mar 15, 2021 1:36 pm

Re: No direct connection

Post by unseen19 »

Well even if it may works you rely on a setup that may failed by multiple aspects. The UPNP is a security issue since years and slowly the default value becomes "disabled". Maybe an update of your router was applied.

That said (and stop with the "good thinking" stuff :) ) the manual setup is easy. Some homeworks if you're not familiar:
- set a fixed IP on the laptop, no more DHCP
- make QBT listen on a port >50000 (in the option)
- Create a port forwarding rules on your router (ISP material or your own router)
- create a port forwarding rule pointing for this port to your laptop

Again I do not know if this is familiar to you or not hence may sound complicated. But in the end we simply indicate a route to follow when someone from the Internet try to reach you, aka "packet on port 5xxxx from Internet go to port 5xxxx on my laptop".

Or..you can check the UPNP value in your router, not safe for me (you get it now :) ) but you have been warned :p
bob2306
Member
Member
Posts: 52
Joined: Mon Jun 12, 2023 8:56 pm

Re: No direct connection

Post by bob2306 »

I've not seen "no direct connection" so I had to look it up and I'm still unclear exactly what it's testing- if it's to do with incoming connections it's poorly named.

I vaguely remember another client where an an icon would go green on the first successful incoming connection, which seems like a good way of detecting problems. My VPN doesn't support incoming connections, but I still get a green icon on qBittorrent.
Mugwoof
Newbie
Newbie
Posts: 3
Joined: Sat Feb 17, 2024 5:24 pm

Re: No direct connection

Post by Mugwoof »

Tried all the above, still nothing happening
LilTroy
Newbie
Newbie
Posts: 7
Joined: Fri Apr 19, 2024 12:32 am

Re: No direct connection

Post by LilTroy »

Mugwoof wrote: Tue Feb 20, 2024 7:28 pm Been using different versions over the years, on a windows 11 lap top. Have started to get "no direct connection", no settings on router of firewall have been changed, any one got any ideas? Plain answers please
Without actually looking at the code it's my understanding that this message means you're not able to accept inbound connections. The name is simply a misnomer. You say UPnP is enabled on your router? If it is then check your UPnP table on the device and look for any mappings that are still valid while using qBittorrent. There should be entries listed there. Just ensure that those pinholes were actually created by qBittorrent and not some other unrelated app or device on your network. Make sure you enable both UPnP & NAT-PMP in the client first. A lot of SOHO routers these days combine UPnP, NAT-PMP & PCP port mapping protocols into a single feature in their web and/or mobile app user interface. Check that the UPnP service(s) are actually enabled on your machine. In Windows, for example, you'll want to enable ‘SSDP Discovery’ & ‘UPnP Device Host’ through services.msc if they're not already enabled and running. Set their Startup Type to ‘Automatic’. Lastly, you should either configure the host machine with a static IP or, if using DHCP, create a DHCP reservation for it in your router.

If you see valid port mappings in your router's UPnP table but you're still unable to accept inbound connections then you're likely behind multiple levels of NAT. Multiple levels of NAT, such as the dreaded ‘Double NAT,’ will break these port mapping protocols. Do you connect to a VPN when you torrent? All providers utilize NAT. Even if you don't use a VPN it's possible that your ISP has deployed Carrier Grade NAT (CGN) which will break the port mapping protocols (unless they've implemented PCP in their upstream router and you're utilizing their CPE equipment that is configured to interface with it). Do you tether your device to access the internet? This also uses NAT. Do you use your ISP's CPE equipment, like a residential gateway (modem + router), alongside your own router? This will create a Double NAT situation on your local network. There are a few solutions to the latter which either require putting the gateway into bridge mode (pass-thru), DMZing your own router from the gateway, or hooking up your ethernet cables differently.

The other method of accomplishing NAT traversal, which qBittorrent natively supports, is called hole punching. To be specific it uses UDP hole punching. This doesn't require you to explicitly forward a port either dynamically (programmatically) or statically (manually). Instead it creates an implicit port mapping which it then uses for all subsequent connections that are merged. Make sure you have μTP (Micro Transport Protocol) enabled in your settings. It's a custom designed transport protocol built on top of UDP. If only TCP is set then it won't function.

Go to Options → Connection → Peer connection protocol: and set it to ‘TCP and μTP

Try and figure out how many NATs you're behind, where those NATs are located in the path (do you have control over any of them?), and what types they are. There are existing tools and protocols that can assist you with this. The main types of NAT implementations are: Full Cone, [Address] Restricted Cone, Port Restricted Cone & Symmetric. There is a less common fifth type that's a hybrid which combines the latter two depending on how full the network translator's state table is. It's even trickier to deal with than Symmetric NATs which break hole punching and the STUN endpoint discovery process (you may be able to perform port prediction as a workaround).

Alternately, your other options would be to either connect to the internet directly (assuming there's no CGN in place), put the host machine in your router's DMZ, or use IPv6 if your ISP has native support for it. With IPv6 there's no need for NAT. However, occasionally it's still used in certain cases. IPv6 restores end-to-end connectivity after NAT broke this principle in IPv4.
Post Reply