Commit 500137c6 authored by Udoka's avatar Udoka Committed by emmapeel
Browse files

Updated content in technicalSetup/bridge

Updated content in technicalSetup/bridge

Updated content in technicalSetup/bridge
parent 071a13da
......@@ -6,13 +6,11 @@ title: CentOS / RHEL / OpenSUSE
---
body:
### 1. Install tor and dependencies
### 1. Install Tor and dependencies
* CentOS / RHEL:
```
yum install epel-release -y
```
`# yum install epel-release -y`
Then add the following to the `/etc/yum.repos.d/tor.repo` file.
......@@ -27,15 +25,11 @@ cost=100
```
And then install the following packages.
```
yum install git golang tor policycoreutils-python-utils
```
`# yum install git golang tor policycoreutils-python-utils`
* OpenSUSE:
```
zypper install tor go git
```
`# zypper install tor go git`
### 2. Build obfs4proxy and move it into place.
......@@ -43,20 +37,21 @@ Heavily outdated versions of git can make `go get` fail, so try upgrading to a m
* CentOS / RHEL:
```
export GOPATH=`mktemp -d`
go get gitlab.com/yawning/obfs4.git/obfs4proxy
sudo cp $GOPATH/bin/obfs4proxy /usr/local/bin/
chcon --reference=/usr/bin/tor /usr/local/bin/obfs4proxy
```
`export GOPATH='mktemp -d'`
`go get gitlab.com/yawning/obfs4.git/obfs4proxy`
`sudo cp $GOPATH/bin/obfs4proxy /usr/local/bin/`
`# chcon --reference=/usr/bin/tor /usr/local/bin/obfs4proxy`
* OpenSUSE:
```
export GOPATH=`mktemp -d`
go get gitlab.com/yawning/obfs4.git/obfs4proxy
sudo cp $GOPATH/bin/obfs4proxy /usr/local/bin/
```
`export GOPATH='mktemp -d'`
`go get gitlab.com/yawning/obfs4.git/obfs4proxy`
`sudo cp $GOPATH/bin/obfs4proxy /usr/local/bin/`
### 3. Edit your Tor config file, usually located at `/etc/tor/torrc` and replace its content with:
......@@ -96,18 +91,17 @@ Nickname PickANickname
* Note that both Tor's OR port and its obfs4 port must be reachable. If your bridge is behind a firewall or NAT, make sure to open both ports. You can use [our reachability test](https://bridges.torproject.org/scan/) to see if your obfs4 port is reachable from the Internet.
### 4. Restart tor
### 4. Restart Tor
* CentOS / RHEL:
```
sudo semanage port -a -t tor_port_t -p tcp [OR port set earlier, in TODO1]
sudo semanage port -a -t tor_port_t -p tcp [obfs4 port set earlier, in TODO2]
```
`sudo semanage port -a -t tor_port_t -p tcp [OR port set earlier, in TODO1]`
`sudo semanage port -a -t tor_port_t -p tcp [obfs4 port set earlier, in TODO2]`
* CentOS / RHEL / OpenSUSE:
`systemctl restart tor`
`sudo systemctl restart tor`
### 5. Monitor your logs (usually in your syslog)
......
......@@ -61,9 +61,9 @@ Don't forget to change the `ORPort`, `ServerTransportListenAddr`, `ContactInfo`,
If your bridge is behind a firewall or NAT, make sure to open both ports.
You can use [our reachability test](https://bridges.torproject.org/scan/) to see if your obfs4 port is reachable from the Internet.
### 4. Restart tor
### 4. Restart Tor
`systemctl restart tor`
`sudo systemctl restart tor`
### 5. Monitor your logs
......
......@@ -23,9 +23,7 @@ EMAIL=Z
Replace `X` with your desired OR port, `Y` with your obfs4 port (make sure that **both** ports are forwarded in your firewall), and `Z` with your email address, which allows us to get in touch with you if there are problems with your bridge.
With your bridge configuration in place, you can now deploy the container by running:
```
docker-compose up -d obfs4-bridge
```
`docker-compose up -d obfs4-bridge`
This command will automatically load your `docker-compose.yml` file while considering the environment variables in `.env`.
......@@ -41,9 +39,7 @@ That's it! Your container is now bootstrapping your new obfs4 bridge.
Upgrading to the latest version of our image is as simple as running:
```
docker-compose up -d obfs4-bridge
```
`docker-compose up -d obfs4-bridge`
Note that your bridge's data directory (which includes its key material) is stored in a docker volume, so you won't lose your bridge's identity when upgrading to the latest docker image.
If you are running multiple bridges on your computer, you need to repeat this step for each bridge.
......@@ -53,16 +49,12 @@ We will announce new image versions on the [tor-dev](https://lists.torproject.or
You can inspect your bridge's logs by running:
```
docker logs CONTAINER_ID
```
`docker logs CONTAINER_ID`
To use your new bridge in Tor Browser, you need its "bridge line".
Here's how you can get your bridge line:
```
docker exec CONTAINER_ID get-bridge-line
```
`docker exec CONTAINER_ID get-bridge-line`
This will return a string similar to the following:
......
......@@ -16,13 +16,15 @@ DragonFlyBSD's daily snapshots and releases (starting with 3.4) come with `pkg`
If `pkg` is missing on the system for any reason, it can be quickly bootstrapped without having to build it from source or even having **DPorts** installed:
```
cd /usr
make pkg-bootstrap
rehash
pkg-static install -y pkg
rehash
```
`# cd /usr`
`# make pkg-bootstrap`
`# rehash`
`# pkg-static install -y pkg`
`# rehash`
##### 1.1. Recommended Steps to Setup `pkg`
......@@ -30,9 +32,7 @@ Here, it will be similar to what we have on a **FreeBSD** system, and we are goi
Installing the `ca_root_nss` package:
```
pkg install ca_root_nss
```
`# pkg install ca_root_nss`
For fresh installations, the file `/usr/local/etc/pkg/repos/df-latest.conf.sample` is copied to `/usr/local/etc/pkg/repos/df-latest`. The files ending in the ".sample" extension are ignored; pkg(8) only reads files that end in ".conf" and it will read as many as it finds.
......@@ -45,25 +45,20 @@ We can simply edit the **URL** used to point to the repositories on `/usr/local/
After applying all these changes, we update the packages list again and try to check if there's already a new update to apply:
```
pkg update -f
pkg upgrade -y -f
```
`# pkg update -f`
`# pkg upgrade -y -f`
### 2. Install `tor` and `obfs4proxy` DragonflyBSD's Package
Here we can choose to install the latest stable version, like:
```
pkg install tor obfs4proxy-tor
```
`# pkg install tor obfs4proxy-tor`
... or install an alpha release:
```
pkg install tor-devel obfs4proxy-tor
```
`# pkg install tor-devel obfs4proxy-tor`
### 3. Configure `/usr/local/etc/tor/torrc` to run **Tor** as a Bridge
......@@ -109,19 +104,17 @@ Don't forget to change the `ORPort`, `ServerTransportListenAddr`, `ContactInfo`,
Here we set `tor` to start at boot time and use the setuid feature, in order to bind to lower ports like 443 (the daemon itself will still run as a regular non-privileged user).
```
echo "tor_setuid=YES" >> /etc/rc.conf
echo "tor_enable=YES" >> /etc/rc.conf
service tor start
```
`# echo "tor_setuid=YES" >> /etc/rc.conf`
`# echo "tor_enable=YES" >> /etc/rc.conf`
`# service tor start`
### 5. Monitor your logs
To confirm your bridge is running with no issues, you should see something like this in `/var/log/tor/notices.log`:
```
tail /var/log/tor/notices.log
```
`# tail /var/log/tor/notices.log`
```
[notice] Your Tor server's identity key fingerprint is '<NICKNAME> <FINGERPRINT>'
......
......@@ -6,9 +6,9 @@ title: Fedora
---
body:
### 1. Install tor and dependencies
### 1. Install Tor and dependencies
Add the following to /etc/yum.repos.d/tor.repo
Add the following to `/etc/yum.repos.d/tor.repo`
```
[tor]
......@@ -63,13 +63,13 @@ Nickname PickANickname
If your bridge is behind a firewall or NAT, make sure to open both ports.
You can use [our reachability test](https://bridges.torproject.org/scan/) to see if your obfs4 port is reachable from the Internet.
### 3. Restart tor
### 4. Restart Tor
```
sudo semanage port -a -t tor_port_t -p tcp [OR port set earlier, in TODO1]
sudo semanage port -a -t tor_port_t -p tcp [obfs4 port set earlier, in TODO2]
systemctl restart tor
```
`sudo semanage port -a -t tor_port_t -p tcp [OR port set earlier, in TODO1]`
`sudo semanage port -a -t tor_port_t -p tcp [obfs4 port set earlier, in TODO2]`
`sudo systemctl restart tor`
### 4. Monitor your logs (usually in your syslog)
......
......@@ -12,9 +12,7 @@ body:
### 1. Install packages
```
pkg install obfs4proxy-tor tor ca_root_nss
```
`# pkg install obfs4proxy-tor tor ca_root_nss`
### 2. Edit your Tor config file, usually located at `/usr/local/etc/tor` and replace its content with:
......@@ -58,17 +56,15 @@ Don't forget to change the `ORPort`, `ServerTransportListenAddr`, `ContactInfo`,
### 3. Ensure that the `random_id` sysctl setting is enabled:
```
echo "net.inet.ip.random_id=1" >> /etc/sysctl.conf
sysctl net.inet.ip.random_id=1
```
`# echo "net.inet.ip.random_id=1" >> /etc/sysctl.conf`
`# sysctl net.inet.ip.random_id=1`
### 4. Start the tor daemon and make sure it starts at boot:
```
sysrc tor_enable=YES
service tor start
```
`# sysrc tor_enable=YES`
`# service tor start`
### 5. Monitor your logs
......@@ -89,9 +85,7 @@ To confirm your bridge is running with no issues, you should see something like
Create the following folder:
```
mkdir -p /usr/local/etc/pkg/repos
```
`# mkdir -p /usr/local/etc/pkg/repos`
Create the file `/usr/local/etc/pkg/repos/FreeBSD.conf` with the following content:
......
......@@ -12,15 +12,11 @@ body:
### 1. Setup `pkg_add`
```
echo "PKG_PATH=http://cdn.netbsd.org/pub/pkgsrc/packages/NetBSD/$(uname -m)/$(uname -r)/All" > /etc/pkg_install.conf
```
`# echo "PKG_PATH=http://cdn.netbsd.org/pub/pkgsrc/packages/NetBSD/$(uname -m)/$(uname -r)/All" > /etc/pkg_install.conf`
2. Install `obfs4proxy` and `tor` NetBSD's package
```
pkg_add obfs4proxy tor
```
`# pkg_add obfs4proxy tor`
### 2. Configure `/usr/pkg/etc/tor/torrc` to run **Tor** as a Bridge
......@@ -64,19 +60,17 @@ Don't forget to change the `ORPort`, `ServerTransportListenAddr`, `ContactInfo`,
### 3. Start `tor`:
```
ln -sf /usr/pkg/share/examples/rc.d/tor /etc/rc.d/tor
echo "tor=YES" >> /etc/rc.conf
/etc/rc.d/tor start
```
`# ln -sf /usr/pkg/share/examples/rc.d/tor /etc/rc.d/tor`
`# echo "tor=YES" >> /etc/rc.conf`
`# /etc/rc.d/tor start`
### 4. Monitor your logs
To confirm your bridge is running with no issues, you should see something like this:
```
tail /var/log/messages
```
`# tail /var/log/messages`
```
[notice] Your Tor server's identity key fingerprint is '<NICKNAME> <FINGERPRINT>'
......
......@@ -11,9 +11,8 @@ key: 8
body:
### 1. Install packages
```
pkg_add tor obfs4proxy
```
`# pkg_add tor obfs4proxy`
### 2. Edit your Tor config file
......@@ -60,17 +59,16 @@ Don't forget to change the `ORPort`, `ServerTransportListenAddr`, `ContactInfo`,
### 3. Create the tor log directory and give it the correct permissions:
```
mkdir /var/log/tor
chown _tor /var/log/tor
```
`# mkdir /var/log/tor`
`# chown _tor /var/log/tor`
### 4. Start the tor daemon and make sure it starts at boot:
```
rcctl enable tor
rcctl start tor
```
`# rcctl enable tor`
`# rcctl start tor`
### 5. Monitor your logs
To confirm your bridge is running with no issues, you should see something like this (`/var/log/tor/notices.log`):
......
......@@ -75,7 +75,7 @@ Don't forget to change the `ORPort`, `ServerTransportListenAddr`, `ContactInfo`,
If your bridge is behind a firewall or NAT, make sure to open both ports.
You can use [our reachability test](https://bridges.torproject.org/scan/) to see if your obfs4 port is reachable from the Internet.
### 4. Start tor
### 4. Start Tor
Open up the Command Prompt App. Change your directory with: `cd C:\Users\<user>\AppData\Roaming\tor\`. Type: `tor.exe -f torrc`.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment