1. Habilita Actualizaciones Automáticas de Software
One of the most important things to keep your relay secure is to install security updates timely and ideally automatically so you can not forget about it. Follow the instructions to enable automatic software updates for your operating system.
2. Configura el Repositorio del Tor Project
Configuring the Tor Project's package repository for Debian/Ubuntu is recommended and documented on Support portal. Please follow those instructions before proceeding.
Note: Ubuntu users need to get Tor from the Tor Project's repository.
3. Instala Tor
Asegúrate de actualizar la base de datos de paquetes antes de instalar el paquete, luego llama a apt
para instalarlo:
# apt update
# apt install tor
4. Install obfs4proxy
On Debian, the obfs4proxy
package is available in unstable, testing, and stable. On Ubuntu, bionic, cosmic, disco, eoan, and focal have the package. If you're running any of them, sudo apt-get install obfs4proxy
should work.
Si no, puedes compilarlo a partir del código fuente.
5. Edita tu archivo de configuración Tor, usualmente ubicado en /etc/tor/torrc
, y reemplaza su contenido con:
BridgeRelay 1
# Reemplaza "TODO1" con un puerto Tor de tu elección.
# Este puerto debe ser alcanzable desde el exterior.
# Evita el puerto 9001, porque comúnmente está asociado con Tor, y los censores pueden estar escaneando Internet en él.
ORPort TODO1
ServerTransportPlugin obfs4 exec /usr/bin/obfs4proxy
# Reemplaza "TODO2" con un puerto obfs4 de tu elección.
# Este puerto debe ser alcanzable desde el exterior, y ser diferente del especificado para ORPort.
# Evita el puerto 9001, porque comúnmente está asociado con Tor, y los censores pueden estar escaneando Internet en él.
ServerTransportListenAddr obfs4 0.0.0.0:TODO2
# Puerto de comunicación local entre Tor y obfs4. Siempre ajústalo a "auto".
# "Ext" significa "extendido", no "externo". No intentes establecer un número de puerto específico, ni escuchar en 0.0.0.0.
ExtORPort auto
# Reemplaza "<address@email.com>" con tu dirección de correo electrónico, de manera que podamos contactarte si hay problemas con tu puente.
# Esto es opcional, pero te alentamos a que lo hagas.
ContactInfo <address@email.com>
# Elige un sobrenombre que te guste para tu puente. Esto es opcional.
Nickname PickANickname
No olvides cambiar las opciones ORPort
, ServerTransportListenAddr
, ContactInfo
, y Nickname
.
- Si decides usar un puerto obfs4 fijo menor que 1024 (por ejemplo 80 o 443), necesitarás darle a obfs4 la capacidad
CAP_NET_BIND_SERVICE
, para enlazar el puerto con un usuario no privilegiado:
sudo setcap cap_net_bind_service=+ep /usr/bin/obfs4proxy
Para eludir una parametrización más restrictiva en systemd, también necesitarás establecer NoNewPrivileges=no
en /lib/systemd/system/tor@default.service
y /lib/systemd/system/tor@.service
, y luego correr systemctl daemon-reload
. Por más detalles, ver tique 18356.
- 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 to see if your obfs4 port is reachable from the Internet.
6. Restart Tor
Enable and Start tor
:
# systemctl enable --now tor@default
Or restart it if it was running already, so configurations take effect:
# systemctl restart tor
7. Monitorea tus registros
Para confirmar que tu puente está corriendo sin problemas, deberías ver algo como esto (usualmente en /var/log/tor/log
o /var/log/syslog
):
[notice] Your Tor server's identity key fingerprint is '<NICKNAME> <FINGERPRINT>'
[notice] Your Tor bridge's hashed identity key fingerprint is '<NICKNAME> <HASHED FINGERPRINT>'
[notice] Registered server transport 'obfs4' at '[::]:46396'
[notice] Tor has successfully opened a circuit. Looks like client functionality is working.
[notice] Bootstrapped 100%: Done
[notice] Now checking whether ORPort <redacted>:3818 is reachable... (this may take up to 20 minutes -- look for log messages indicating success)
[notice] Self-testing indicates your ORPort is reachable from the outside. Excellent. Publishing server descriptor.
8. Notas Finales
Si estás teniendo problemas para configurar tu puente, dale un vistazo a nuestra sección de ayuda. Si tu puente ahora se está ejecutando, comprueba las notas postinstalación.