I recently started running a middle relay on a dedicated laptop at home.
It works great and self-testing indicates that it allows both IPv4 and IPv6 traffic.
However, it has gone down a couple of times after running approximately 6-8 days on each occurrence. Both times I first noticed it labelled as offline on Tor Metrics, and each time nyx showed it with flags: none and as having about 60-80% of the usual number of connections (mostly some long-lived ones).
I’m running version 0.4.8.13 on Lubuntu and my torrc file is as follows:
I don’t explicitly specify the IP addresses, letting it configures them automatically.
I suspect my issue is caused by my IPv6 address changing. I don’t have a static v6 address and after the relay goes down, the v6 address that it started up with is no longer listed in the output of ip -6 address.
I assumed that the relay would respond to this by switching to a new v6 address automatically, but due to a bug it does not.
I know this can be resolved by manually restarting the service, but this means the relay might be unavailable for several hours until I’m able to do so.
Is there a better way I can handle my IPv6 address changing?
Or maybe a way to set up a static address? My ISP says the v6 prefix is not static, but it hasn’t changed in a long while, so it’s as good as static to me. I’m rather new to IPv6, so I’m not sure if/how I can configure a static address for my machine.
If i understand you correctly only your ipv6 address changes and not your ipv6 prefix. If that is the case you should take a look at ipv6 privacy extensions and check if they are enabled on your machine. How do you configure your networking?
Thanks for the idea.
I took a look at my networking setting (named “Advanced Network Configuration” on Lubuntu), but I couldn’t figure out how to correctly set up a static IP address there.
My IPv6 privacy extensions was set to “Default”, which I’m guessing means exactly what I described in my post. My address generation was set to “Stable privacy” and I didn’t feel comfortable setting it to “EUI64”, since as far as i understand it’s not considered best practice.
In the process of research I found this helpful Reddit post about setting up a static v6 address.
And after applying the configuration with netplan apply, running ip -6 a now showed my address with lifetime forever.
But the relay self-test was now reporting complete lack of connectivity.
After tinkering around with local and global addresses, it seems to work fine. So my problem is now resolved.
I then also ported the generated connection (wired in my case) to my default one.
For anyone who might face a similar issue:
Open Advanced Network Configuration
Edit the connection.
IPv6 Settings > Additional static addresses > Add
Address is prefix+custom, e.g. 2a03:dead:beef::420
Prefix is the prefix length (usually 48 or 64)
Gateway is the public router IPv6 address, e.g. 2a03:dead:beef::c0:ffee
Restart networking; sudo netplan apply seems to do the job
OR
Set the same values in /etc/netplan/01-network-manager-all.yaml