<p>Try and use iptables instead! Just forward the port secondary ports to the primary.</p>

<p><a href="https://serverfault.com/questions/320614/how-to-forward-port-80-to-another-port-on-the-samemachine">https://serverfault.com/questions/320614/how-to-forward-port-80-to-another-port-on-the-samemachine</a></p>

CC BY-SA 3.0
2018-03-20T19:48:27.887Z
Thank you for replying. I had considered this, but my concern is that if ports are redirected via iptables won't they still encounter the wait-timeout since they will reach the server on what it will detect as the same port? For example if the server is set to receive queries on port 8000, and I redirect port 8001 to port 8000, when a query comes in on 8000 and 8001 at the same time, the server will see them as two queries on 8000 and make one of them wait. Or am I incorrect? My goal is to cause the server to accept queries on multiple ports simultaneously..
joeejo
CC BY-SA 3.0
2018-03-21T16:19:05.000Z
The RPC can handle multiple connections at the same time. The parameters "-rpcthreads" sets the number of threads to service RPC calls (default: 4).
Penquin
CC BY-SA 3.0
2018-03-19T23:51:42.513Z
2018-03-19T23:51:42.513Z
Penquin
<p>Running Ubuntu 17.10 server</p>

<p>bitcoin.conf contains a setting: <code>rpcport=&lt;port&gt;</code></p>

<p>Is there any way to cause <code>bitcoind</code> (0.16) to listen on multiple RPC ports at the same time?</p>

<p>example: <code>rpcport=1234,1235,1236</code></p>

<p>Currently, the wait-timeout prevents new connections to the RPC server until the old one times out. I want to avoid that by having clients use different ports.</p>

<p>If there is another (better) way to reduce/eliminate the wait-timeout, please advise.</p>

<p>Thank you.</p>

<json-rpc>
Listen on multiple RPC ports
joeejo
# Listen on multiple RPC ports

(Asked by: username_0 on 2018-03-19)

Running Ubuntu 17.10 server

bitcoin.conf contains a setting: `rpcport=`

Is there any way to cause `bitcoind` (0.16) to listen on multiple RPC ports at the same time?

example: `rpcport=1234,1235,1236`

Currently, the wait-timeout prevents new connections to the RPC server until the old one times out. I want to avoid that by having clients use different ports.

If there is another (better) way to reduce/eliminate the wait-timeout, please advise.

Thank you.

**Tags:** json-rpc


---

## 1 answers

### Answer by username_1 on 2018-03-19. Score: 1

Try and use iptables instead! Just forward the port secondary ports to the primary.

<https://serverfault.com/questions/320614/how-to-forward-port-80-to-another-port-on-the-samemachine>

> **Comments:**
> **username_0**: Thank you for replying. I had considered this, but my concern is that if ports are redirected via iptables won't they still encounter the wait-timeout since they will reach the server on what it will detect as the same port? For example if the server is set to receive queries on port 8000, and I redirect port 8001 to port 8000, when a query comes in on 8000 and 8001 at the same time, the server will see them as two queries on 8000 and make one of them wait. Or am I incorrect? My goal is to cause the server to accept queries on multiple ports simultaneously..  
> **username_1**: The RPC can handle multiple connections at the same time. The parameters "-rpcthreads" sets the number of threads to service RPC calls (default: 4).  

---

