How to allow only local connections?

1

I've started to implement my bitcoin client to learn the protocol and faced a problem to see debugging output. When I start bitcoind with -debug option, it start to print so many debug messages in such speed that i can't see whats wrong with my client implementation. How can I start the bitcoind program in such way that it will not sync and just listen to new connections from local machine?

Anderson

Posted 2013-12-12T13:51:34.260

Reputation: 33

Answers

1

Try

bitcoind -bind=127.0.0.1 -connect=127.0.0.1

Sev

Posted 2013-12-12T13:51:34.260

Reputation: 98

strange, when im doing -connect=127.0.0.1 it opens only port 8332, but without this option it also opens 8333 port. I believe that commands like "VERSION" i should send to 8333 port because 8332 doesn't answer me at all.Anderson 2013-12-12T14:37:40.737

You're right. It seems that it goes in RPC mode. Adding -listen=1 enables 8333. If that doesn't work. bitcoind -bind=127.0.0.1 should do it. Let what works for you.Sev 2013-12-12T14:59:10.413

I meant bitcoind -bind=127.0.0.1 -connect=127.0.0.1Sev 2013-12-12T15:07:52.943

1I found another method, run the bitcoind as usual and add firefwall rule sudo iptables -A OUTPUT -p tcp --out-interface wlan0 --dport 8333 -j DROPAnderson 2013-12-13T15:16:52.843