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

Disable port-mapping if more than one NAT router detected #1850

Closed
zolia opened this issue Mar 6, 2020 · 0 comments · Fixed by #1890
Closed

Disable port-mapping if more than one NAT router detected #1850

zolia opened this issue Mar 6, 2020 · 0 comments · Fixed by #1890
Assignees
Labels
component:node NAT NAT bypass feature

Comments

@zolia
Copy link
Contributor

zolia commented Mar 6, 2020

portmap.Interface provided by github.com/ethereum/go-ethereum/p2p/nat returns external IP of a router:

// This method should return the external (Internet-facing)
// address of the gateway device.
ExternalIP() (net.IP, error)

If such IP falls into such IP classes:

192.168.0.0 / 16
172.16.0.0 / 16 
10.0.0.0 / 8 

We then consider that given router is behind another router and we should not use port-mapping.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:node NAT NAT bypass feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants