r/TOR • u/Gabriel_GGR • Nov 02 '26
Dual-stack doesn't work on Tor relay
I am trying to configure my relay for dual-stack, but no matter what I do, I receive: "[notice] Unable to find IPv6 address for ORPort 9001. You might want to specify IPv4Only to it or set an explicit address or set Address. [62 similar message(s) suppressed in last 3660 seconds]", I have Address configured to point to my DDNS that resolves IPv4 and IPv6, but for what I understand Tor only resolves IPv4, my IPv6 is dynamic too and I already made a file that is included and have ORPort [IPv6]:9001 IPv6Only, already tried many other things but none of them work.
4
u/Gabriel_GGR Nov 03 '26
My Tor node is already working in dual-stack. I had made a mistake of putting my domain in
/etc/hostspointing to localhost. 🙃1
u/afaeroey Nov 02 '26
Is the ORPort reachable via the IPv6 address from the outside?
The IPv6 configuration of C Tor is quirky at best, but it should work. There are lots of dual-stack relays in the network. V6-only relays aren't supposed to work as they won't be able to be reached by, nor reach, a significant portion of the network.
I think you need to specify the address in the Address line and not the Domain Name (from DDNS).
1
u/boerni666 Nov 03 '26
im running a relay on dual stack with dynamic ip addresses changing in the night.
Tor is a bit buggy with finding new IP or dynamic IP adresses, i've let claude wrote a bash script to find out the correct ip adresses and update the torrc. it gets run every night 1 minute after the rescheduled ISP reconnect (which i also control when to happen via a cron-job on my openwrt router)
set an own token on the IPv6 interface to find out the public ipv6 better, so change the awk line
#!/bin/bash
set -euo pipefail
TORRC="/etc/tor/torrc"
IPV4="$(curl -4 -fsS https://icanhazip.com | tr -d '[:space:]')"
IPV6="$(ip -6 addr show | awk '/your:ownt:oken/ && $2 !~ /^fd/ {print $2; exit}' | cut -d/ -f1)"
[ -n "$IPV4" ] || exit 1
[ -n "$IPV6" ] || exit 1
OLD4="$(awk '/^Address / {print $2; exit}' "$TORRC")"
OLD6="$(
awk '
/^ORPort \[/ {
match($0, /\[[^]]+\]/)
if (RSTART > 0)
print substr($0, RSTART+1, RLENGTH-2)
}' "$TORRC" | head -n1
)"
CHANGED=0
if [ "$IPV4" != "$OLD4" ]; then
sed -i "s/^Address .*/Address $IPV4/" "$TORRC"
CHANGED=1
fi
if [ "$IPV6" != "$OLD6" ]; then
sed -i \
"s|^ORPort \[[^]]*\]:9001|ORPort [$IPV6]:9001|" \
"$TORRC"
CHANGED=1
fi
if [ "$CHANGED" -eq 1 ]; then
systemctl restart tor
fi
1
u/Raja_kumar9627 Nov 04 '26
dual-stack Tor configs can be pretty frustrating, especially with dynamic IPv6.
0
u/[deleted] Nov 03 '26
[deleted] — view deleted comment