Problem installing 2.4.0 on linux ubuntu dedicated server

I2P router issues
Post Reply
Rancho
Posts: 8
Joined: 24 Dec 2023 03:02

Problem installing 2.4.0 on linux ubuntu dedicated server

Post by Rancho »

I decided to install the 2.4.0 on my linux ubuntu server, this is a remote service, a paid server not in home and it will be used for the community with 12 gb of ram and 6 processors. If I am not mistaken this 2.4.0 is for install on linux but not the recommended install for ubuntu debian systems.But I wanted the newer 2.4.0 benefits and did not want to erase the other installs on this server.Hopefully the community can give me some guidance.I have gotten to about the end of installing the 2.4.0 via command line and it appears the command to run is i2prouter. At first I had permissions problems to run but that was easy to fix but now when I try to run this it gives me an error:

i2p@xxxxxx:~/i2p$ bash i2prouter
Usage: i2prouter [ console | start | stop | graceful | restart | condrestart | status | install | remove | dump ]

Commands:
console Launch in the current console.
start Start in the background as a daemon process.
stop Stop if running as a daemon or in another console.
graceful Stop gracefully, may take up to 11 minutes.
restart Stop if running and then start.
condrestart Restart only if already running.
status Query the current status.
install Install to start automatically when system boots.
remove Uninstall.
dump Request a Java thread dump if running.

i2p@xxxxxs:~/i2p$ console

Command 'console' not found, but can be installed with:

apt install conserver-client
Please ask your administrator.


Could this be a problem with my install of java or? I installed an open jdk from amazon correto 21, maybe another command?

I installed the gui 2.4.0 on my laptop just to play and it is nice i like the GUI. What I want to do here is be able to login to the dedicated server from command line and type the needed command and have the GUI open on here, to GUI control it from remote.
Any guidance from the pros here would be appreciated,I have been working on this almost 5 days and it seems like it is very close...excited!
anikey
Posts: 22
Joined: 30 Nov 2023 20:08

Re: Problem installing 2.4.0 on linux ubuntu dedicated server

Post by anikey »

When it lists commands, it means subcommands.

So, what you should do is type the first command, and add a space at the end, then the subcommand.

For example, if you want to start router:

Code: Select all

bash i2prouter start
(descriptions of all subcommands are listed in your post).

About opening webgui 'here': (assuming you're using ssh)
you need to forward the webgui port (7657) from the server to your local machine: (this is how to start ssh session with the port forward)

Code: Select all

ssh <put your user@server.ip-or-something> -L7657:localhost:7657
This will make the port 7657 on your local machine connect to port 7657 on your server.
After running that command (and when i2p started) point your browser to localhost:7657 - and that is the router console

Edit: By the way, you mentioned permission problem. If it said "permission denied" if you ran "./i2prouter", then that is fixed by:

Code: Select all

chmod +x ./i2prouter
Rancho
Posts: 8
Joined: 24 Dec 2023 03:02

Re: Problem installing 2.4.0 on linux ubuntu dedicated server

Post by Rancho »

Hello thank you for the fast feedback and reply.I was worried that this forum does not get much traffic and response would be slow.Ok so I need to run :

ssh <i2p@server.ip> -L7657:localhost:7657
Run this on my local machine (laptop)??
Then change proxy configuration on Firefox for example to localhost:7657. -so we will abandon the use of the i2p default 4444 ?

Then at that point after I login to my server based user (which is i2p) , if I run
bash I2prouter start
on my local machine. via ssh it should start the process on the remote machine and show it here on my laptop, the 2.4.0 gui coming from the dedicated server…right?

What is the order to execute the process? Like first do this and second…?
Also what do I need to do to tell the server to continue running because it is to never shut down, the server must work 24 hours a day.

THANK YOU
anikey
Posts: 22
Joined: 30 Nov 2023 20:08

Re: Problem installing 2.4.0 on linux ubuntu dedicated server

Post by anikey »

:7657 is the webgui/webconsole port. It is used to control the i2p router, and it also hosts susimail gui (mail client) and i2psnark gui (torrent client).
:4444 is the http proxy port. you set that port in your browser settings to access i2p sites (and outproxies).

If you want to forward both ports from you server, you need to run (on your laptop):

Code: Select all

ssh i2p@server.ip -L7657:localhost:7657 -L4444:localhost:4444
(of course replace 'server.ip' with your server's ip)
If you want to forward more ports, just append more arguments with the form of:

Code: Select all

-L<port on laptop>:localhost:<port on server>
After running the command, you get connected to your dedicated server, and the ports get forwarded from it to your laptop.

If the i2p router is not running on that dedicated server yet, (please first read the below section about 'continue running'), and then you should start it with the command you mentioned ('bash i2prouter start', but don't forget to cd to the directory of i2p first). This command should start the i2p router but it won't automatically open the browser.

Then just open firefox, and type localhost:7657 in the address bar, that gui is coming from the dedicated server. Change firefox http proxy to localhost:4444 if you want your traffic to go through the dedicated server's i2p router.

If you stop the ssh session, the i2p router on the server should still be running (read section on 'server to continue running' below), you can reconnect to it with the same command.

If you want to also run i2p router on your laptop. (not necessary if you dont want to).
If you also want to start i2p router on your laptop, it might be problematic if the ports are forwarded (because the ports are already taken by ssh), and vice versa (it will be problematic to forward ports with ssh if an i2p rotuer is running on your laptop).
The solution is to use different ports when forwarded: when connecting with ssh, choose a different local port for forwarding. Let's say you picked :5678 for webgui and :5679 for http proxy. Now change the respective ports in the 'ssh' command, it should become:

Code: Select all

ssh i2p@server.ip -L5678:localhost:7657 -L5679:localhost:4444
Now you can start i2p on laptop (and ssh's port forward won't interfere, as it uses different local ports now on laptop). Then you should change firefox to point to localhost:5678 for webgui and localhost:5679 for http. (if you want it to go through your laptop i2p router, then don't change it and leave at 4444).
(of course replace 5678 and 5679 with ports that you picked). It might be problematic if you pick port 1024 or lower, so don't do that.

Now about that 'server to continue running'.
If it does not continue running when you disconnect from ssh, it is maybe automatically stopped by server's OS. You can fix that by installing the program called 'tmux' which allows you to create a persistent shell session.
After installing tmux on the server (apt install tmux) but before starting i2p, create new tmux session by running:

Code: Select all

tmux
Now the screen clears, and a green line appears at the bottom. This means you're in a tmux session. Now go ahead and start i2p. It should start, and now you can 'detach' from tmux by pressing 'Ctrl+b' and then pressing 'd'. The session is now detached, and you can log out from ssh.
When you want to go back in, after logging in run

Code: Select all

tmux attach
This will get back your tmux session.
Please check that tmux gets back after logging out and disconnecting from ssh, because it might still get killed if your server has systemd-logind (or so i've read on the internet). If it gets killed you'll have to change config of systemd-logind.
Rancho
Posts: 8
Joined: 24 Dec 2023 03:02

Re: Problem installing 2.4.0 on linux ubuntu dedicated server

Post by Rancho »

I was able to setup tmux without problems and it is running, also the i2p server started without problem, now the only problem is I am not able to login according to the comands you stated
I did have some problem because the default SSH port on my server has been changed to 1050 for example. But after making some changes it then tried to login and passed login with my password but then gave other errors.At this point I have not changed any setting in Firefox yet, just the Proxy 4444 port that was required to browse the i2p network
Please see these error messages that prevent the ability to login and stream the servers gui to my laptop


Here I tried : ssh i2p@server.ip -L7657:localhost:7657 -L4444:localhost:4444

Error message, some fields changed, done from my laptop sshing into the server:

xxxxxxxx$ ssh i2p@57.10.54.23 -port 1050 L7657:localhost:7657 -L4444:localhost:4444
Password:
bash: L7657:localhost:7657: command not found


Here I tried : ssh i2p@server.ip -L7657:localhost:7657
Error message below, some fields changed:

ssh i2p@57.10.54.23 -p 1050 L7657:localhost:7657
The authenticity of host '[57.10.54.23]:1050 ([57.10.54.23]:1050)’ can't be established.
ECDSA key fingerprint is SHA256:7YEhsJxuf2DWb0mC9ftXp2VIaZtIBD5oKsnQSpLw.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '[57.10.54.23]:1050 (ECDSA) to the list of known hosts.
Password:
bash: L7657:localhost:7657: command not found
anikey
Posts: 22
Joined: 30 Nov 2023 20:08

Re: Problem installing 2.4.0 on linux ubuntu dedicated server

Post by anikey »

Rancho wrote: 02 Jan 2024 00:29 bash: L7657:localhost:7657: command not found
This error is because you did not put a - symbol before L. Correct command would be:

Code: Select all

ssh i2p@server.ip -p 1050 -L7657:localhost:7657 -L4444:localhost:4444
(notice the hyphen before 'L').

The 'authenticity of host' message appeared because, well, the ssh port changed. Nothing to worry about, i guess.

Also i strongly recommend you to setup key-based ssh authentication, but this falls out of scope of i2p, there are lots of guides on the internet on how to do this.
Rancho
Posts: 8
Joined: 24 Dec 2023 03:02

Re: Problem installing 2.4.0 on linux ubuntu dedicated server

Post by Rancho »

Image


Hello, I got everything to work and I appreciate the help, this will be a great tutorial for many people. I have another question :D
Attached is a screenshot of the hidden services server configuration area.Here are the questions

1. what port should it be 80?
2. would you check the ¨use ssl to connect to target¨?

Also where do you upload or place the first page, the index.html?

Thank you
anikey
Posts: 22
Joined: 30 Nov 2023 20:08

Re: Problem installing 2.4.0 on linux ubuntu dedicated server

Post by anikey »

Rancho wrote: 02 Jan 2024 20:47 1. what port should it be 80?
It should be the port of a normal http server (i.e. nginx, apache, etc.). Usually it's 80, but AFAIK i2p has some sort of built-in http server called jetty, which runs on port 7658, so if you want to use that then put 7658 i guess.
Rancho wrote: 02 Jan 2024 20:47 2. would you check the ¨use ssl to connect to target¨?
If you're running it locally then no.
That option might be useful if you're creating a simple proxy from i2p into a specific site in clearnet, but i don't know if it would be good to do that.
Rancho wrote: 02 Jan 2024 20:47 Also where do you upload or place the first page, the index.html?
If you're using jetty, the site documents should be in ~/.i2p/eepsite/docroot
If you're using anything else, it might be anywhere, according to http server's config.

P.s. that jetty server (located at localhost:7658) has some info on how to set up i2p sites: http://localhost:7658/help/
Rancho
Posts: 8
Joined: 24 Dec 2023 03:02

Re: Problem installing 2.4.0 on linux ubuntu dedicated server

Post by Rancho »

Ok good news, I will study jetty.Now another thing I am trying to study is about an app or plugin called EndGame. I heard about this Engame and supposedly it is a captcha that the website visitor will have to complete before visiting the eepsite.
Have you heard about this ¨Endgame¨, there is almost no information about it, actually no info about it that I can find online through a search engine...this is why I ask here.I dont want to bother you too much but...you are a gold mine.
anikey
Posts: 22
Joined: 30 Nov 2023 20:08

Re: Problem installing 2.4.0 on linux ubuntu dedicated server

Post by anikey »

Endgame indeed seems to be some captcha system, although it looks like is related to tor, not i2p. I don't know whether you can get it on i2p or not.
I'm guessing it's mostly for big and popular sites on tor which would get a lot of visitors.
I am able to get some more info (using duckduckgo and query "endgame captcha"). But this is not directly related to i2p so i won't discuss here.
Post Reply