📜 ⬆️ ⬇️

How to raise your i2p-site (eepsite) on VDS (VPS) under Ubuntu (LAMP). Briefing for beginners

Background: the other day a book was written about the new state system ( State-domain ), which is waiting for us in the near future. And since Roskomnadzor reacts inadequately to such things - I decided to start a website in my private i2p network for my writings. In the course of creation, I had to solve some technical issues that I will discuss below, trying to save your time, and I will also have a cheat sheet.

So , there is a remote VPS under Ubuntu, and you need to place the site on it. For, you can, of course, make it on your laptop, but when the laptop is turned off, the site is inaccessible (personally, this invariably annoys me in .i2p and .onion).

Further, I assume that your LAMP is already configured, and normally gives content to the normal Internet. Those. you already have a couple of ordinary (non-i2p) sites on it.
')
First we install i2p on Ubuntu:

sudo apt-add-repository ppa:i2p-maintainers/i2p sudo apt-get update sudo apt-get install i2p 

Configure the i2p router as a constantly running daemon:

 sudo dpkg-reconfigure -plow i2p 

In the course of configuration (via a graphical interface), you will need to answer a few simple questions, set autostart, I left the memory by default 128 MB, in general, I think you will have no problems with this.

Upon completion of the configuration, the i2p-daemon will start automatically.

Now we need the panel with the web interface of the i2p router to be available remotely. To do this, open the file

 /var/lib/i2p/i2p-config/clients.config 

And we change in it

 clientApp.0.args=7657 ::1,127.0.0.1 ./webapps/ 

on

 clientApp.0.args=7657 80.80.80.80 ./webapps/ 

Where instead

 80.80.80.80 

Set the external IP of your VPS. There is another option (from the developers of i2p), where you can replace with:

 clientApp.0.args=7657 0.0.0.0 ./webapps/ 

but I haven't tried it.

Now you have access to a web interface for managing your remote i2p router.

FIRST BUSINESS go to:

 http://80.80.80.80:7657/configui 

(instead of 80.80.80.80, substitute the IP of your VPS) and set the login password (so that no one will drag). Now only you have access to the web console (well, I hope so).

The guide recommends: "Go to localhost : 7657 / index.jsp and click on" Soft restart ", this will restart the JVM and all applications . " Do it. Do not forget to substitute the local IP of your VPS instead of localhost.

Now here is the jamb with i2p under Ubuntu 16.04: in the left pane of the web console you will see the inscription:
Warning: ECDSA is not available. Update Java or OS.

This is due to the fact that Ubuntu 16.04 uses ... in general, you need to put another Java, stable. I chose the option from Oracle.

 sudo add-apt-repository ppa:webupd8team/java sudo apt-get update sudo apt-get install oracle-java8-installer 

and further:

 sudo update-java-alternatives -s java-8-oracle 

Now you have to create a new HTTP tunnel to your site. You can do it here:

 http://80.80.80.80:7657/i2ptunnelmgr 

(IP change only)

Choose in “New open service” - HTTP (it is by default) and click “Create”. In field
Access Point: Address (H):

Specify the IP of your VPS. The port indicates which server is running (say, apache2, usually 80 or 8080), and in the field:
Website Name (W):

Write something like:

 moysite.i2p 

Put a daw on autorun. Optionally change the Name (N) and Description (e) .
The rest do not touch. Click on "Save."

Voila! Now your site is visible at a 32-bit key-address (like this: pqajparec44p74uvpxvxhpd5u3neuqs2t4awwd6bcieku3juhwwa.b32.i2p ) in the i2p network. And if you add your site to address books of various services, for example, here: stats.i2p , then with time your domain name moysite.i2p , which you specified earlier, will go to the address books of other services. And your site will be able to find directly by this name, or via jump-services.
But if my server gives several virtual hosts on one socket, how do I know which domain will be visible on the i2p network?

And a good question. In general, I also tested the installation on a working server with virtual hosts and solved the issue like this: I assigned a different port for i2p to the site (which we prescribed earlier when creating the tunnel). Let's do it together. Open:

 /etc/apache2/ports.conf 

And write there:

 Listen 8088 

For example, let us have this port number 8088.

To another config:

 /etc/apache2/sites-enabled/000-default.conf 

Write something like:

 <VirtualHost *:8088> ServerAdmin webmaster@localhost DocumentRoot /var/www/moysite ErrorLog ${APACHE_LOG_DIR}/error8088.log CustomLog ${APACHE_LOG_DIR}/access8088.log combined </VirtualHost> 

(by all means close the VirtualHost tag - on Habré glitch with the display of this piece of code)

DocumentRoot, of course, you change the path to a real one, to the one where you own the DocumentRoot folder for your i2p site. If not, create one. Save everything. Restart Apache:

 sudo service apache2 restart 

If you don’t want your i2p site to be visible from the usual Internet, put the .htaccess in the DocumentRoot directory as follows:

 Order deny,allow Deny from all Allow from 80.80.80.80 

80.80.80.80 - change your VDS to IP.

Go to stats.i2p and add your site to the local service.

After adding your site becomes available, for example, like this:

stats.i2p / cgi-bin / jump.cgi? a = r.i2p

(this is the address of the site, which I did)

And yes, in general, it’s more logical not to host an i2p site on a working VPS. It is better to take something separate under i2p. Well, I see it that way.

If there is additional. Installation questions - Wellcome to kamenty.

References to used docks:

→ geti2p.net/ru/faq
→ help.ubuntu.ru/wiki/i2p
→ help.ubuntu.ru/wiki/java

Source: https://habr.com/ru/post/327684/


All Articles