I'm running a custom Python script to initiate network handshakes with other nodes. While testing the code, I decided to initiate a handshake with my own node, but a time-out error appears.
Timeout Error: [Errno 110] Connection timed out
I know the script works because I've tried other known nodes on the network. Also, the script comes from Programming Bitcoin by Jimmy Song, so I'm pretty sure it was tested.
This is (I believe) related to my previous issue where I checked connectivity when setting up the node and https://bitnodes.earn.com/ can not reach my node. I did not pay much attention because my node successfully established inbound connections.
bitcoin @ bitcoin_fullnode: ~ $ bitcoin-cli getnetworkinfo
"protocol version": 70015,
"Time offset": 0,
This means that my node is somehow accessible from other nodes, but I can not reach it manually.
The public IP of my node:
bitcoin @ bitcoin_fullnode: ~ $ curl https://ipinfo.io/ip
My UFW settings:
18333 ALLOW Anywhere # Allow Bitcoin testnet
8333 Allow ALLOW Anywhere # Bitcoin Mainnet
I get a local ping response from my server. But no answer from the public IP.
rajarshi @ linuxpc: ~ $ ping 192.168.1.185
PING 192.168.1.185 (192.168.1.185) 56 (84) Data bytes.
64 bytes of 192.168.1.185: icmp_seq = 1 ttl = 64 time = 5.25 ms
64 bytes of 192.168.1.185: icmp_seq = 2 ttl = 64 time = 3.34 ms
64 bytes of 192.168.1.185: icmp_seq = 3 ttl = 64 time = 4.65 ms
--- 192.168.1.185 ping statistics ---
3 packets sent, 3 received, 0% packet loss, time 2003 ms
rtt min / avg / max / mdev = 3.347 / 4.418 / 5.250 / 0.777 ms
rajarshi @ linuxpc: ~ $ ping 220.127.116.11
PING 18.104.22.168 (22.214.171.124) 56 (84) Data bytes.
--- 126.96.36.199 ping statistics ---
9 packets sent, 0 received, 100% packet loss, 8197ms time
Similar situation for 8333 port with telnet:
rajarshi @ linuxpc: ~ $ telnet 192.168.1.185 8333
192.168.1.185 is trying ...
Connected to 192.168.1.185.
rajarshi @ linuxpc: ~ $ telnet 188.8.131.52 8333
184.108.40.206 is trying ...
telnet: Unable to connect to the remote host: Connection timed out
somehow it seems that my public IP is not reachable. Can someone suggest me where to look? I'm using Bitcoin Core 18.0 on a Raspberry 3 connected to a Tplink router. Router firewall is disabled, UPNP is enabled, port forwarding is done for 8333 and 18333. What else should I debug to find out? I realize it's not a Bitcoin-specific problem, but any help is appreciated.
Many Thanks. 🙂
PS: Also relevant part of my bitcoin.conf file, if that's helpful.
upnp = 1
# testnet = 1
#In the case of clear ip, also tell bitcoind that you are using tor
Onion = 127.0.0.1: 9050
#these are other Tor nodes that your node can use to find peers
seednode = nkf5e6b7pl4jfd4a.onion
seednode = xqzfakpeuvrobvpj.onion
seednode = tsyvzsqwa2kkf6b2.onion
#these lines help limit possible DOS attacks on Tor
Banscore = 10000
Bantime = 11