I've followed a couple of tutorials here, but still, I can't connect to my hidden service via FTP.

I followed a tutorial, here: How can I anonymize my FTP traffic using the Tor network?

All successful, but currently FTP works locally in my Debian VPS (If I try to )

But doesn't work outside. Just like that tutorial said I have my second .onion address dedicated only to FTP service.

Also, for me is really unclear how should I transfer (upload and download) files from Tor Browser. I just see a list of Folders&Files.

Thank you to anyone that has patience to help me out!

  • I added a comment to the other post on why it will never and has never worked: The client connects, enables passive mode, the server says "connect to the data port at :", the client tries to use the SOCKS proxy to connect to on port 2000, IE, itself. Tor rejects the connection to a local address and the negotiation fails. This will never work.
    – cacahuatl
    Mar 24, 2017 at 16:48

2 Answers 2


You need to make sure that these lines exist in the serverside torrc configuration:

HiddenServiceDir /var/lib/tor/ftp-service/
HiddenServicePort 21

You should also make sure you use your ftp client over the Tor network, for example, use Tor as a SOCKS proxy for your FTP client. You can use FileZilla over Tor to do this. Firstly, install FileZilla then configure Filezilla to use the SOCKS port on localhost. You can do this by selecting the "Edit" tab then clicking on "Settings". After that, expand "Connection" and click on "Generic proxy". After this, configure it like following:

Proxy host:
Proxy port: 9050

Proxy user and password doesn't matter (leave them blank). The proxy port can also be 9150 so if it doesn't work, you should try changing this first.

  • This won't work.
    – cacahuatl
    Mar 24, 2017 at 16:36
  • Please clarify why this won't work? Which part of this answer will cause trouble?
    – c3ypt1c
    Mar 25, 2017 at 12:38
  • FTP uses a distinct connection for data traffic to be sent over which isn't accounted for.
    – cacahuatl
    Mar 25, 2017 at 16:20

I know this is very old, but just to put here a solution that has worked for me. You can follow this other thread: How can I anonymize my FTP traffic using the Tor network? The thing is that you have to do something more, because as "cacahuatl" (https://tor.stackexchange.com/users/12737/cacahuatl) says, FTP uses one port for control which is managed in the thread, but uses another one for data. Whatever, what we can do is use a "passive mode" ftp server and limit the data port to one exactly port, let's say 2000. So, when you put a command, ftp server will say "connect to". Of course, this is our port, but we can bind this port to the port 2000 of the .onion.

Too much talking, some code if you just want it working ;) :

  1. FTP passive mode configuration in /etc/vsftpd.conf : "port_enable=NO pasv_max_port=2000 pasv_min_port=2000 pasv_enable=Yes"

  2. HiddenService config in /etc/tor/torrc : "HiddenServiceDir /var/lib/tor/hidden_service_ftp/ HiddenServicePort 21 HiddenServicePort 2000"

  3. Two bind ports, one for port .onion:21, another for port .onion:2000: "socat tcp-listen:7000,bind=localhost,fork socks4a:localhost:<.onion>:21,socksport=9150" "socat tcp-listen:2000,bind=localhost,fork socks4a:localhost:<.onion>:2000,socksport=9150"

Just like this you can have the ftp server working (connect to port 7000). Btw, I think this isn't good for multiple connections, but whatever, just as a PoC.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .