Skip to content

When using alternate public-ip resolution and ipv6 networking, node prefers ipv6 and is sidelined as being offline. #3078

Open
@haight6716

Description

@haight6716

Describe the bug
When:

  • using an external IP resolution service via the public-ip-resolution-service option
  • using a server with an ipv6 address
  • calling getNodeIP
  • only the ipv6 address is returned as "ip"
  • only ipv6 clients can connect inbound
  • stats.avax.network decides the node is offline

To Reproduce

  • Configure a server on a network behind ipv4 NAT but with a public ipv6 address.
  • Configure avalanchego to use opendns for self-address identification
  • Start the node.

Expected behavior
Node should appear healthy on stats.avax.network. It does not.

Screenshots

    "jsonrpc":"2.0",
    "id"     :1,
    "method" :"info.getNodeIP"
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/info
{"jsonrpc":"2.0","result":{"ip":"[2601:602:8e00:ce98:86c5:2292:57ec:656b]:9651"},"id":1}

Operating System
Ubuntu 12.04

Additional context
Discussed in node-support discord:
https://discord.com/channels/578992315641626624/620633143002660874/1246927981780271205

Possible enhancement would be to publish both ip and ipv6 keys, as appropriate, in the info.getNodeIP API result. Let clients decide which they prefer. Currently it seems a single node can serve only ipv4 or ipv6, never both. This might lead to a bifurcated network in the worst case.

This suggests that an ipv6 node will always be shown as "offline" by stats.avax.network. The stats-tracker should also be fixed to avoid this - ipv6 addresses should be acceptable public ips, but if the stats server has no ipv6 address, it cannot connect.

Workarounds

  • Use UPnP to fetch your public IPs, by removing the public-ip-resolution-service config option.
  • Set your public IP manually by using the public-ip config option.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Backlog 🧊

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions