XMPP over Tor with ejabberd

My FreedomBox is only accessible as a Tor hidden service, therefore I am interested in running as many apps over Tor as possible.

Problem: I am unable to connect to ejabberd over Tor with Pidgin. Any assistance would be appreciated.

What I did:

In order to use XMPP, I had to set a domain name for my FreedomBox under System > Configure, e.g., EXAMPLE.freedombox.rocks, after which ejabberd is enabled and running. (Note that my ISP does not provide a public-facing IP address, so the domain name is set only so I can configure ejabberd.)

In the chat client Pidgin, I have followed this guide from riseup.net for using Pidgin with a Tor hidden service, but it did not work.

To sum up what I did.

Under Basic:

  • Protocol: XMPP
  • Username: my FBX username
  • Domain: EXAMPLE.freedombox.rocks
  • Resource: empty
  • password: my FBX username password

Under Advanced:

  • Connection Security: Require encryption
  • Connect Port: 5222
  • Connect Server: my FBX onion address
  • File Transfer Proxies: empty

Under Proxy:

  • Proxy type: tried both SOCKS 5 and Tor/Privacy (SOCKS5)
  • Host: 127.0.0.1
  • Port: tried both 9050 and 9150 with Tor Browser Bundle running

Pidgin says “Unable to connect”.

I was, however, able to use ejabberd with the web client JSXC in Tor Browser Bundle with security level set at “Standard” (i.e., javascript is allowed, etc), but the user interface is unusable.

Anyone able to help?

I do not know the answer, but I would like to do the same thing as you.

Searching the web for ideas, I did find one reference that suggests you may need to have TOR running on your client machine to make this work. I cannot say whether this makes sense or not… but perhaps. This suggestion comes from darknetstats: https://www.darknetstats.com/tutorial-xmpp-jabber-otr-over-tor/

I never did get this to work. I even posted to the Pidgin mailing list but got no response:

https://lists.pidgin.im/pipermail/support/2019-June/030613.html

If you manage to get it to work, let me know. Tor is running on my laptop.

@dgj @bebop
Prosody XMPP Server on a Hidden Service for Debian with OTR/OMEMO.
I am testing this repo GitHub - nyxnor/prosody-hidden-service. Would be good if Freedombox allowed custom services to have an onion service.

I use Psi+ with Tor from FBX server and is working fine.
I also use Gajim through Tor and is working fine. Both with OMEMO encryption.