Page 1 of 1

Deluge cannot work through Tor

Posted: Tue Sep 19, 2023 6:53 am
by hack3rcon
Hello,
I want to use the Deluge via Tor proxy. My Tor proxy server is as below:

Code: Select all

$ nc 172.20.2.54 -v 9050
nc: 172.20.2.54 (172.20.2.54) 9050 [9050] open
I can connect to the internet through that IP address and SOCKS5 protocol. I entered that IP address and Port number in the Proxy section. In the bottom right corner of the Deluge, I see Port Issue message. when I move the mouse over it, then it gives me the following error message:

Code: Select all

No incoming connections, check port forwarding
Why? Is this because of the iptables rules?
My iptables rules are:

Code: Select all

$ sudo iptables -S
-P INPUT DROP
-P FORWARD DROP
-P OUTPUT ACCEPT
-N SYN_FLOOD
-A INPUT -s 127.0.0.0/8 -d 127.0.0.0/8 -i lo -j ACCEPT
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-port-unreachable
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -p tcp -m tcp --tcp-flags FIN,SYN,RST,ACK SYN -j SYN_FLOOD
-A INPUT -p tcp -m tcp --dport 9050 -j ACCEPT
-A FORWARD -j REJECT --reject-with icmp-port-unreachable
-A FORWARD -s 192.168.56.0/24 -i vboxnet0 -o eth1 -m conntrack --ctstate NEW -j ACCEPT
-A FORWARD -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
-A OUTPUT -p tcp -j ACCEPT
-A OUTPUT -p udp -j ACCEPT
-A OUTPUT -p icmp -j ACCEPT
-A OUTPUT -j REJECT --reject-with icmp-port-unreachable
-A OUTPUT -o lo -j ACCEPT
-A SYN_FLOOD -m limit --limit 5/sec --limit-burst 10 -j RETURN
-A SYN_FLOOD -j DROP
Thank you.

Re: Deluge cannot work through Tor

Posted: Tue Sep 19, 2023 8:42 am
by mhertz
I don't know anything about tor honestly, but since you're using socks5 proxy then no incoming connections(in theory could maybe, but in practise not so much, as spec not ment for such(rather passive ftp), according to libtorrent main dev - he disabled the experimental support he momentarily tried adding, years ago I remember, unless somethings changed later which I missed.

Re: Deluge cannot work through Tor

Posted: Tue Sep 19, 2023 10:01 am
by hack3rcon
mhertz wrote: Tue Sep 19, 2023 8:42 am I don't know anything about tor honestly, but since you're using socks5 proxy then no incoming connections(in theory could maybe, but in practise not so much, as spec not ment for such(rather passive ftp), according to libtorrent main dev - he disabled the experimental support he momentarily tried adding, years ago I remember, unless somethings changed later which I missed.
Hello,
Thank you so much for your reply.
Do iptables rules not cause interference?

Re: Deluge cannot work through Tor

Posted: Tue Sep 19, 2023 11:27 am
by mhertz
You're welcome. I cannot really answer for your iptables rules as bad at such honestly, maybe others can chime in on that specifically instead, but in theory iptables cannot interfer for something unsupported in first place, so atleast the incoming rules supposedly shouldn't be an issue. Anyway, all I can say is that this message from deluge(well, libtorrent) is normal with socks5 proxies, iptables or not.

Re: Deluge cannot work through Tor

Posted: Tue Sep 19, 2023 8:47 pm
by ambipro
Tor would not be capable of having incoming connections, the only way to host things on Tor is via hidden services, which are only accessible via other clients on the Tor network.

You will not be able to seed on Tor, and it is discouraged by Tor and people who use it to use it for torrenting, it will be slow and ineffective. Recommended practice is to get a VPN with port forwarding.

Your iptables rules have nothing to do with this, it is how Tor functions. There are no entry points to the Tor network from the regular internet, except for the entry point you have when you run the browser or Tor binary.