Author

Topic: [SOLVED] Connect to bitcoind from outside (Read 3756 times)

full member
Activity: 213
Merit: 100
June 26, 2011, 03:20:39 PM
#16
I dont see any problems.. so it's probably on your client side

Now that's works with rpcallowip=*.*.*.*, but don't with PHP and JSON.

Edit: Now it's ok since I explain my problem on the IRC channel of my hosting provider, by miracle the server is reachable on port 8332 (I don't give the IP of my server!). Awesome.
newbie
Activity: 25
Merit: 0
Even I was able to connect to your server
Code:
progre55@progre55:~$ curl http://user:[email protected]:8332/
{"result":null,"error":{"code":-32700,"message":"Parse error"},"id":null}

I dont see any problems.. so it's probably on your client side
full member
Activity: 213
Merit: 100
Code:
telnet host port

Quote
soak@client:~$ telnet 88.191.128.82 8332
Trying 88.191.128.82...
Connected to 88.191.128.82.
Escape character is '^]'.
Connection closed by foreign host.
newbie
Activity: 25
Merit: 0
well it means you dont have any rules..
btw, try telneting to your machine from outsite
Code:
telnet host port
and see if it accepts connections. If not, then there's definitely a firewall somewhere outside your own machine.
full member
Activity: 213
Merit: 100
Code:
iptables -L

Quote
root@daemon:~# iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
newbie
Activity: 25
Merit: 0
then to check if you have any port restrictions on your current machine
Code:
iptables -L
with more info on iptables, refer to https://help.ubuntu.com/community/IptablesHowTo

other than that, make sure you're not behind a corporate network, or amazon clouds or anything =)
full member
Activity: 213
Merit: 100
what machine are you on? windows or linux?

The daemon is currently running on Debian 6.0 64 bits.
newbie
Activity: 25
Merit: 0
what machine are you on? windows or linux?
newbie
Activity: 32
Merit: 0
If you are on a windows box, go to control panels and firewall settings. You will likely have to create a rule for that port. If you are on a linux box or other, i cant help you. Google is your friend for that.
full member
Activity: 213
Merit: 100
Do you have a firewall blocking incoming 8332 connections?

How I can verify that please?
newbie
Activity: 32
Merit: 0
Do you have a firewall blocking incoming 8332 connections?
full member
Activity: 213
Merit: 100
No, that's correct. Make sure the IP address you are connecting *from* is allowed in the conf file.

Yes. The IP address in the conf file is correct. I added the server daemon "outside" IP in the conf file.

Quote
rpcallowip=client IP address
rpcallowip=server daemon IP address

Quote
admin@daemon:~$ curl http://user:pass@server daemon IP:8332/
curl: (7) couldn't connect to host

I don't know what to do now.. Sad
legendary
Activity: 1596
Merit: 1012
Democracy is vulnerable to a 51% attack.
No, that's correct. Make sure the IP address you are connecting *from* is allowed in the conf file.
full member
Activity: 213
Merit: 100
Show us the 'netstat' line that shows the LISTENING socket on port 8332. Is it bound to 127.0.0.1?

Quote
netstat
tcp        0      0 *:8332                  *:*                     LISTEN

Quote
netstat -an
tcp        0      0 0.0.0.0:8332            0.0.0.0:*               LISTEN

That's wrong? How I can modify that?
legendary
Activity: 1596
Merit: 1012
Democracy is vulnerable to a 51% attack.
Show us the 'netstat' line that shows the LISTENING socket on port 8332. Is it bound to 127.0.0.1?
full member
Activity: 213
Merit: 100
Hello,

I have a dedicated server with a bitcoin daemon running somewhere on Internet. I try to reach it on another dedicated server (with JSON and PHP), the page loading for a while and nothing happen.

My bitcoin.conf file :
Quote
rpcuser=user
rpcpassword=pass
rpcallowip=client server IP
server=1
rpcport=8332

I launch daemon with ./bitcoind -daemon. ./bitcoind getinfo works.

curl http://user:[email protected]:8332/ works.

Quote
admin@daemon:~$ curl http://user:[email protected]:8332/
{"result":null,"error":{"code":-32700,"message":"Parse error"},"id":null}

curl http://user:pass@server daemon IP:8332/ don't work.

Quote
admin@daemon:~$ curl http://user:pass@server daemon IP:8332/
curl: (7) couldn't connect to host

Anybody can help me please?
Jump to: