innernet icon indicating copy to clipboard operation
innernet copied to clipboard

Use UPnP (IGD) to setup port-forwarding to traverse NATs

Open strohel opened this issue 4 years ago • 0 comments

This would be one of techniques to help with #109. Ref: https://tailscale.com/blog/how-nat-traversal-works/#partially-manipulating-port-maps

Before connecting, innernet could try to find an IGD (internet gateway device) using UPnP on the local network, ask it to forward public port to the local private IP, and use that as listening port.

Could help with home NATs that may often contain enabled UPnP. Per the tailscale article this will probably help less with office NATs that may disable UPnP more often.

Implementation-wise, there is https://github.com/sbstp/rust-igd that looks straightforward to use. CC @mcginty @skywhale.

strohel avatar Jul 01 '21 14:07 strohel