Hello, everyone!
I am running I2P and would like to have it port-forwarded to help out the network. Even though I have port-forwarded both UDP and TCP, it always indicates “firewalled” or “symmetric NAT.” As far as I am aware, I do not have a symmetric NAT. I run many other port-forwarded services without any issues, some publicly, so I am not sure what the specific issue with I2P is.
EDIT: After some more digging i managed to fix the issue while using docker.
For some reason you need to add the environmental variable EXT_PORT
to the compose file like so
services:
i2p:
image: geti2p/i2p:latest
environment:
- EXT_PORT=XXXX <Make this the same port as the public UDP/TCP port>
volumes:
- /XXX/I2P-data/i2pconfig:/i2p/.i2p
- /XXX/I2P-data/i2ptorrents:/i2psnark
ports:
- 4444:4444
- 6668:6668
- 7657:7657
- XXXX:XXXX
- XXXX:XXXX/udp
I’m not very familliar with Java I2P, but I took a look at the documentation for Docker, and I didnt see anything about this issue, but I did have the same issue with i2pd in a container. I would try installing it manually and running it outside of the container.
If you need the bind mount feature from Docker, and you are on a systemd system, I recommand using systemd’s PrivateMounts feature. It can be added in a dropin file that can be created with the command
systemctl edit i2p.service
, thei2p.service
may be different depending on your distro, but for Java I2P’s package on Arch its justi2p.service
, but you can add the following in a dropin file to get the same private mounts just for your I2P router:[Service] PrivateMounts=yes BindPaths=/XXX/i2pconfig:/i2p/.i2p BindPaths=/XXX/I2P-data/i2ptorrents:/i2psnark
You might have to mess around with file permissions depending on who you run your I2P router as.
Sorry I dont have a better solution, I dont know much about Docker. But I think the developer of the Java I2P router is on r/i2p on reddit, and I think you can find him on http://i2pforum.i2p/, he prolly knows a whole lot more about Java I2P and the Docker image than I do.
I don’t see a use for the
PrivateMounts
it over complicates things in this case and doesn’t really add anything. just mounting the volumes shouldn’t cause any issues like this. I did run I2P in a VM instead of a container in the past but it hat the same issue.I will check out http://i2pforum.i2p/. I didn’t go to reddit but lemmy as i don’t like reddit since its downfall last year.
I managed to fix it. Although not obvious from the official docs, You need to add a extra environmental variable even when you have mapped the correct ports. I saw some error about it in the logs for the container then i searched for this variable and Found it listed here: https://github.com/i2p/i2p.i2p/blob/master/Docker.md