Port forwarding plus Bitcoin

7

Bitcoin has only 8 active connections, and I read somewhere that it helps to forward ports. I know how to forward a port, but which port should I forward, and how should I tell Bitcoin-qt to use the forwarded port?

BenjiWiebe

Posted 2013-02-20T19:17:21.127

Reputation: 238

8 connections is more than enough for your client to pull blocks from the bitcoin network. So adding more doesn't help you, at least not directly. But it does help the bitcoin network if your node is accessible to others.Stephen Gornick 2013-02-20T22:07:07.463

Answers

8

Bitcoin has only 8 active connections

Correction: it has 8 outbound connections. By default, it can also accept up to 117 inbound connections

which port

Port 8333, TCP

how should I tell Bitcoin-qt to use the forwarded port?

Don't need to.

Nick ODell

Posted 2013-02-20T19:17:21.127

Reputation: 26 536

OK, so does forwarding the port increase the number of outbound connections?BenjiWiebe 2013-02-20T20:01:49.850

No, but it makes it possible to get inbound connections, which helps the network.Nick ODell 2013-02-20T20:02:50.400

So why does Bitcoin-qt only have 8 outbound connections? Is there any way to increase this?BenjiWiebe 2013-02-20T20:05:56.147

1

Yes, go into the source code and modify MAX_OUTBOUND_CONNECTIONS, then recompile.

Nick ODell 2013-02-20T20:13:22.663

No .conf file setting to change?BenjiWiebe 2013-02-20T20:14:24.663

There's maxconnections, but that's the total connections.Nick ODell 2013-02-20T20:15:49.207

Obviously not; it is a const. @Nick ODell Thanks! I'll modify the source! (I built it from source anyhow.)BenjiWiebe 2013-02-20T20:15:50.330

1Incidentally, adding more than 8 outbound connections doesn't necessarily help you ... it can actually put additional work for your system and consume inbound connections elsewhere that others might have used instead.Stephen Gornick 2013-02-20T22:09:04.953

@StephenGornick I noticed that, when I edited the source code to allow more connections, it actually went slower.BenjiWiebe 2013-02-21T00:40:36.820