未加星标

Setting up your own Tor Relay

字体大小 | |
[系统(linux) 所属分类 系统(linux) | 发布者 店小二03 | 时间 2016 | 作者 红领巾 ] 0人收藏点击收藏

Have you ever wanted to contribute to the Tor project, but never knew how to do it? Why not running a Tor relay ?The more people runningrelays, the faster the Tor network will be.

This shortguide from the recent CryptoParty workshop helps you withlaunching a virtual machine and configuring it as a Tor relay.

Registering with a cloud provider

The first step is registering a user account with a cloud provider. If you have your own virtual server already, or you prefer a different server hosting provider, then skip to the next section.

#1. Click here (affiliate link) to register a new user account on Vultr

Disclosure: Get +$20 when you spend $10 and I willreceive $30 for the referral. All referral bonus supports Privacy for Journalists .


Setting up your own Tor Relay

#2.You should receive anemail from Vulr. Click on the link inside to verify your email address.

#3.Link credit card or PayPal account under ‘ Billing ‘ fromthe control panel. Theverificationis a pre-requisite of launching virtual machines (VM).

#4.Apply a promo code under ‘ Billing ‘:

NGINX20+$20.00

GIVEME10+$10.00

Launching a virtual machine

Once you have registered and verified the user account, you can launch a virtual server for the Tor agent.

#1.Go to ‘ Deploy ‘ to launch a new VM

#2.Configure the VM as the following:

Server Location: <your preferred location>

Server Type:Ubuntu 16.04 x64

Server Size:15 GB SSD for $5/mo

Additional Features:Enable IPv6

Startup Script:None

SSH Keys:None (you can add later)

Server Hostname:myrelay

Server Label:tor

#3.Click on ‘ Deploy Now ‘ button at the bottom to launch the VM

#4.Go to ‘ Servers ‘and click on your new server to open its details

#5.Click on the eye icon in the bottom-left corner to reveal the root password

#6.Take note of your SSH login details

IP Address: <shown on the server details page>

Username:root

Password: <as shown at step #5>

Configuring the operating system

Once the VM is up and running, we need to keep everything up-to-date before we install Tor. Let’s update the system and configure auto-update, shall we?

#1.Log into your VM with SSH

#2.Upgrade theoperating system

# apt-get update && apt-get dist-upgrade -y

Note: If this fails with “E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?” , it means thatthe packages are already updated automatically in the background . Wait a few minutes and try again.

#3.Configure auto-upgrade

# apt-get install unattended-upgrades -y

# dpkg-reconfigure priority=low unattended-upgrades

Choose ‘ Yes ‘ when prompted and press ‘ Enter ‘ for the default settings

Install the Tor agent

Finally, we are installing the Tor agent onto the virtual machine. We prefer using the software repositories provided by the Tor project over the Ubuntu release.

#1.Add the Tor software repository to Ubuntu:

# echo ‘deb http://deb.torproject.org/torproject.org xenial main’ >> /etc/apt/sources.list.d/tor.list

# echo ‘deb-src http://deb.torproject.org/torproject.org xenial main’ >> /etc/apt/sources.list.d/tor.list

#2.Add the gpg key used to sign the packages by running the following commands at your command prompt:

# gpg keyserver keys.gnupg.net recv 886DDD89

# gpg export A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 | sudo apt-key add

#3.You can install the agentwith the following commands.Choose ‘ Yes ‘ when prompted

# apt-get update && apt-get install tor tor-arm deb.torproject.org-keyring -y

Configuring the Tor agent as a relay

The Tor agent needs some reconfiguration before it can start serving as a middle relay.


Setting up your own Tor Relay

#1.Rename the default Tor configuration file

# mv /etc/tor/torrc /etc/tor/torrc.default

#2.Open /etc/tor/torrc with your favourite text editor and add the following:

RunAsDaemon 1

DirPort 9030

Nickname blah

AccountingMax 950 GBytes

AccountingStart month 1 00:01

ContactInfo John Doe <[emailprotected]

>

ExitPolicy reject *:* # no exits allowed

#3.Change ‘ Nickname ‘ and ‘ ContactInfo ‘

Note: The email address in the ‘ContactInfo’ is public. We suggest obscuring the email addresses to avoid spam harvesting.

#4.Save the configuration file and exit the editor

#5.Start the Tor service

# systemctl stop tor

# systemctl starttor

#6.Verify if the relay is starting up correctlyby monitoring the log file

# tail -f /var/log/tor/log

You should have “ [notice] Bootstrapped 100%: Done ” in the log file if everything is working a-okay.

#7.Confirm Tor is running with the ‘arm’ utility

# arm

You can exit the arm utility by pressing ‘ q ‘

Check out therelay on Tor Atlas

Once everything is up and running, the relay should be publicly available on Tor Atlas . This service is a global catalogue of Tor relays and exit nodes.


Setting up your own Tor Relay

#1.Get the Tor relay fingerprint with the following command

# cat /var/lib/tor/fingerprint

The fingerprint is the second block of long string of letters and numbers

#2.Open the following URL in your browser:

https://atlas.torproject.org/#details/ <fingerprint from step #1>

Note: It may take up to 2-4 hours for your server to appear in Atlas. You should be able to find it by searching for its nickname set by the ‘Nickname’ parameter in /etc/tor/torrc

Furtherthings to do

Congratulations, you are now a proud contributor tothe Tor network! Here are a few additional things you may want to try out later:

Check out the guides at Tor Project Change the ‘ root ‘ password Add your SSH public key and disable password authentication Set up server monitoring (

本文系统(linux)相关术语:linux系统 鸟哥的linux私房菜 linux命令大全 linux操作系统

主题: UbuntuBootstrapIPv6
分页:12
转载请注明
本文标题:Setting up your own Tor Relay
本站链接:http://www.codesec.net/view/481306.html
分享请点击:


1.凡CodeSecTeam转载的文章,均出自其它媒体或其他官网介绍,目的在于传递更多的信息,并不代表本站赞同其观点和其真实性负责;
2.转载的文章仅代表原创作者观点,与本站无关。其原创性以及文中陈述文字和内容未经本站证实,本站对该文以及其中全部或者部分内容、文字的真实性、完整性、及时性,不作出任何保证或承若;
3.如本站转载稿涉及版权等问题,请作者及时联系本站,我们会及时处理。
登录后可拥有收藏文章、关注作者等权限...
技术大类 技术大类 | 系统(linux) | 评论(0) | 阅读(32)