user132890: I tried every different combination in bitcoin.conf to make my bitcoin node (hosted in AWS protected behind VPN) reachable but nothing seems to work...
Just to clear it out of the way, I opened the port 8332 on the machine.
Here is my bitcoin.conf:
txindex=1
server=1
rest=1
# Auth Credentials For JSON-RPC server
rpcuser=your_username
rpcpassword=your_password

#chain=test
testnet=1

#rpcallowip=0.0.0.0/0

[test]
rest=1
rpcallowip=0.0.0.0/0
rpcallowip=::/0

rpcbind=0.0.0.0:8332

# Listen for JSON-RPC connections on this port
#rpcport=8332

Here is the netstat:
ubuntu@blahblah:~$ sudo ss -ltpn
State                      Recv-Q                      Send-Q                                              Local Address:Port                                              Peer Address:Port                                                                                      
LISTEN                     0                           128                                                       0.0.0.0:18333                                                  0.0.0.0:*                          users:(("bitcoind",pid=14485,fd=29))                           
LISTEN                     0                           128                                                       0.0.0.0:8332                                                   0.0.0.0:*                          users:(("bitcoind",pid=14485,fd=9))                            
LISTEN                     0                           128                                                 127.0.0.53%lo:53                                                     0.0.0.0:*                          users:(("systemd-resolve",pid=644,fd=13))                      
LISTEN                     0                           128                                                       0.0.0.0:22                                                     0.0.0.0:*                          users:(("sshd",pid=760,fd=3))                                  
LISTEN                     0                           128                                                          [::]:18333                                                     [::]:*                          users:(("bitcoind",pid=14485,fd=28))                           
LISTEN                     0                           128                                                          [::]:22                                                        [::]:*                          users:(("sshd",pid=760,fd=4))                   

I cant reach my node with the following RPC call: (locally I can)
curl --data-binary '{"jsonrpc":"1.0","id":"curltext","method":"getblockchaininfo","params":[]}' -H 'content-type:text/plain;' http://your_username:your_password@my_machine_ip:8332

I get timeout:
curl: (28) Failed to connect to my_machine_ip port 8332: Connection timed out

But when I run:
docker run --name mynginx1 -p 8332:80 -d nginx

I can curl to 8332 from my own computer and get a response.
my netstat with the docker running:
ubuntu@blahblah:~$ sudo ss -ltpn
State              Recv-Q              Send-Q                            Local Address:Port                           Peer Address:Port
LISTEN             0                   4096                                    0.0.0.0:8332                                0.0.0.0:*                 users:(("docker-proxy",pid=13131,fd=4))
LISTEN             0                   128                               127.0.0.53%lo:53                                  0.0.0.0:*                 users:(("systemd-resolve",pid=644,fd=13))
LISTEN             0                   128                                     0.0.0.0:22                                  0.0.0.0:*                 users:(("sshd",pid=760,fd=3))
LISTEN             0                   4096                                       [::]:8332                                   [::]:*                 users:(("docker-proxy",pid=13139,fd=4))
LISTEN             0                   128                                        [::]:22                                     [::]:*                 users:(("sshd",pid=760,fd=4))

What's lead me to the conclusion that my problem is that I dont have IPv6 rpc bind with the bitcoin node.
I went to the manual and read the following:

-rpcbind=[:port]
Bind to given address to listen for JSON-RPC connections. Do not expose
the RPC server to untrusted networks such as the public internet!
This option is ignored unless -rpcallowip is also passed. Port is
optional and overrides -rpcport. Use [host]:port notation for
IPv6. This option can be specified multiple times (default:
127.0.0.1 and ::1 i.e., localhost)

But every way I tried to specify the IPv6 in the rpcbind is not helping.

user96508: At least for IPv4, you can't specify 0.0.0.0 for rpcbind. You'll get this error in bitcoind logs if you try:

Binding RPC on address 0.0.0.0 port 18443 failed.

Try 127.0.0.1 for IPv4, or ::1/128 for IPv6.
bitcoind -rpcbind=127.0.0.1

132890: <p>I tried every different combination in bitcoin.conf to make my bitcoin node (hosted in AWS protected behind VPN) reachable but nothing seems to work...</p>
<p>Just to clear it out of the way, I opened the port 8332 on the machine.</p>
<p>Here is my bitcoin.conf:</p>
<pre><code>txindex=1
server=1
rest=1
# Auth Credentials For JSON-RPC server
rpcuser=your_username
rpcpassword=your_password

#chain=test
testnet=1

#rpcallowip=0.0.0.0/0

[test]
rest=1
rpcallowip=0.0.0.0/0
rpcallowip=::/0

rpcbind=0.0.0.0:8332

# Listen for JSON-RPC connections on this port
#rpcport=8332
</code></pre>
<p>Here is the netstat:</p>
<pre><code>ubuntu@blahblah:~$ sudo ss -ltpn
State                      Recv-Q                      Send-Q                                              Local Address:Port                                              Peer Address:Port                                                                                      
LISTEN                     0                           128                                                       0.0.0.0:18333                                                  0.0.0.0:*                          users:((&quot;bitcoind&quot;,pid=14485,fd=29))                           
LISTEN                     0                           128                                                       0.0.0.0:8332                                                   0.0.0.0:*                          users:((&quot;bitcoind&quot;,pid=14485,fd=9))                            
LISTEN                     0                           128                                                 127.0.0.53%lo:53                                                     0.0.0.0:*                          users:((&quot;systemd-resolve&quot;,pid=644,fd=13))                      
LISTEN                     0                           128                                                       0.0.0.0:22                                                     0.0.0.0:*                          users:((&quot;sshd&quot;,pid=760,fd=3))                                  
LISTEN                     0                           128                                                          [::]:18333                                                     [::]:*                          users:((&quot;bitcoind&quot;,pid=14485,fd=28))                           
LISTEN                     0                           128                                                          [::]:22                                                        [::]:*                          users:((&quot;sshd&quot;,pid=760,fd=4))                   
</code></pre>
<p>I cant reach my node with the following RPC call: (locally I can)</p>
<pre><code>curl --data-binary '{&quot;jsonrpc&quot;:&quot;1.0&quot;,&quot;id&quot;:&quot;curltext&quot;,&quot;method&quot;:&quot;getblockchaininfo&quot;,&quot;params&quot;:[]}' -H 'content-type:text/plain;' http://your_username:your_password@my_machine_ip:8332
</code></pre>
<p>I get timeout:</p>
<pre><code>curl: (28) Failed to connect to my_machine_ip port 8332: Connection timed out
</code></pre>
<p>But when I run:</p>
<pre><code>docker run --name mynginx1 -p 8332:80 -d nginx
</code></pre>
<p>I can curl to 8332 from my own computer and get a response.</p>
<p>my netstat with the docker running:</p>
<pre><code>ubuntu@blahblah:~$ sudo ss -ltpn
State              Recv-Q              Send-Q                            Local Address:Port                           Peer Address:Port
LISTEN             0                   4096                                    0.0.0.0:8332                                0.0.0.0:*                 users:((&quot;docker-proxy&quot;,pid=13131,fd=4))
LISTEN             0                   128                               127.0.0.53%lo:53                                  0.0.0.0:*                 users:((&quot;systemd-resolve&quot;,pid=644,fd=13))
LISTEN             0                   128                                     0.0.0.0:22                                  0.0.0.0:*                 users:((&quot;sshd&quot;,pid=760,fd=3))
LISTEN             0                   4096                                       [::]:8332                                   [::]:*                 users:((&quot;docker-proxy&quot;,pid=13139,fd=4))
LISTEN             0                   128                                        [::]:22                                     [::]:*                 users:((&quot;sshd&quot;,pid=760,fd=4))
</code></pre>
<p>What's lead me to the conclusion that my problem is that I dont have IPv6 rpc bind with the bitcoin node.</p>
<p>I went to the manual and read the following:</p>
<blockquote>
<p>-rpcbind=[:port]
Bind to given address to listen for JSON-RPC connections. Do not expose
the RPC server to untrusted networks such as the public internet!
This option is ignored unless -rpcallowip is also passed. Port is
optional and overrides -rpcport. Use [host]:port notation for
IPv6. This option can be specified multiple times (default:
127.0.0.1 and ::1 i.e., localhost)</p>
</blockquote>
<p>But every way I tried to specify the IPv6 in the rpcbind is not helping.</p>
 96508: <p>At least for IPv4, you can't specify <code>0.0.0.0</code> for <code>rpcbind</code>. You'll get this error in bitcoind logs if you try:</p>
<blockquote>
<p>Binding RPC on address 0.0.0.0 port 18443 failed.</p>
</blockquote>
<p>Try <code>127.0.0.1</code> for IPv4, or <code>::1/128</code> for IPv6.</p>
<p><code>bitcoind -rpcbind=127.0.0.1</code></p>
