I was installing Tor+OBFS4 bridge on a Raspberry Pi computer with Xbian OS - the Debian based Linux distribution.

This was the commands ran:

sudo apt-get install tor obfs4proxy
grep -v "#" /etc/tor/torrc|grep . # list active lines in Tor configuration file.

Append new OBFS related torrc lines (replace 10109, 10110, [email protected], NickNameOfThisServer) - mentioned numeric values i would set between 10000-20000 - i may be wrong though:

echo -e "BridgeRelay 1\nORPort 10109\nServerTransportPlugin obfs4 exec /usr/bin/obfs4proxy\nServerTransportListenAddr obfs4 0.0.0.0:10110\nExtORPort auto\nContactInfo <[email protected]>\nNickname NickNameOfThisServer"|sudo tee
-a /etc/tor/torrc

grep -v "#" /etc/tor/torrc|grep . # checking torrc lines again and make sure i have no duplicate variable.

systemctl enable --now tor.service && systemctl restart tor.service # enable and restart Tor

On Xbian previous command failed (System has not been booted with systemd as init system). I could do: /etc/init.d/tor restart

Result: Failed to bind one of the listener ports.
Solution: enable IPv6, in case of Xbian, it was to change file /etc/modprobe.d/ipv6.conf to become:
Code:
# Don't load ipv6 by default
#alias net-pf-10 off
If your bridge is behind a firewall or NAT, make sure to open/forward both port numbers defined above (10000-20000) on your router. There should be guides for your router. Another option is DMZ setting on router, which opens your computer to various scanning and attacks. Verify port is reachable: https://bridges.torproject.org/scan/