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 port forwarding fail on local ip change #698

Closed
Tracked by #793
Neylix opened this issue Nov 17, 2022 · 1 comment
Closed
Tracked by #793

Upnp port forwarding fail on local ip change #698

Neylix opened this issue Nov 17, 2022 · 1 comment
Assignees
Labels
bug Something isn't working networking Involve networking

Comments

@Neylix
Copy link
Member

Neylix commented Nov 17, 2022

Describe the problem you discovered

Actually we use miniupnpc for port forwarding, it tells to the router to redirect incoming request on a specific port to the node local ip.
But if the local ip of the node changes, the new upnp request will fail because the router already has a redirection on this port

Describe the solution you'd like

Before using upnp to forward the port, we should check if there is already a redirection on this port.
If there is no redirection -> continue and forward port
If there is a redirection on the same local ip -> continue and forward port (to update time limit)
If there is a redirection on a different local ip -> remove the existing redirection then continue and forward port

@Neylix Neylix added bug Something isn't working networking Involve networking labels Nov 17, 2022
@roychowdhuryrohit-dev
Copy link
Contributor

Why not use mac binding to disable local IP change?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working networking Involve networking
Projects
None yet
Development

No branches or pull requests

4 participants