<p>The measure is that the node running bitcoin removes the cap to the number connection slots.  The cap for connection slots I have found is set to no limit when running a bitcoin service.</p>

<p>Sorry I stand corrected, back in 2011 looks like a cap of 125 connections was introduced <a href="https://bitcoin.stackexchange.com/questions/44504/is-there-a-connections-limit-on-bitcoind">Is there a connections limit on bitcoind?</a> </p>

<p>in the net.cpp file  <a href="https://bitcointalk.org/index.php?topic=52772.msg629593#msg629593" rel="nofollow noreferrer">https://bitcointalk.org/index.php?topic=52772.msg629593#msg629593</a></p>

<p>but this has since been changed and I dont think there is a cap anymore... Looking at the file looks like this is the area you are interested in: <a href="https://github.com/bitcoin/bitcoin/blob/master/src/net.cpp#L1081" rel="nofollow noreferrer">https://github.com/bitcoin/bitcoin/blob/master/src/net.cpp#L1081</a>
and the values set here <a href="https://github.com/bitcoin/bitcoin/blob/master/src/net.h" rel="nofollow noreferrer">https://github.com/bitcoin/bitcoin/blob/master/src/net.h</a></p>

CC BY-SA 3.0
2018-04-17T12:52:11.590Z
How can removing the cap help? Can you point me to the source code?
Sergei Tikhomirov
CC BY-SA 3.0
2018-04-17T13:57:51.757Z
Ok, I am aware of the 8 outgoing + 117 incoming connections limit, my question is, is there anything that prevents me from connecting to a chosen node up to 117 times from the same IP, if its connection slots are free?
Sergei Tikhomirov
CC BY-SA 3.0
2018-04-17T15:05:06.480Z
I think that one node would see your 117 connections from the same ip and just block your ip on connecting.  It would seem there is no limit in the code from the discussion here https://bitcointalk.org/index.php?topic=765157.0
Fuzzybear
CC BY-SA 3.0
2018-04-17T19:12:56.053Z
But it would have to be done by a firewall or some other software independent of the Bitcoin client, right?
Sergei Tikhomirov
CC BY-SA 3.0
2018-04-18T08:40:04.920Z
Yeh as far as I can see there is nothing in the code to prevent the situation as u describe
Fuzzybear
CC BY-SA 3.0
2018-04-17T12:14:31.303Z
2018-04-17T13:17:38.637Z
2018-04-17T13:17:38.637Z
Fuzzybear
<p>Is there a measure in place to prevent an adversary from connecting to a Bitcoin node many times in parallel, thus saturating its open connection slots?</p>

<network><peers><connection>
Does Bitcoin limit the number of parallel connections from the same IP?
Sergei Tikhomirov
# Does Bitcoin limit the number of parallel connections from the same IP?

(Asked by: username_0 on 2018-04-17)

Is there a measure in place to prevent an adversary from connecting to a Bitcoin node many times in parallel, thus saturating its open connection slots?

**Tags:** network, peers, connection


---

## 1 answers

### Answer by username_1 on 2018-04-17. Score: 0 | Accepted answer

The measure is that the node running bitcoin removes the cap to the number connection slots. The cap for connection slots I have found is set to no limit when running a bitcoin service.

Sorry I stand corrected, back in 2011 looks like a cap of 125 connections was introduced [Is there a connections limit on bitcoind?](https://bitcoin.stackexchange.com/questions/44504/is-there-a-connections-limit-on-bitcoind)

in the net.cpp file <https://bitcointalk.org/index.php?topic=52772.msg629593#msg629593>

but this has since been changed and I dont think there is a cap anymore... Looking at the file looks like this is the area you are interested in: <https://github.com/bitcoin/bitcoin/blob/master/src/net.cpp#L1081>
and the values set here <https://github.com/bitcoin/bitcoin/blob/master/src/net.h>

> **Comments:**
> **username_0**: How can removing the cap help? Can you point me to the source code?  
> **username_0**: Ok, I am aware of the 8 outgoing + 117 incoming connections limit, my question is, is there anything that prevents me from connecting to a chosen node up to 117 times from the same IP, if its connection slots are free?  
> **username_1**: I think that one node would see your 117 connections from the same ip and just block your ip on connecting.  It would seem there is no limit in the code from the discussion here https://bitcointalk.org/index.php?topic=765157.0  
> **username_0**: But it would have to be done by a firewall or some other software independent of the Bitcoin client, right?  
> **username_1**: Yeh as far as I can see there is nothing in the code to prevent the situation as u describe  

---

