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

Which Ports Need to Be Opened for libp2p in a Mandatory Firewall? #3097

Closed
Ja7ad opened this issue Dec 10, 2024 · 1 comment
Closed

Which Ports Need to Be Opened for libp2p in a Mandatory Firewall? #3097

Ja7ad opened this issue Dec 10, 2024 · 1 comment

Comments

@Ja7ad
Copy link

Ja7ad commented Dec 10, 2024

I noticed that go-libp2p uses different ports to connect to other nodes.

 1330298            root  652u  IPv4 266053404      0t0  TCP 23.109.234.125:21888->142.61.131.16:21888 (ESTABLISHED)
 1330298            root  653u  IPv4 266053839      0t0  TCP 23.109.234.125:21888->111.76.109.19:21888 (ESTABLISHED)
 1330298            root  654u  IPv4 266053347      0t0  TCP 23.109.234.125:21888->122.90.163.168:21888 (ESTABLISHED)
 1330298            root  656u  IPv4 266045717      0t0  TCP 23.109.234.125:44826->33.27.37.129:21888 (ESTABLISHED)
 1330298            root  657u  IPv4 266056787      0t0  TCP 23.109.234.125:21888->62.115.26.183:21888 (ESTABLISHED)

Port in question: 44826

What is the purpose of this port? Additionally, which ports do I need to open on the firewall to ensure proper reachability for go-libp2p?

@p-shahi
Copy link
Member

p-shahi commented Dec 16, 2024

I believe 44826 is an ephemeral outbound port that was dynamically assigned by the OS.
If you enable hole punching you'll be able to ensure proper reachability for your node behind a NAT/firewall

@p-shahi p-shahi closed this as completed Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants