Failure to connect to 0.0.0.0:12000 my tor port

Hi,

This is my first time asking a question here but I have been trying to setup a tor relay but it won´t connect to the internet on the port I assigned which is 12000 but something strange is happening the bind is configured 0.0.0.0:12000 however only connecting to localhost:12000 works trying to do it on any other device will fail even though I am able to access and connect to port 80 and other ports.

Below is my setup and logs

Thanks for your assistance

Here is my /etc/tor/torrc

Nickname    nickname
ContactInfo randomemail
ORPort 12000
#ORPort \[ipv6\]:23450 # my router does not support ipv6
ExitRelay   0
SocksPort   0
ControlPort 9051
CookieAuthentication 1
Log notice file /var/log/tor/notices.log
DirPort 9030
Log debug file /var/log/tor/debug.log #I am currently logging the debug file to see if there are any hints

Here is the notices.log file:

Jul 28 19:29:56.000 \[notice\] Bootstrapped 0% (starting): Starting
Jul 28 19:29:58.000 \[notice\] MyFamily was configured, but FamilyId was not. It's a good time to start migrating your relays to use family keys. See https://community.torproject.org/relay/setup/post-install/family-ids/ for instructions.
Jul 28 19:29:58.000 \[notice\] Starting with guard context "default"
Jul 28 19:30:09.000 \[notice\] Signaled readiness to systemd
Jul 28 19:30:10.000 \[notice\] Bootstrapped 5% (conn): Connecting to a relay
Jul 28 19:30:10.000 \[notice\] Opening Control listener on /run/tor/control
Jul 28 19:30:10.000 \[notice\] Opened Control listener connection (ready) on /run/tor/control
Jul 28 19:30:10.000 \[notice\] Unable to find IPv4 address for ORPort 12000. You might want to specify IPv6Only to it or set an explicit address or set Address.
Jul 28 19:30:10.000 \[notice\] Bootstrapped 10% (conn_done): Connected to a relay
Jul 28 19:30:10.000 \[notice\] Bootstrapped 14% (handshake): Handshaking with a relay
Jul 28 19:30:10.000 \[notice\] Bootstrapped 15% (handshake_done): Handshake with a relay done
Jul 28 19:30:10.000 \[notice\] Bootstrapped 75% (enough_dirinfo): Loaded enough directory info to build circuits
Jul 28 19:30:10.000 \[notice\] Bootstrapped 90% (ap_handshake_done): Handshake finished with a relay to build circuits
Jul 28 19:30:10.000 \[notice\] Bootstrapped 95% (circuit_create): Establishing a Tor circuit
Jul 28 19:30:10.000 \[notice\] External address seen and suggested by a directory authority: 93.244.177.99
Jul 28 19:30:10.000 \[notice\] Bootstrapped 100% (done): Done
Jul 28 19:31:11.000 \[notice\] Now checking whether IPv4 publicip:12000 is reachable... (this may take up to 20 minutes -- look for log messages indicating success)
Jul 28 19:31:11.000 \[notice\] Now checking whether IPv6 ORPort \[ipv6\]:12000 is reachable... (this may take up to 20 minutes -- look for log messages indicating success)
Jul 28 19:40:11.000 \[notice\] Your network connection speed appears to have changed. Resetting timeout to 60000ms after 18 timeouts and 164 buildtimes.
Jul 28 19:43:46.000 \[notice\] New control connection opened.
Jul 28 19:44:01.000 \[notice\] New control connection opened.
Jul 28 19:45:35.000 \[notice\] New control connection opened.
Jul 28 19:45:39.000 \[notice\] Received reload signal (hup). Reloading config and resetting internal state.
Jul 28 19:45:39.000 \[notice\] Read configuration file "/usr/share/tor/tor-service-defaults-torrc".
Jul 28 19:45:39.000 \[notice\] Read configuration file "/etc/tor/torrc".
Jul 28 19:45:39.000 \[notice\] Tor 0.4.9.11 opening log file.
Jul 28 19:45:39.000 \[warn\] Your log may contain sensitive information - you're logging more than "notice". Don't log unless it serves an important reason. Overwrite the log afterwards.
Jul 28 19:45:39.000 \[notice\] Your Tor server's identity key fingerprint is 'SMC F610569D1C307F8BA0A00CC72725C82AFD668486'
Jul 28 19:45:39.000 \[notice\] Your Tor server's identity key ed25519 fingerprint is 'SMC LCwbYbbp2GxY/MbfmgJ1XeZDoRyBER5W6902uxTq3SY'
Jul 28 19:46:07.000 \[notice\] New control connection opened.
Jul 28 19:50:10.000 \[warn\] Your server has not managed to confirm reachability for its ORPort(s) at publicip:12000 and \[ipv6\]:12000. Relays do not publish descriptors until their ORPort(s) are reachable. Please check your firewalls, ports, address, /etc/hosts file, etc.

My /etc/hosts is:

127.0.0.1 localhost

::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

It looks like Tor itself is listening correctly. 0.0.0.0:12000 only means that it listens on all local interfaces, not that the port is reachable from outside.

I would first check what Tor is actually listening on:

sudo ss -lntp | grep 12000

It should show 0.0.0.0:12000 or *:12000, not only 127.0.0.1:12000.

Then check whether port 12000 is allowed in the firewall and, if the server is behind a router, whether TCP 12000 is forwarded to the correct local IP.

I would also test it from outside your own network:

nc -vz YOUR_PUBLIC_IP 12000

Testing from another device in the same network can be misleading because some routers do not support NAT loopback.

So I would suspect the firewall, port forwarding rather than the Tor configuration itself.

This might be an issue. You can set 1.2.3.4:12000 for instance, whatever your public address is. Firewall is opened up for 12000 I suppose.

Hi,

Thank you for your help

Output:

LISTEN 0 4096 0.0.0.0:12000 0.0.0.0:* users:((“tor”,pid=1737,fd=7))
LISTEN 0 4096 [::]:12000 [::]:* users:((“tor”,pid=1737,fd=8))

It seems like tor listens to all not just localhost.

I also checked ufw which is not blocking any incoming and outgoing packages from the port.

The port forwarding is setup correctly with the tcp port 13000 from public to internal port 13000.

I have nmaped my ip and it seems like port 13000 which I mapped to another computer on my network seems to work. So I don’t know if the router refuses to map anything to my device I will attempted to remove the device from the network.

Hi,

I found the Issue after reinstalling tor and trying it again I found in nftables counter drop on all ports and the port 12000 was not allowed I was constantly trying to check if it was something else then that.

Thank you for your assistance