Hey folks!

I just learned about I2P and already tested it successfully with I2Pd on my debian PC.

But I want to support the network 24/7 so I need to set it up on my raspberry pi 4 and I plan to use it from LAN.

So I installed it like described in the documentation for debian (https://docs.i2pd.website/en/latest/user-guide/install/#linux).

I changed my config via sudo nano /etc/i2pd/i2pd.conf and edited some things like this:

[http]
enabled = true
address = 0.0.0.0
port = 7070

[httpproxy]
enabled = true
address = 0.0.0.0
port = 4444

and I restarted with sudo systemctl restart i2pd

I am using the I2Pd-Firefox-Bundle and I changed the Firefox-settings (Settings -> Network Settings) to this:

(pointing to my raspberry pi)

.i2p-Sites are working well so far, but I am not able to open the webconsole with this configuration. I try to open it with http://192.168.178.26:7070/ but I only get host mismatch.

What am I doing wrong?

Thanks in advance!

~sp3ctre

Edit:

A solution has been found with nginx:

On the Pi:

sudo apt update
sudo apt install nginx

Followed by:

sudo nano /etc/nginx/sites-available/i2pd

Edit to:

server {
    listen 8080;
    server_name _;

    location / {
        proxy_pass http://127.0.0.1:7070/;
        proxy_set_header Host localhost;
    }
}

Enable the file:

sudo ln -s /etc/nginx/sites-available/i2pd /etc/nginx/sites-enabled/

Deleted the nginx-default-site

sudo rm /etc/nginx/sites-enabled/default
    • sp3ctre@feddit.orgOP
      link
      fedilink
      English
      arrow-up
      2
      ·
      11 days ago

      Unlike curl 127.0.0.1:7070 (which gives a host mismatch as well) curl localhost:7070 is actually working, but sadly, only locally on the Pi itself :(.

      • Redjard@reddthat.com
        link
        fedilink
        English
        arrow-up
        2
        ·
        11 days ago

        I made a quick demo of an nginx server block that forwards like that, listening on :7071 of whereever you run nginx. It’s completely untested so may have issues.

        server {
          listen      7071;
          listen [::]:7071;
          
          location / {
            proxy_http_version 1.1;
            proxy_set_header  Host  localhost;
            proxy_pass http://<pi-ip>:7070;
          }
        }
        
        • sp3ctre@feddit.orgOP
          link
          fedilink
          English
          arrow-up
          2
          ·
          10 days ago

          Thanks! I will take a look at it, when I’m home (I’m not that familiar with nginx).

      • Redjard@reddthat.com
        link
        fedilink
        English
        arrow-up
        1
        ·
        11 days ago

        I missed that you are using it remotely.
        You can set up a proxy with nginx that changes the host parameter to localhost then connect to that.
        Or you can for example use an addon that sends a custom Host value.

        Fundamentally the hostname is just a freetext field you can fill however you want.