PurpleI2P / i2pd

🛡 I2P: End-to-End encrypted and anonymous Internet
https://i2pd.website
BSD 3-Clause "New" or "Revised" License
3.22k stars 415 forks source link

How to access hidden service from local network? No information in config docs #2091

Open mailerdevbro opened 4 weeks ago

mailerdevbro commented 4 weeks ago

I have set up some I2P tunnels to remote services using i2pd.

On the client, all ports respond and everything works.

However, other systems in local network can not access ports on client. The WebConsole port (7070) and the SAM port (7656) can access fine from any machine in local network, but tunnels from tunnel.conf only can be access from the localhost running i2pd.

Client tunnels all I have "address = 127.0.0.1". I have tried change it to "address = 0.0.0.0" but then it stop working entirely.

The i2pd client is act as a I2P gateway for whole network so I need this functionality. Is possible to do this, and how? Thank you

edit: I have now confirmed that HTTP proxy port 4444 becomes accessible to local network if I change address from 127.0.0.1 to 0.0.0.0. Looks like all of the services baked into i2pd work as expected, but not my tunnels...

Vort commented 4 weeks ago

I suggest you to try setting your IP address instead of 0.0.0.0.

yhaenggi commented 4 weeks ago

0.0.0.0 does work as address. show your tunnels.conf and the output of sudo netstat -tunelp | grep i2pd (remove the port you've chosen for i2pd from this list)

anikey-from-i2p commented 3 weeks ago

A workaround would be to use the socat program to forward local (i.e. 127.0.0.1) ports into the network. An example usage is: socat TCP-LISTEN:8888,fork TCP:127.0.0.1:7777 (where 8888 is the external port, and 7777 is the internal port).

You can also try to use the same external and internal port with: socat TCP-LISTEN:7777,bind=192.0.2.1,fork TCP:127.0.0.1:7777 (where 7777 is as before, and 192.0.2.1 is your ip address [don't forget to replace it])

The fork option is necessary because otherwise socat will only process one connection and then exit.