How to run Tor bridge on Xbian? Socket creation failed: Address family not supported

Hello,

on RPi4 + Xbian with 5.15.92+ after sudo apt-get install tor obfs4proxy and configuring /etc/tor/torrc (as shown below) I am wondering how to restart Tor to adopt my torrc file modifications:

root@xbian ~ # grep -v “#” /etc/default/tor|grep .
RUN_DAEMON=“yes”
CLEANUP_OLD_COREFILES=y
if [ -e /etc/default/tor.vidalia ] && [ -x /usr/bin/vidalia ]; then
. /etc/default/tor.vidalia
fi

root@xbian ~ # grep -v “#” /etc/tor/torrc|grep .
ControlPort 9051
CookieAuthentication 1
HiddenServiceDir /var/lib/tor/Abc
HiddenServicePort 12345 127.0.0.1:12345
BridgeRelay 1
ORPort 10123
ServerTransportPlugin obfs4 exec /usr/bin/obfs4proxy
ServerTransportListenAddr obfs4 0.0.0.0:10124
ExtORPort auto
ContactInfo me@altmails.com
Nickname NickName

I had Tor already installed, it is used by one app (but tor process is not running per “ps”) already had first 4 torrc config. file lines (shown above).

root@xbian ~ # /etc/init.d/tor restart
Stopping tor daemon…done (not running - there is no /run/tor/tor.pid).
Starting tor daemon…Mar 24 21:46:33.844 [warn] Socket creation failed: Address family not supported by protocol
Mar 24 21:46:33.845 [warn] Failed to parse/validate config: Failed to bind one of the listener ports.
Mar 24 21:46:33.845 [err] Reading config failed–see warnings above.
failed.

I expect that RUN_DAEMON=“yes” make sure Tor starts at boot. But how do i restart it without reboot and make it working without above error, please?

Enabling IPv6 apparently helped with this issue. In case of Xbian, it was to change file /etc/modprobe.d/ipv6.conf to become:

# Don't load ipv6 by default
#alias net-pf-10 off

I suggest Tor developers to consider A) being more descriptive in the failure message so one knows it may be about IPv6 not working. B) making OBFS working even IPv6 networking is disabled and just notice user about this.

How to achieve these goals on Xbian? Do You have an idea about commands and its parameters to run please?

  1. Verify that the router is properly forwarding port 12345 to the Linux xbian system.
    i know that there are online port checkers, but when i nmap or ping Tor detected public IP, it timeout, so how it can work?
  2. Check any firewalls or network configuration settings that may be blocking incoming connections to the bridge.
    here i know “iptables -S -t nat” but output is ok:
    iptables -S -t nat
    -P PREROUTING ACCEPT
    -P INPUT ACCEPT
    -P OUTPUT ACCEPT
    -P POSTROUTING ACCEPT
  3. Consider upgrading to a newer version of Tor to take advantage of bug fixes and improvements. This may also help ensure that the bridge is recognized by the directory authorities.
    https://support.torproject.org/apt/tor-deb-repo/ says “The package repository offers amd64, arm64, and i386 binaries.” but i have armhf … yet i am using older Tor version 0.4.5.10 from OS default repository. So how to install latest for my arch?