There are many service to get all fo the ip address in bitcoin mainnet but I can't find the similar way to get all ip address in testnet.Is there a way to do it?
Which service do you use for mainnet?– user103136Dec 8, 2021 at 2:44
@Prayank You can use api.blockchair.com/bitcoin/nodes to get mainnet nodes– RamblerDec 8, 2021 at 6:43
Different ways to get IP address of bitcoin nodes on testnet:
A DNS record for one of the domains used by DNS seeds:
testnet-seed.bitcoin.jonasschnelli.ch seed.tbtc.petertodd.org seed.testnet.bitcoin.sprovoost.nl testnet-seed.bluematt.me
I tried connecting to one of these nodes on port 18333 with
addnode to confirm and it works.
Run own test DNS seeder to crawl the network using https://github.com/sipa/bitcoin-seeder
Run your own bitcoin node, save IP address for peers, ban all for 1 hour, save IP address for new peers and repeat until you have enough addresses. You can get lot of addresses in few minutes: https://pastebin.com/raw/jxkEpgEq
Use Bitnodes API which returns testnet nodes as well in the response: https://bitnodes.io/api/#list-nodes or Use shodan filters like
User-Agent:/Satoshi/ port:"18333"which returns few nodes
Thank you for your answer, I have tried to use a bitcoin full node to collect address and finally get a lot of address.But just a few of them can connect.i think the fourth way you said is a best way but i don't know which api can do it in testnet– RamblerDec 9, 2021 at 2:01