# Hole punching in libp2p - Overcoming Firewalls | IPFS Blog & News

**URL:** <https://discuss.ipfs.tech/t/hole-punching-in-libp2p-overcoming-firewalls-ipfs-blog-news/13632>\
**Category:** Blog Posts\
**Created:** [March 3, 2022, 3:48pm UTC](https://discuss.ipfs.tech/t/hole-punching-in-libp2p-overcoming-firewalls-ipfs-blog-news/13632 "2022-03-03T15:48:08Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/ipfs1/original/1X/035cb0e41547e8c019cdfd4466a4736c843af1c9.png) [@system](https://discuss.ipfs.tech/u/system)\
**Post date:** [March 3, 2022, 3:48pm UTC](https://discuss.ipfs.tech/t/hole-punching-in-libp2p-overcoming-firewalls-ipfs-blog-news/13632/1 "2022-03-03T15:48:08Z")

</div>

In case you haven't yet heard the great news, [libp2p (opens new window)](https://docs.ipfs.io/concepts/glossary/#libp2p) can now punch holes.

* * *
This is a companion discussion topic for the original entry at [https://blog.ipfs.io/2022-01-20-libp2p-hole-punching/](https://blog.ipfs.io/2022-01-20-libp2p-hole-punching/)

---

<div class="post-metadata">

**Author:** ![Retamogordo](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/retamogordo/32/6338_2.png) [@Retamogordo](https://discuss.ipfs.tech/u/Retamogordo)\
**Post date:** [April 22, 2022, 8:49pm UTC](https://discuss.ipfs.tech/t/hole-punching-in-libp2p-overcoming-firewalls-ipfs-blog-news/13632/2 "2022-04-22T20:49:57Z")

</div>

Thank you for this helpful and clear article.

---

<div class="post-metadata">

**Author:** ![fabiobozzo](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/fabiobozzo/32/7459_2.png) [@fabiobozzo](https://discuss.ipfs.tech/u/fabiobozzo)\
**Post date:** [February 20, 2023, 4:51pm UTC](https://discuss.ipfs.tech/t/hole-punching-in-libp2p-overcoming-firewalls-ipfs-blog-news/13632/3 "2023-02-20T16:51:23Z")

</div>

Is there any place where I can find a fully working example of that, w/ go-libp2p ?

---

<div class="post-metadata">

**Author:** ![Discordian](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/discordian/32/4692_2.png) [@Discordian](https://discuss.ipfs.tech/u/Discordian)\
**Post date:** [February 21, 2023, 4:34pm UTC](https://discuss.ipfs.tech/t/hole-punching-in-libp2p-overcoming-firewalls-ipfs-blog-news/13632/4 "2023-02-21T16:34:27Z")

</div>

Do [these examples](https://github.com/libp2p/go-libp2p/tree/master/examples) help at all? go-libp2p should more-or-less figure out the hole-punching for you with little intervention. Lots of upgrades / changes / techniques happen over time too, which all make it into the spec and libraries.

---

<div class="post-metadata">

**Author:** ![tohonesty](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/tohonesty/32/8509_2.png) [@tohonesty](https://discuss.ipfs.tech/u/tohonesty)\
**Post date:** [April 13, 2024, 11:58am UTC](https://discuss.ipfs.tech/t/hole-punching-in-libp2p-overcoming-firewalls-ipfs-blog-news/13632/5 "2024-04-13T11:58:12Z")

</div>

Does the data plane pass through the relay mode being used?

I’m assuming yes because that’s the purpose of bypassing the firewall.

I’m asking about traffic engineering here.

That’s to say, I may be taking a suboptimal route via the relay node.

Also, is it possible to ‘intercept’ connections via relays in a firewall.

Thoughts?

---

<div class="post-metadata">

**Author:** ![zacharywhitley](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/zacharywhitley/32/2670_2.png) [@zacharywhitley](https://discuss.ipfs.tech/u/zacharywhitley)\
**Post date:** [April 16, 2024, 11:58am UTC](https://discuss.ipfs.tech/t/hole-punching-in-libp2p-overcoming-firewalls-ipfs-blog-news/13632/6 "2024-04-16T11:58:16Z")

</div>

I’ve asked similar questions but there doesn’t seem to be much interest in running IPFS on networks that you don’t control. I personally don’t like the, “WTF are you doing?” email from the IT department.

---

<div class="post-metadata">

**Author:** ![hector](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/hector/32/178_2.png) [@hector](https://discuss.ipfs.tech/u/hector)\
**Post date:** [April 16, 2024, 12:25pm UTC](https://discuss.ipfs.tech/t/hole-punching-in-libp2p-overcoming-firewalls-ipfs-blog-news/13632/7 "2024-04-16T12:25:47Z")

</div>

Relays are used to coordinate the hole punching protocol, they’re not doing any other kind of data-relaying by default.

---

<div class="post-metadata">

**Author:** ![tohonesty](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/tohonesty/32/8509_2.png) [@tohonesty](https://discuss.ipfs.tech/u/tohonesty)\
**Post date:** [April 16, 2024, 12:54pm UTC](https://discuss.ipfs.tech/t/hole-punching-in-libp2p-overcoming-firewalls-ipfs-blog-news/13632/8 "2024-04-16T12:54:43Z")

</div>

OK thanks, so the hole is punched simply to gain access to the metadata locating the peers. Once both have that, they can make outbound connections with the right IP’s and port numbers?
