Running tor on linux

Ubuntu Documentation

This page is a brief howto for using Tor under Ubuntu.

Introduction

  • Tor is a toolset for a wide range of organizations and people that want to improve their safety and security on the Internet. Using Tor can help you anonymize web browsing and publishing, instant messaging, IRC, SSH, and other applications that use the TCP protocol. Tor also provides a platform on which software developers can build new applications with built-in anonymity, safety, and privacy features.

This guide is an adaptation of the official Tor installation method. It has been changed to reflect installation methods unique to Ubuntu, but may easily be used as a guide for other Debian based distros.

Installing Tor

From the Snap Store

If you are only planning to use Tor as a client, you can install the tor snap from the Snap Store.

You can start, stop, restart, or check the status of the service with:

sudo systemctl start snap.tor.tor sudo systemctl stop snap.tor.tor sudo systemctl restart snap.tor.tor sudo systemctl status snap.tor.tor

Using APT

You may prefer to install from the Tor project’s own repository to ensure that you have the latest security updates: see the Tor Project installation documentation for Ubuntu for instructions.

To start, stop or restart the service:

sudo systemctl start tor sudo systemctl stop tor sudo systemctl restart tor

Check that the Tor service is running on TCP port 9050, where it will accept SOCKS5 connections from applications:

You should see either or both lines of the following output:

If you have configured a web browser to use Tor, you can check it is working by visiting https://check.torproject.org. Tor Project strongly recommends that you only use Tor Browser to browser the web with Tor, as it includes additional anti-fingerprinting protections that are not present in other browsers.

Читайте также:  Linux run bash files

Anonymizing Applications

Here are some common applications people configure for use with Tor on Ubuntu. The Tor FAQ lists more supported applications.

Pidgin

  1. Go to the Accounts, select your Account
  2. Select Edit Account
  3. Go to the Advanced Tab
  4. Under Proxy Options:
    • Select proxy type «Tor/Privacy (SOCKS5)»
    • Enter 127.0.0.1 for the host
    • Enter 9050 for the port
    • Leave user/pass blank

Mozilla Thunderbird

Thunderbird has native SOCKS5 support that can be enabled through the Tools / Options / Advanced / Network & Disc Space Tab. Click on the Connection button and then select Manual Proxy Configuration. Enter the details for your running Tor process:

Thunderbird should now be working. It’s best to test it at this point, although bear in mind that it might be leaking DNS information.

Assuming you now have Thunderbird working through Tor, the last step is to ensure that DNS resolves aren’t leaking information. Select the Tools / Options / Advanced / General Tab and then click on Config Editor. This will present you with a huge list of all the potential configuration options in Thunderbird. The list can be narrowed by typing proxy into the filter box. Find the option

network.proxy.socks_remote_dns

and make sure it’s set to true. If not, double-click it to toggle the setting. That’s it, Thunderbird should now be fully configured for use with Tor.

X-Chat

Right-click in the window and select Settings-> Preferences -> Network -> Network setup -> Proxy server

Use the following settings:

Hostname: 127.0.0.1 Port: 9050 Type: Socks5

IRSSI

If you run IRSSI on GNU Screen, open a new window (C-a C). If not, you’ll have to open a new tab or windows to connect to the proxy:

socat TCP4-LISTEN:5000,fork SOCKS4A:localhost:irc.oftc.net:6667,socksport=9050

On IRSSI, connect to localhost, on port 5000:

To ignore information leakage (client and time zone) run on IRSSI:

BitTorrent clients

File sharing is widely unwanted in the Tor network and exit nodes are configured by default to block file sharing traffic. Tor is not really designed for it and file sharing through Tor excessively wastes everyone’s bandwidth (slows down browsing). Finally, using current bittorrent clients over Tor is NOT anonymous and so does not provide any protection anyway!

Читайте также:  Cuda toolkit for linux

References and More Information

Tor (последним исправлял пользователь faun 2018-11-07 16:07:50)

The material on this wiki is available under a free license, see Copyright / License for details
You can contribute to this wiki, see Wiki Guide for details

Источник

Running tor on linux

Одно из главных условий защиты узла – своевременно устанавливать обновления безопасности. Лучше делать это автоматически, чтобы не забыть. Следуйте инструкциям по включению автоматического обновления программ для вашей операционной системы.

2. Настройте репозиторий Tor Project

Рекомендуемая настройка репозитория Tor Project для Debian/Ubuntu описана здесь. Пожалуйста, перед продолжением выполните эти шаги.

Внимание: пользователям Ubuntu следует использовать Tor из репозитория Tor Project.

3. Установите Tor

Убедитесь, что обновили пакеты, потом устанавливайте через apt :

# apt update # apt install tor 

4. Установите obfs4proxy

On Debian, the latest version obfs4proxy package is available in stable-backports. By default, backports packages are not installed, so to install the latest version of obfs4proxy you need to use the following command sudo apt install -t bullseye-backports obfs4proxy or to pin the package with a config similar to this one that you will place in /etc/apt/preferences.d/obfs4proxy.pref .

Explanation: tor meta, always run latest version of obfs4proxy Package: obfs4proxy Pin: release a=bullseye-backports Pin-Priority: 500 

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.

Если не получилось, попробуйте создать из исходника.

5. Найдите файл настроек Tor (обычно тут: /etc/tor/torrc ), откройте и замените содержимое на:

BridgeRelay 1 # Замените "TODO1" портом Tor по своему выбору. # Этот порт должен быть доступен извне. # Избегайте порта 9001. Он обычно ассоциируется с Tor. Цензоры могут знать об этом, просматривая Интернет. ORPort TODO1 ServerTransportPlugin obfs4 exec /usr/bin/obfs4proxy # Замените "TODO2" портом obfs4 по своему выбору. # Этот порт должен быть доступен извне и отличаться от порта, указанного для ORPort. # Избегайте порта 9001. Он обычно ассоциируется с Tor. Цензоры могут знать об этом, просматривая Интернет. ServerTransportListenAddr obfs4 0.0.0.0:TODO2 # Местный коммуникационный порт между Tor и obfs4. Всегда выбирайте значение "auto". # "Ext" значит "расширенный", а не "внешний". Не пытайтесь установить конкретный номер порта или слушать 0.0.0.0. ExtORPort auto # Замените "" вашим адресом email, чтобы мы могли связаться с вами в случае проблем с вашим мостом. # Это необязательно, но желательно. ContactInfo # Выберите название для своего моста. (Это необязательно). Nickname PickANickname 

Не забудьте изменить опции ORPort , ServerTransportListenAddr , ContactInfo и Nickname .

  • Если решите использовать фиксированный порт obfs4 со значением менее 1024 (например, 80 или 443), вам нужно дать obfs4 CAP_NET_BIND_SERVICE право связать порт с пользователем без прав суперпользователя:
Читайте также:  Intel one api linux

sudo setcap cap_net_bind_service=+ep /usr/bin/obfs4proxy

Для большей защиты systemd вам также понадобится установить NoNewPrivileges=no в /lib/systemd/system/tor@default.service и /lib/systemd/system/tor@.service , а затем запустить systemctl daemon-reload . Подробнее см. заявку 18356.

  • Обратите внимание: и OR-порт Tor, и порт obfs4 должны быть доступны. Если ваш мост находится за межсетевым экраном или NAT, убедитесь, что оба порта открыты. Чтобы проверить, доступен ли obfs4-порт из Интернета, можете использовать наш тест.

6. Перезапустите Tor

# systemctl enable --now tor.service 

А если Tor уже работает, перезапустите, чтобы изменения вступили в силу:

# systemctl restart tor.service 

7. Следите за логами

Доказательством того, что ваш мост работает без проблем, служит примерно такая запись (обычно в /var/log/syslog , или выполните # journalctl -e -u tor@default ):

[notice] Your Tor server's identity key fingerprint is ' ' [notice] Your Tor bridge's hashed identity key fingerprint is ' ' [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 :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. В завершение

Если у вас проблемы с настройкой моста, обратите внимание на наш раздел помощи. Если ваш мост работает прямо сейчас, загляните в примечания после установки.

Источник

Оцените статью
Adblock
detector