How to setup Tor Bridge

I am not going to detail what is tor and all. Because if you already looking to setup Tor bridge, I assume that you already know about tor 😊. You can learn more about tor here anyways https://www.torproject.org/

In my setup I’ve used Lubuntu ( Focal distribution) (https://lubuntu.net/ ) light weight ubuntu base distro on spare old NUC box. This setup needs very little resources since Lubuntu design to run on your old hardware. Also, system can run 24/7 with very little power consumption.

First you need to get install latest tor. Because Debain LTS ver does not always give you the latest stable tor. if your tor bridge not safe, your intended user will not be safe either.

***** Enable package manager

# apt install apt-transport-https

***** Next go the to /etc/apt/sources.list or a new file in /etc/apt/sources.list.d/ add below entries,

   deb     https://deb.torproject.org/torproject.org <DISTRIBUTION> main

   deb-src https://deb.torproject.org/torproject.org <DISTRIBUTION> main

in my case it was little different because Focal dropped 32-bit support,

   deb     [arch=amd64] https://deb.torproject.org/torproject.org focal main

   deb-src [arch=amd64] https://deb.torproject.org/torproject.org focal main

***** You can fine your distro ver by running lsb_release -c in terminal.

***** Then add gpg Keys to sign packages

# wget -qO-  https://deb.torproject.org/torproject.org/A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89.asc | gpg --import

# gpg --export A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 | apt-key add –

***** Install Key rings

# apt update

# apt install tor deb.torproject.org-keyring

Get more info here https://support.torproject.org/apt/tor-deb-repo/

****** Install Tor and proxy packages

# apt-get  install tor

# apt-get install obfs4proxy

# apt-get update

***** Brows into /etc/tor/  and right click and edit as admin torrc file or open with terminal editor,

Comment out or add these lines if the do not exists,

BridgeRelay 1

ORPort TODO1 = In my case TODO1 replace with 9001

ServerTransportListenAddr obfs4 0.0.0.0:TODO2 = I changed TODO2 to 9002

ExtORPort auto

ContactInfo address@email.com = change out your address you want to be contact if the relay have issue

Nickname PickANickname = set a nickname whatever you like

ServerTransportPlugin obfs4 exec /usr/bin/obfs4proxy

Log notice file /var/log/tor/notices.log

****** Set NoNewPrivileges=no in these two files,

/lib/systemd/system/tor@default.service

/lib/systemd/system/tor@.service

After that run below in terminal,

# systemctl daemon-reload

# systemctl restart tor

***** Now you need to port forward above set ports, so that Tor can reach your bridge.

Find more info here , https://community.torproject.org/relay/setup/bridge/debian-ubuntu/

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s