Configure the Tor anonymous service and anonymous website instance running on Linux

Source: Internet
Author: User
Configure the Tor anonymous service and anonymous website instance running on the Linux system-Linux Enterprise Application-Linux server application information. The following is a detailed description. After successfully configuring the Tor relay server on the Linux platform last month, based on the previous steps, I have studied how to use the Tor function to add the anonymous website configuration function on the same platform, this feature is very interesting and simple, but it is difficult to understand the official Tor website. I would like to share my experience with you.

In the official documents, I feel that it may have been translated by foreigners or people who do not know the specific technology very well. I repeatedly read it for an hour to understand what is going on. From the beginning, the fundamental role of Tor's relay server and client is to allow online users to access any website securely and anonymously, the relay service of Tor and the anonymous service of Tor are used to set up a website, which can only be accessed by users using Tor clients, in addition, users cannot track where your anonymous website is built. Even if the website content can be accessed normally, the Tor relay network has encrypted the node paths. To exaggerate, if everyone uses Tor to access the web page and all web sites are built through the Tor anonymous service, no one on the Internet will be able to track where the visitor visited the website, everything will become very private. Of course, the Tor anonymous service can not only configure web sites, but also be applied to SSH, MSN, and QQ network communication tools. This is a great and interesting invention.

I tested and set up an anonymous Web site on the Fedora 8 Linux platform. Because the Windows platform is too simple, I will not waste this text.

Step 1: Install a web server software on a Linux server

Anonymous websites do not have websites, but are websites that cannot be found. In fact, a website that no one can access is required. According to Tor official recommendation, I use thttpd, download from its official website (http://www.acme.com/software/thttpd/), I download is: http://www.acme.com/software/thttpd/thttpd-2.25b.tar.gz

Decompress the package and compile and install it as follows:

./Configure
Make
Make install

After installation, a directory is created to store web site data:

Mkdir/usr/local/hidserv/

Use commands to start the web service on port 5222 and only allow locahost access. This is safe enough to prevent non-Anonymous Access Requests:

/Usr/local/sbin/thttpd-p 5222-h localhost-dd/usr/local/hidserv/

If you want to run this website for a long time, you can add this command to the/etc/rc. d/rc. local file to start it at random.

In this case, access http: // localhost: 5222/on this Linux host should be able to see your content, but access from the Internet will not be able to access it.

Note: thttpd is not the only web server. thttpd is the simplest, so it is used as an example. If you need complicated applications, you can also use complicated web server software such as Apache, however, you need to take measures not to leak local information in Apache. This may be complicated and requires a lot of configuration considerations.

Step 2: Configure anonymous Web Services

The Tor relay server has provided the anonymous function. You do not need to install other software to open and modify the main configuration file torrc, other major configurations of the Tor relay server and torrc have been described in my previous articles. For details, see the previous log.

Vi/usr/local/etc/tor/torrc

Find a line "### This section is just for location-hidden services ###" and configure the following lines for anonymous services.

Add or activate the following two lines of configuration for the anonymous service information directory and port ing:

HiddenServiceDir/var/lib/tor/hidden_service/
HiddenServicePort 80 127.0.0.1: 5222

You need to create an anonymous service information directory in the system:

Mkdir/var/lib/tor/hidden_service

If you need to configure other non-web anonymous services, you can open other configurations in the file and configure them accordingly. Port ing can be performed on multiple rows without restrictions:

# HiddenServiceDir/usr/local/var/lib/tor/other_hidden_service/
# HiddenServicePort 80 127.0.0.1: 80
# HiddenServicePort 22 127.0.0.1: 22

Save the torrc file and restart the Tor service.

Then go to the/var/lib/tor/hidden_service/anonymous service directory and you will find two files:

-Rw --- 1 root 23 2008-03-17 14:56 hostname
-Rw --- 1 root 887 2008-03-17 private_key

The hostname stores the automatically generated anonymous URL, and the "o2ykh5czcfujbqty" is generated on my host. onion "is in this format. The client that uses the Tor enters" Region "in the browser. If the Tor client is not required, the domain name cannot be accessed, this is a private domain name only on the Tor network.

Private_key is an encrypted file that protects your private key. You must protect this file. Otherwise, someone else may impersonate your domain name or website.

My own anonymous Website "anonymous" website.

It's easy. If you are interested in Tor, you can try it. My installation and configuration process is smooth. If you have any problems, you can contact me. I am happy to provide you with advice.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.