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

Nodes Are Unable To Open Outbound Connections Via VPNs #1849

Closed
Tracked by #1766
nisdas opened this issue Nov 1, 2022 · 11 comments · Fixed by #1902
Closed
Tracked by #1766

Nodes Are Unable To Open Outbound Connections Via VPNs #1849

nisdas opened this issue Nov 1, 2022 · 11 comments · Fixed by #1902
Assignees
Labels
kind/bug A bug in existing code (including security flaws) P0 Critical: Tackled by core team ASAP

Comments

@nisdas
Copy link

nisdas commented Nov 1, 2022

We have recently updated Prysm to v0.22 from go-libp2p v0.20.3 . However over the course of the release a number of Prysm users running via VPNs mentioned that they were unable to find and connect to any peers. This was only fixed by them falling back to an older prysm release so that they could continue connecting to peers.

After confirming the issue with multiple users, I was able to reproduce this with my own local node when running via a VPN. After looking at all the debug libp2p logs, it became clear that none of the outbound dials were able to reach their remote peer. They all failed this way:

failed to dial 16Uiuabcd:  * [/ip4/xx.xx.xx.xx/tcp/13000] dial tcp4 yy.yy.yy.yy:13000->xx.xx.xx.xx:13000: i/o timeout

I tried updating Prysm to later libp2p releases v0.23.x, however the problem still persisted and Prysm was unable to make any outbound connections if the host machine was running via a VPN. Looking through commits to v0.22 , I found a PR that appeared that it might have touched the dialer #1673 . I reverted the PR on top of v0.22 here
nisdas@3807d6d

and ran prysm with this forked version of libp2p. Prysm was immediately able to find peers and connect with them succesfully. I haven't had time to dig into why exactly it broke for nodes running via VPNs but it does appear that the PR broke it for us.

@marten-seemann marten-seemann added kind/bug A bug in existing code (including security flaws) P0 Critical: Tackled by core team ASAP labels Nov 1, 2022
@marten-seemann marten-seemann mentioned this issue Nov 1, 2022
34 tasks
@marten-seemann
Copy link
Contributor

@nisdas Thank you for digging into this!

@Stebalien (as the author of #1673), any idea what's going on here?

@Stebalien
Copy link
Member

  • Is the user explicitly listening on specific interfaces instead of 0.0.0.0?
  • Is yy.yy.yy.yy the VPN's local IP address?
  • I assume the user is listening on 13000?
  • Is the user listening on any other ports?

@nisdas
Copy link
Author

nisdas commented Nov 2, 2022

Is the user explicitly listening on specific interfaces instead of 0.0.0.0?

Yes, most users will not listen in on 0.0.0.0 unless they specifically specify it via a flag. They will bind to a specific network interface instead.

Is yy.yy.yy.yy the VPN's local IP address?

Yes, it is the local ip for the node. The interface that they are binded to.

I assume the user is listening on 13000?

This is correct

Is the user listening on any other ports?

They are not, 13000 is the only port that they listen to.

@MarcoPolo
Copy link
Collaborator

@nisdas Do you have a repro steps I could try to follow?

@MarcoPolo
Copy link
Collaborator

@nisdas could you please try this patch and see if it fixes it for you: #1902 (you can also update your go.mod to require go-netroute v0.2.1)

@p-shahi p-shahi moved this from 🥞 Todo to 🔎 In Review in go-libp2p Nov 18, 2022
Repository owner moved this from 🔎 In Review to 🎉 Done in go-libp2p Nov 18, 2022
@MarcoPolo
Copy link
Collaborator

Closed because I merged that PR. But please let me know if this doesn't fix it for you @nisdas and we'll reopen.

@nisdas
Copy link
Author

nisdas commented Nov 19, 2022

Hey @MarcoPolo , thanks for the PR. I will give it a shot and see if it works on my end

@nisdas
Copy link
Author

nisdas commented Dec 2, 2022

Hey @MarcoPolo , do you know when the next release will be to include this ?

@p-shahi
Copy link
Member

p-shahi commented Dec 5, 2022

@nisdas we're going to release v0.24.0 this week which will include this fix.

@p-shahi
Copy link
Member

p-shahi commented Dec 8, 2022

@nisdas
Copy link
Author

nisdas commented Dec 8, 2022

Thanks ! This is part of our next planned release, so hopefully we will stop getting user reports on this issue soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug A bug in existing code (including security flaws) P0 Critical: Tackled by core team ASAP
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

5 participants