To install I2P router, add I2P repository in:
echo "deb http://deb.i2p2.no/ stable main" > /etc/apt/sources.list.d/i2p.list echo "deb-src http://deb.i2p2.no/ stable main" >> /etc/apt/sources.list.d/i2p.list
Download repository key:
wget -O debian-repo.pub http://www.i2p2.de/_static/debian-repo.pub
Insert key into apt:
apt-key add debian-repo.pub
Update the list of available packages:
After the completion of update, install I2P router and repository key package:
apt-get install i2p i2p-keyring
After the setup is complete, set router to switch on at system startup:
service i2p restart
Now, let’s move to installation of software for our website to run on (Installation of nginx+php-fpm+mysql+wordpress is described in our previous post).
NOTE: in “server” section of website configuration file, use directive “listen 127.0.0.1:80” instead of “listen 80”. This is done to make the website accessible only through I2P network.
After the installation and startup of Nginx and remaining software, configure the router.
In order to get access to router web console, the following command can be used:
ssh -L 127.0.0.1:7657:127.0.0.1:7657 email@example.com
where xx.xx.xx.xx ip-address of our vps.
Its purpose – with ssh connection we forward the local machine port to the port of our VPS. In other words, when accessing our 7657 local port the connection will be established with 7657 port on our VPS (I2P router launches web console on this port).
Further, go to http://127.0.0.1:7657/config.jsp and start customizing our new router.
First of all, choose the desired interface language, I2P Internals -> UI -> Roter Console Language
Next, customize channel restrictions, I2P Internals -> Bandwidth
Here the desired bandwidth of your router can be set. Since this router will be used to access our website, it is sensible to up In/Out to the maximum of channel’s capacity, share to 90% - 100 %.
Next, move to I2P tunnel and add tunnel for accessing our webserver, 2P Server Tunnels -> choose http -> create
In the opened window, fill in all configurations fields:
Description – any description, Target host: 127.0.0.1 - VPS internal interfaceTarget port: 80 – this particular port responds to nginx. Essentially, any port can be used here, but it must match the port in nginx “listen” directive. Website name – name of your website in I2P network.
Tunnel parameters, it’s profile, access control list, connection limits and so on can be set in “Advanced networking”. Here, everything can be left to be as before.
Now we can see the new tunnel in I2P Server Tunnels. Wait for the status to change to green star and copy the link of the “preview” button. Using this link you can access your website through I2P network. In order for this link to work, you need a locally installed I2P router and web browser that uses it as proxy server. Installation instructions for other operating systems can be hound here.
If you don't have time to perform this procedure, dont have enough experience to be sure it'll work correctly, please feel free to turn to our support team for help. Our specialist can assist you in this matter or perform the whole procedure for you.
We would also love to see some comments and feedback about this tutorial below.