Skip to content

Add UPnP IPv6 pinhole support with keepalive and test tool#3455

Open
prkbuilds wants to merge 1 commit intolibp2p:masterfrom
prkbuilds:feat/upnp-for-v6-firewalls
Open

Add UPnP IPv6 pinhole support with keepalive and test tool#3455
prkbuilds wants to merge 1 commit intolibp2p:masterfrom
prkbuilds:feat/upnp-for-v6-firewalls

Conversation

@prkbuilds
Copy link

Addressing the problem with v6 stateful routers mentioned in

Summary

  • Add UPnP WANIPv6FirewallControl1 pinhole manager with lease keepalive and health checks
  • Add combined IPv4/IPv6 NAT manager for opt‑in use
  • Add a small pinhole-check tool and README for manual validation

Context

This addresses the UPnP AddPinhole approach discussed in #2496 . RFC3633 prefix delegation is intentionally out of scope in this PR.

Usage

Opt‑in via:

  • libp2p.NATManager(basichost.NewUPnPCombinedNATManager)

AI Assistance

AI assistance used to draft and refine the implementation over my direction.

My thinking / direction

  • The core issue is inbound reachability for IPv6 nodes behind stateful firewalls where DCUTR adds latency.
  • UPnP pinholes are a practical, user‑transparent option when routers expose WANIPv6FirewallControl.
  • This PR focuses on the pinhole path only; RFC3633 is larger and needs OS‑level privileges and different workflows.
  • I kept it opt‑in to avoid changing default behavior until there’s broader validation.

Question

Is this direction OK, and should I proceed with additional work (e.g., RFC3633 exploration, more robust address change handling, or optional auto‑enable)?

@prkbuilds
Copy link
Author

@MarcoPolo can you guide me if there are any changes that i need make or something I need to revisit?

github.com/caddyserver/certmagic v0.21.6
github.com/gogo/protobuf v1.3.2
github.com/google/uuid v1.6.0
github.com/ipfs/go-datastore v0.6.0
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please backout all the dependency update changes

@@ -0,0 +1,57 @@
package main
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't it make more sense to use the go-libp2p logic for this?

@MarcoPolo
Copy link
Collaborator

Have you tested this locally with your own router? Can you share your router details?

It would help to see if this works with other home router implementations as well, if you could try others and compile a list that would be great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants