Forum
[PROBLEM] How to run Tor bridge on Xbian? Socket creation failed: Address family not supported - Printable Version

+- Forum (http://forum.xbian.org)
+-- Forum: Software (/forum-6.html)
+--- Forum: Additional Packages (/forum-22.html)
+--- Thread: [PROBLEM] How to run Tor bridge on Xbian? Socket creation failed: Address family not supported (/thread-4166.html)



How to run Tor bridge on Xbian? Socket creation failed: Address family not supported - postcd - 25th Mar, 2023 06:55 AM

Hello,

on RPi4 + Xbian with 5.15.92+ after
Code:
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:

Quote: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

Quote: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).

Quote: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?


RE: How to run Tor bridge on Xbian? Socket creation failed: Address family not supported - Nachteule - 27th Mar, 2023 08:52 PM

I'm sorry, I'm completely out of my depth here.
I have never dealt with tor more closely


How to run Tor bridge on Xbian? Socket creation failed: Address family not supported - f1vefour - 30th Mar, 2023 06:08 PM

Try disabling IPv6 and starting, I'm not finding anything else related to this error but it doesn't specifically list IPv6.


RE: How to run Tor bridge on Xbian? Socket creation failed: Address family not supported - postcd - 30th Mar, 2023 06:34 PM

(30th Mar, 2023 06:08 PM)f1vefour Wrote:  Try disabling IPv6
Xbian is using IPv6? Since i am unable to find it in "ifconfig" output and "ip -6 a" output is empty. Maybe my attempt to disable it in custom sysctl file worked or it was never active:
Code:
# echo -e "net.ipv6.conf.all.disable_ipv6 = 1\nnet.ipv6.conf.eth0.disable_ipv6 = 1"|sudo tee -a /etc/sysctl.d/70-disable-ipv6.conf && sudo sysctl -p -f /etc/sysctl.d/70-disable-ipv6.conf

but anyway that not helped to make tor start (/etc/init.d/tor restart) - shows that failure from the bottom of my first/initial post..
Uncommenting these torrc lines cause it:
#BridgeRelay 1
#ORPort anyportnumberhere


RE: How to run Tor bridge on Xbian? Socket creation failed: Address family not supported - Nachteule - 30th Mar, 2023 09:13 PM

BridgeRelay? This rings alarm bells for me after all
Should this really have something to do with a bridge, i.e. if the bridge modules are also used, then ipv6 is definitely required.
XBian disabled ipv6 by default. So that could be somehow related to it


RE: How to run Tor bridge on Xbian? Socket creation failed: Address family not supported - postcd - 30th Mar, 2023 09:54 PM

(30th Mar, 2023 09:13 PM)Nachteule Wrote:  ipv6 is definitely required.
XBian disabled ipv6 by default.

Per your post http://forum.xbian.org/thread-4094-post-36676.html#pid36676 (topic "[PROBLEM] IPv6 disabled?") i have found that i need to comment out line in ipv6.conf file. This is how the file look like after change:

cat /etc/modprobe.d/ipv6.conf
Code:
# Don't load ipv6 by default
#alias net-pf-10 off

I have then tried various network restart commands that failed (in attempt to apply the change), but anyway found out "ifconfig" now shows inet6 and tor service started WITHOUT PROBLEM:

/etc/init.d/tor restart

SOLVED, thank youHeart. Consider if is still needed to have IPv6 disabled by default.Idea


RE: How to run Tor bridge on Xbian? Socket creation failed: Address family not supported - postcd - 6th Apr, 2023 09:46 PM

(30th Mar, 2023 09:13 PM)Nachteule Wrote:  XBian disabled ipv6 by default.
I am wondering what else is disabled, since i am getting this:

Quote:Unable to find IPv4 address for ORPort 1xxxx You might want to specify IPv6Only to it or set an explicit address or set Address.
Your server has not managed to confirm reachability for its ORPort(s) at somepublicip:1xxxx. Relays do not publish descriptors until their ORPort and DirPort are reachable. Please check your firewalls, ports, address, /etc/hosts file, etc.

ping and nmap to somepublicip fails from multiple locations. I have forwarded port on router to my LAN computer (Xbian) static IP already. Router firewall is off, LAN computer (Xbian) firewall is empty and ACCEPT policy.

Does Xbian support OBFS4 transport protocol or anything regarding networking is needed to be changed?

Quote:netstat -tulnp|grep -i tor
tcp 0 0 0.0.0.0:1xxxx 0.0.0.0:* LISTEN 12064/tor
tcp 0 0 127.0.0.1:9050 0.0.0.0:* LISTEN 12064/tor
tcp 0 0 127.0.0.1:9051 0.0.0.0:* LISTEN 12064/tor
tcp6 0 0 :::1xxxx :::* LISTEN 12064/tor



RE: How to run Tor bridge on Xbian? Socket creation failed: Address family not supported - Nachteule - 6th Apr, 2023 10:56 PM

I can only repeat myself:
I have no idea at all, but maybe it is just a configuration problem. but that is just a guess
Otherwise I don't know what you could configure on system level

I think that you would expect much better help in tor forums.


RE: How to run Tor bridge on Xbian? Socket creation failed: Address family not supported - florencepugh - 5th May, 2023 01:20 PM

To do so, you can follow these steps: Install Tor =>Configure Tor as a bridge =>Install obfs4proxy =>start Tor =>Register and test your bridge. contexto