IPFS Configuration :: Funny NAT Issue(s) When Using Append Announce

I am using IPFS version:

root@raspberrypi:~# ipfs --version
ipfs version 0.20.0-rc2

I am using it on a raspberry PI.

It is on a local network, and the router has UPNP enabled.

My default address clauses in the config are:

  "Addresses": {
    "API": "/ip4/0.0.0.0/tcp/5001",
    "Announce": [],
    "AppendAnnounce": [],
    "Gateway": "/ip4/0.0.0.0/tcp/8080",
    "NoAnnounce": [],
    "Swarm": [
      "/ip4/0.0.0.0/tcp/4001",
      "/ip6/::/tcp/4001",
      "/ip4/0.0.0.0/udp/4001/quic",
      "/ip4/0.0.0.0/udp/4001/quic-v1",
      "/ip4/0.0.0.0/udp/4001/quic-v1/webtransport",
      "/ip6/::/udp/4001/quic",
      "/ip6/::/udp/4001/quic-v1",
      "/ip6/::/udp/4001/quic-v1/webtransport"
    ]
  },

The above setting works. I can store data into my node and retrieve it via CID.

“ipns” doesn’t appear to work.

I looked at the docs and saw:

“# Configure NAT and port forwarding” in Configure NAT and port forwarding | IPFS Docs → i.e. the guide for configuring NAT.

I port forwarded 4001 from my Public IP to my machine on 192.168.2.11.

Let my public IP address by XXX - it’s an ipv4 address.

I reconfigured the ipfs-daemon with:

  "Addresses": {
    "API": "/ip4/0.0.0.0/tcp/5001",
    "Announce": [],
    "AppendAnnounce": [],
    "Gateway": "/ip4/0.0.0.0/tcp/8080",
    "NoAnnounce": [
      "/ip4/XXX/tcp/4001",
      "/ip4/XXX/udp/4001/quic",
      "/ip4/XXX/udp/4001/quic-v1",
      "/ip4/XXX/udp/4001/quic-v1/webtransport"
    ],
    "Swarm": [
      "/ip4/0.0.0.0/tcp/4001",
      "/ip6/::/tcp/4001",
      "/ip4/0.0.0.0/udp/4001/quic",
      "/ip4/0.0.0.0/udp/4001/quic-v1",
      "/ip4/0.0.0.0/udp/4001/quic-v1/webtransport",
      "/ip6/::/udp/4001/quic",
      "/ip6/::/udp/4001/quic-v1",
      "/ip6/::/udp/4001/quic-v1/webtransport"
    ]
  },

But suddenly it stopped listening on 192.168.2.11:8080 and port 5001 and port 4001 on ANY address or device.

i.e. It seems to have stopped listening completely.

May 19 11:32:40 raspberrypi systemd[1]: Started IPFS daemon.
May 19 11:32:40 raspberrypi ipfs[31530]: Initializing daemon...
May 19 11:32:40 raspberrypi ipfs[31530]: Kubo version: 0.20.0-rc2
May 19 11:32:40 raspberrypi ipfs[31530]: Repo version: 13
May 19 11:32:40 raspberrypi ipfs[31530]: System version: arm/linux
May 19 11:32:40 raspberrypi ipfs[31530]: Golang version: go1.19.8
May 19 11:32:40 raspberrypi ipfs[31530]: Computed default go-libp2p Resource Manager limits based on:
May 19 11:32:40 raspberrypi ipfs[31530]:     - 'Swarm.ResourceMgr.MaxMemory': "4.1 GB"
May 19 11:32:40 raspberrypi ipfs[31530]:     - 'Swarm.ResourceMgr.MaxFileDescriptors': 262144
May 19 11:32:40 raspberrypi ipfs[31530]: Theses can be inspected with 'ipfs swarm resources'.

It is running.

SOMETHING is connected to my node on port 4001 but I don’t know what.

So I’m a little confused:

  • Why does adding the announce addresses stop the gateway (on port 8080)?
  • Why does adding the announce addresses stop the management console thing (on port 5001)?
  • What would a 192.168.2.11:54680 145.40.65.77:4001 ESTABLISHED 31530/ipfs be as reported by tcpdump -anp?

My goal is/was to figure out how to host a web-site on IPFS (because I can, as a hobby)…

I am not sure whether my question is at all clear because I don’t know what to ask, or the right words to ask it.

There is no firewall running but there is a NATted network (and the PI running ipfs is not on a public address).

DSL

This bug is a known deadlock that happens sometime, I think we fixed it, try updating your node to 0.20.0 :slightly_smiling_face:

(I’m not 100% sure please report here if it’s still broken once updated.)

I upgraded to 0.20.0 as suggested and it’s less broken - so we don’t get the known deadlock and my node doesn’t just “randomly stop listening to ports.”

I now can’t get https://ipfs.io/ipns/YYY (my client ID) to resolve but I think that’s either PEBCAK or some other misconfiguration.