Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UPnP and External IP #640

Open
hayesgm opened this issue Nov 20, 2018 · 0 comments
Open

UPnP and External IP #640

hayesgm opened this issue Nov 20, 2018 · 0 comments

Comments

@hayesgm
Copy link
Contributor

hayesgm commented Nov 20, 2018

Currently, we advertise our node as enode://{public_key}@127.0.0.1:30303 unless you pass in an EXT_IP_ADDRESS environment variable. If you're behind a gateway / router, even if you put your external IP address, it will still be impossible, based on NAT traversal, to connect inbound to your node (though, you should be able to connect outbound okay). UPnP is a protocol that allows a machine on a private network (behind a router) to accept inbound connections to a given port. We should allow our node to use UPnP to allow inbound connections, and we should properly set our external IP address in our node address without specifying it on the command line.

You can see the following options in Geth/Parity, which we should mimic:

--nat=[METHOD]
        Specify method to use for determining public address. Must be one of: any, none, upnp, extip:<IP>. (default:
        any)

We actually already ported a upnp erlang project to Elixir here: https://github.com/exthereum/nat_upnp (nat_upnp on hex). We could get that library up to date (the erlang library now has an option to get your external IP address that our fork doesn't), and use that for UPnP and external IP address discovery.

@hayesgm hayesgm changed the title UPN]P and External IP UPNP and External IP Nov 20, 2018
@hayesgm hayesgm changed the title UPNP and External IP UPnP and External IP Nov 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant