<p>The RPC server doesn't care what source port the request comes from, and it doesn't need to make any extra connections back to the client on that port or any other.</p>

<p>However, a possible cause for your trouble is that the shared webserver's firewall blocks outgoing traffic with a <em>destination</em> port that is not on their whitelist.  (That may be what is meant by "having specific outbound ports open".)</p>

<p>The fix would be to change the RPC server configuration to listen on some other port which is allowed  as a destination port by the shared webserver.  The most obvious choice would be port 80, if the RPC server machine isn't also running an HTTP server.  Otherwise, you can try various commonly used ports to find one that is allowed by the firewall and not already in use.</p>

CC BY-SA 3.0
2014-09-11T20:51:05.457Z
contacted my host and  they opened access for that port which  solved it , thanks for the help :)
beepbaapboom
CC BY-SA 3.0
2014-09-11T05:50:57.123Z
2014-09-11T05:50:57.123Z
Nate Eldredge
<p>lets say i am making a json-rpc call with the following connection :</p>

<pre><code> $connect = new jsonRPCClient('http://user:password@ipaddress:9332');
</code></pre>

<p>does outbound port 9332 of the sender need to be open as well as that the 9332 inbound port of receiving machine? </p>

<p>if not then which outbound ports need to be open? </p>

<p>the reason i am asking is because i am connecting via json-rpc to a  VPS that hosts bitcoind with a simulated webserver on my PC  (usbwebserver) and it is successful ,  but when i try to do the identical thing from a shared web-server (hosted by a company) i get an error: Unable to connect and they only have specific outbound ports open. </p>

<p>thanks for the help :)</p>

<bitcoind><json-rpc><php>
Does outbound port have to be open to make an Json-RPC call
beepbaapboom
# Does outbound port have to be open to make an Json-RPC call

(Asked by: username_0 on 2014-09-11)

lets say i am making a json-rpc call with the following connection :

```
 $connect = new jsonRPCClient('http://user:password@ipaddress:9332');

```

does outbound port 9332 of the sender need to be open as well as that the 9332 inbound port of receiving machine?

if not then which outbound ports need to be open?

the reason i am asking is because i am connecting via json-rpc to a VPS that hosts bitcoind with a simulated webserver on my PC (usbwebserver) and it is successful , but when i try to do the identical thing from a shared web-server (hosted by a company) i get an error: Unable to connect and they only have specific outbound ports open.

thanks for the help :)

**Tags:** bitcoind, json-rpc, php


---

## 1 answers

### Answer by username_1 on 2014-09-11. Score: 0 | Accepted answer

The RPC server doesn't care what source port the request comes from, and it doesn't need to make any extra connections back to the client on that port or any other.

However, a possible cause for your trouble is that the shared webserver's firewall blocks outgoing traffic with a *destination* port that is not on their whitelist. (That may be what is meant by "having specific outbound ports open".)

The fix would be to change the RPC server configuration to listen on some other port which is allowed as a destination port by the shared webserver. The most obvious choice would be port 80, if the RPC server machine isn't also running an HTTP server. Otherwise, you can try various commonly used ports to find one that is allowed by the firewall and not already in use.

> **Comments:**
> **username_0**: contacted my host and  they opened access for that port which  solved it , thanks for the help :)  

---

