<blockquote>
<p><strong>different networks</strong></p>
</blockquote>
<p>Ordinary plain IP routing.</p>
<blockquote>
<p><strong>different Nats</strong></p>
</blockquote>
<p>The Bitcoin network protocol uses standard TCP sockets with a typical destination TCP-port number of 8333.</p>
<p>The use of <a href="https://www.rfc-editor.org/rfc/rfc1631" rel="nofollow noreferrer">Network Address Translation (NAT)</a> by many last-hop routers makes it harder to connect to Bitcoin nodes that use IPV<strong>4</strong> <a href="https://www.rfc-editor.org/rfc/rfc1918" rel="nofollow noreferrer">private addresses</a> behind a router. In theory the use of IPV<strong>6</strong> addresses should make this issue go away.</p>
<p>I believe the <a href="https://en.wikipedia.org/wiki/NAT_traversal" rel="nofollow noreferrer">NAT traversal</a>  for Bitcoin IPV4 TCP connections probably uses whatever features are provided by the underlying network libraries and/or are configured in the OS by the end-user.</p>
<p>So far as I know, there isn't a Bitcoin-specific solution for this. There are a lot of general solutions that may be appropriate to use.</p>
<p>See</p>
<ul>
<li><a href="https://bitcoin.stackexchange.com/q/61546/13866">What is the NAT traversal technique used by bitcoin</a> - which has answers mentioning specific support for UPNP <em>if configured</em>.</li>
<li><a href="https://bitcoin.stackexchange.com/q/43355/13866">Can exist bitcoin network with all nodes behind NAT?</a></li>
<li><a href="https://bitcoin.stackexchange.com/q/96925/13866">How does bitcoin core establish a peer to peer network</a></li>
<li><a href="https://bitcoin.stackexchange.com/q/49136/13866">Running a Bitcoin node (behind Firewall / NAT or anything else? disallowing inbound connections)</a></li>
</ul>

CC BY-SA 4.0
2022-12-20T21:38:34.813Z
Yes, there is nothing special about Bitcoin in this regard compared to e.g. a Minecraft server. It's just plain old TCP/IP. NAT traversal is another matter; if a node behind a NAT wants to be accessible on the public internet, the NAT needs to be configured to forward traffic sent to a particular port on the public address to the node.
Jivan Pal
CC BY-SA 4.0
2022-11-20T16:32:46.930Z
2022-11-20T16:43:29.750Z
2022-11-20T16:43:29.750Z
RedGrittyBrick
<p>It is said that the nodes communicate over tcp but how is that acheived across networks over different Nats</p>

<transactions><bitcoin-core-development>
How do nodes communicate through tcp over different networks
Nathan Pokharel
# How do nodes communicate through tcp over different networks

(Asked by: username_0 on 2022-11-20)

It is said that the nodes communicate over tcp but how is that acheived across networks over different Nats

**Tags:** transactions, bitcoin-core-development


---

## 1 answers

### Answer by username_1 on 2022-11-20. Score: 2

> **different networks**

Ordinary plain IP routing.

> **different Nats**

The Bitcoin network protocol uses standard TCP sockets with a typical destination TCP-port number of 8333.

The use of [Network Address Translation (NAT)](https://www.rfc-editor.org/rfc/rfc1631) by many last-hop routers makes it harder to connect to Bitcoin nodes that use IPV**4** [private addresses](https://www.rfc-editor.org/rfc/rfc1918) behind a router. In theory the use of IPV**6** addresses should make this issue go away.

I believe the [NAT traversal](https://en.wikipedia.org/wiki/NAT_traversal) for Bitcoin IPV4 TCP connections probably uses whatever features are provided by the underlying network libraries and/or are configured in the OS by the end-user.

So far as I know, there isn't a Bitcoin-specific solution for this. There are a lot of general solutions that may be appropriate to use.

See

* [What is the NAT traversal technique used by bitcoin](https://bitcoin.stackexchange.com/q/61546/13866) - which has answers mentioning specific support for UPNP *if configured*.
* [Can exist bitcoin network with all nodes behind NAT?](https://bitcoin.stackexchange.com/q/43355/13866)
* [How does bitcoin core establish a peer to peer network](https://bitcoin.stackexchange.com/q/96925/13866)
* [Running a Bitcoin node (behind Firewall / NAT or anything else? disallowing inbound connections)](https://bitcoin.stackexchange.com/q/49136/13866)

> **Comments:**
> **username_2**: Yes, there is nothing special about Bitcoin in this regard compared to e.g. a Minecraft server. It's just plain old TCP/IP. NAT traversal is another matter; if a node behind a NAT wants to be accessible on the public internet, the NAT needs to be configured to forward traffic sent to a particular port on the public address to the node.  

---

