Issue when attempting to setup IPV6 on relay

Hello. I am trying to setup a tor relay on debian. I have installed everything yesterday and I did not see any errors upon restarting the tor service. Today I have decided to enable ipv6 on my relay. I have followed the instructions on the Relay post-install and have added my ipv6 address to my torrc file (The full file is attached). Once I have done that, I tried to restart my tor service and am being shown an error which states “Failed to start [tor@default.service] - Anonymizing overlay network for TCP” (the log is also attached below). Can someone please assist me in fixing it?
Here is my torrc file after strictly following the ipv6 setup instructions:

(upload://r5Am5Y8UPgVrPhK9tEmKayF1JT9.webp)

EDIT 1: Now I am really confuzed. I ran a open ipv6 port scan and it states that port 9001 (which was used in the ipv6 setup guide) is blocked? Can someone also advise me on what port to use?

My logs:

May 18 14:58:14 torDeb tor[3071]: May 18 14:58:14.497 [notice] Tor 0.4.8.11 running on Linux with Libevent 2.1.12-stable, OpenSSL 3.0.11, Zlib 1.2.13, Liblzma 5.4.1, Libzstd 1.5.4 and Glibc 2.36 as libc.

May 18 14:58:14 torDeb tor[3071]: May 18 14:58:14.497 [notice] Tor can't help you if you use it wrong! Learn how to be safe at https://support.torproject.org/faq/staying-anonymous/

May 18 14:58:14 torDeb tor[3071]: May 18 14:58:14.497 [notice] Read configuration file "/usr/share/tor/tor-service-defaults-torrc".

May 18 14:58:14 torDeb tor[3071]: May 18 14:58:14.497 [notice] Read configuration file "/etc/tor/torrc".

May 18 14:58:14 torDeb tor[3071]: May 18 14:58:14.501 [notice] Based on detected system memory, MaxMemInQueues is set to 4441 MB. You can override this by setting MaxMemInQueues by hand.

May 18 14:58:14 torDeb tor[3071]: May 18 14:58:14.504 [notice] Opening OR listener on 0.0.0.0:443

May 18 14:58:14 torDeb tor[3071]: May 18 14:58:14.505 [notice] Opened OR listener connection (ready) on 0.0.0.0:443

May 18 14:58:14 torDeb tor[3071]: May 18 14:58:14.505 [notice] Opening OR listener on [2601:601:827f:b0c7:871:4a4b:15da:d9be]:9001

May 18 14:58:14 torDeb tor[3071]: May 18 14:58:14.505 [warn] Could not bind to 2601:601:827f:b0c7:871:4a4b:15da:d9be:9001: Cannot assign requested address

May 18 14:58:14 torDeb tor[3071]: May 18 14:58:14.505 [notice] Opening OR listener on [::]:443

May 18 14:58:14 torDeb tor[3071]: May 18 14:58:14.505 [notice] Opened OR listener connection (ready) on [::]:443

May 18 14:58:14 torDeb tor[3071]: May 18 14:58:14.505 [notice] Opening Directory listener on 0.0.0.0:9030

May 18 14:58:14 torDeb tor[3071]: May 18 14:58:14.505 [notice] Opened Directory listener connection (ready) on 0.0.0.0:9030

May 18 14:58:14 torDeb tor[3071]: May 18 14:58:14.505 [notice] Closing partially-constructed OR listener connection (ready) on 0.0.0.0:443

May 18 14:58:14 torDeb tor[3071]: May 18 14:58:14.505 [notice] Closing partially-constructed OR listener connection (ready) on [::]:443

May 18 14:58:14 torDeb tor[3071]: May 18 14:58:14.505 [notice] Closing partially-constructed Directory listener connection (ready) on 0.0.0.0:9030

May 18 14:58:14 torDeb tor[3071]: May 18 14:58:14.505 [warn] Failed to parse/validate config: Failed to bind one of the listener ports.

May 18 14:58:14 torDeb tor[3071]: May 18 14:58:14.505 [err] Reading config failed--see warnings above.

May 18 14:58:14 torDeb systemd[1]: [tor@default.service](mailto:tor@default.service): Main process exited, code=exited, status=1/FAILURE

May 18 14:58:14 torDeb systemd[1]: [tor@default.service](mailto:tor@default.service): Failed with result 'exit-code'.

May 18 14:58:14 torDeb systemd[1]: Failed to start [tor@default.service](mailto:tor@default.service) - Anonymizing overlay network for TCP.

May 18 14:58:14 torDeb systemd[1]: [tor@default.service](mailto:tor@default.service): Scheduled restart job, restart counter is at 5.

May 18 14:58:14 torDeb systemd[1]: Stopped [tor@default.service](mailto:tor@default.service) - Anonymizing overlay network for TCP.

May 18 14:58:14 torDeb systemd[1]: [tor@default.service](mailto:tor@default.service): Start request repeated too quickly.

May 18 14:58:14 torDeb systemd[1]: [tor@default.service](mailto:tor@default.service): Failed with result 'exit-code'.

May 18 14:58:14 torDeb systemd[1]: Failed to start [tor@default.service](mailto:tor@default.service) - Anonymizing overlay network for TCP.
1 Like

Hi, can you paste your torrc?

1 Like

Here:
issue-when-attempting-to-make-a-relay-v0-90kutxu9l71d1

1 Like

The documentation seems to be a bit outdated. If you specify your orport without adding IPv4Only your relay should use this port for both ipv4 and ipv6 and also test if both addresses are reachable.

1 Like

PublishServerDescriptor 0 is useful for bridges. The value 0 prohibits an anouncement. You can comment it out.

Afaik relays need to provide both an ip4 and ipv6.

Ip4 and ipv6 need to have the same Or listening port, in this case probably 9001.

3 Likes

Easiest solution would be:
ORPort 443
Without specifying another ORPort for IPv6. If the IPv6 works, tor should run on both IPs v4&v6. Otherwise indeed you probably have to specify IPv4Only at the end on your first ORPort 443 statement → ORPort 443 IPv4Only
For the DirPort 9030 it seems to work not to specify any IP: 0.0.0.0:9030 means IPv4 and IPv6 if both are present.
Afterwards you can check with ss as root: ss -ltp |grep tor

2 Likes

You don’t need to specify the IPv6 address in the torrc for Tor to operate IPv6, remove that line from the torrc, unless you have a specific reason to run IPv6 through a different port.

Your IPv6 is probably not set up right in Debian. Please paste the result of running the command “ip addr” in your command line.

Additionally, check to make sure IPv6 is enabled in /etc/sysctl.conf it should contain the lines:

net.ipv6.conf.all.disable_ipv6 = 0
net.ipv6.conf.default.disable_ipv6 = 0
sudo sysctl -p to apply the changes

Now in the file /etc/network/interfaces add the following:

iface enp0s3 inet6 static
    address 2001:db8:1000::1
    netmask 64
    gateway 2001:db8:1000::1
    autoconf 0
    dns-nameservers 2001:4860:4860::8888 2001:4860:4860::8844

'enp0s3' should be replaced with your actual network interface name, and the IPv6 address and gateway should be replaced with the ones provided by your network administrator or ISP. Once added: sudo systemctl restart networking . 

Your ip addr command should show your ipv6 address with "global" next to it. If it doesn't it isn't set up properly, and you may need to enable it in your control panel, if using a VPS, or on your router, if on a network.
1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

That seemed to get rid of the issue. Thanks!

3 Likes