Detect if an IP address is running a Bitcoin node - ip

Is there a way to detect if an IP address is running a Bitcoin node? Maybe I can extract the IP information from the blockchain somehow?

There are many ways to do this.
Pretty reliable and relatively simple way is to get the list of Bitcoin nodes from https://api.blockchair.com/bitcoin/nodes.
It is the JSON object that looks like:
{"data":{"nodes":{"1.234.63.142:8333":"version":"\/Satoshi:0.16.0\/","country":"KR","height":588031,"flags":1037},
"1.36.226.179:8333":{"version":"\/Satoshi:0.18.0\/","country":"HK","height":588031,"flags":1037},
"100.12.85.110:8333":{"version":"\/Satoshi:0.16.2\/","country":"US","height":588031,"flags":1037},
...
And then check if IP address in question is present in this list.

Related

Difference in IP address formats

I asked a client to send me the ip address of all of their locations so that I could block them from analytics.
Most of them are what I know as normal: 0.00.000.000
but some of them are coming to be kind of like this: 2001:500:f000:100:7000:40d0:3000:400c
They are all going to google and typing "whats my ip address" and sending me the results. Is the second example an ip address I can exclude? do I need to convert it some how?
Those are IPv6 addresses. What you're looking at inside the usual xxx.xxx.xxx.xxx format is IPv4.
These two formats of addressing are entirely incompatible with one another. They cannot be "converted", however when dealing with application layer systems they should/usually work in almost the exact same way. i.e. if you were to ban an IPv6 address, it would work in the same way as banning an IPv4.
There's a plethora of documentation available online about IPv6, and it's probably a bit out of scope for this site, so I hope that helps you figure it all out! Even if it is just a single piece of your puzzle :)

Best practice to get and set network properties of minions by salt

I want to get and set network properties those one are in this picture by salt(If I want to be more specific salt-api).
Ubuntu network information
I know I can get some ip and netmask by salt.modules.network.interfaces and gateway from salt.modules.network.default_route and set network properties of windows machines by WIN_IP but I think there must be a better way.
Also I didn't find a way to gather dns of minions yet.
thanks in advance

How do sites like ipmango.com work?

I mean how can a mere website tell my I.P. address and the ports that are available to forward? For example what do I have to do in order to incorporate this kind of facility on my website?
A website must know what your IP address is, otherwise how else would it know where to send the data packets back to?
Also it does not know which ports "are available to forward". It only knows which port your request originates from (this port is random).
Your computer may be making many requests simultaneously from various programs, so knowing the correct IP address makes sure the data gets back to the right computer, and knowing the correct port makes sure it goes to the correct program (or more specifically, the correct process).

What is the meaning of "IN THE SAME NETWORK" in Elasticsearch clustering?

I'm setting up an Elasticsearch cluster using VMs in AWS.
I know that each node automatically tries to join an existing cluster which have the same cluster name in the same network.
However, I could not understand what the "same network" is.
Trying to understand about the same network, I found the concept of multicast and unicast.
It seems to be the same concept between "same network" and "in the multicast group".
If so, how can I figured out what ip addresses are in the multicast group? and how can I add or remove some IP addresses in the multicast group?
I'm not so familiar with the concepts of network.
What I really want to know is that how can I figured out whether my
nodes are in the same network or not? and how can I configure that.
Thanks in advance.
I am not a networking guy, but I believe they mean as long as they can see each other on a private network. Each node in a cluster wants to communicate internally with the other nodes on port 9300 by default.
So if you have one node on 10.20.10.5 (as an example) and one on 10.20.10.6, they should be able to "see" each other.
Also you can explicitly set the nodes in the cluster in the config file for Elastic.
For example in my elasticsearch.yml, I have something like this under the ### DISCOVERY ### section:
discovery.zen.ping.unicast.hosts: ["elastic-p1.domain.net:9300", "elastic-p2.domain.net:9300"]

How to get unique client identifer on server?

I am making an EventLog which will log the transaction log in my website. The details of the log will include the Public IP from where the transaction has orginated and also the local IP address (under the public IP).
I have found ways to obtain the Public IP Address, but i am unable to find out the local IP or machine IP from where the transaction is made.
A large number of entries will be done by people using the same connection. ie 5 or 10 computers connected to the same connection.
I need to find the machine IP (192.168.0.1 for 1 system 192.168.0.2 for the next) of the machines making the transactions and also the Computer name...
Is this possible
To clarify, you want the private IP address of a client when the client is connecting through a router? Then no, there isn't a way to do this.
Are you doing this purely to distinguish between different users?
Can you use another method like cookies?
If your client connects from behind a NAT or firewall you cannot reliably get his address or computer name. If you need such information then your protocol should request them as part of the request and the client machine should voluntarily provide them. There is no way to validate the information provided (short of deploying a trusted cryptographic infrastructure, ie. you establish a strong trust in the client machines themselves).
Sadly, the answer is no. No modern browser will present that private address in the HTTP transaction. The client's router which performs the NAT (Network Address Translation) offers only the public client IP address when making the IP connection.
Not likely. See a short discussion in http://javascript.about.com/library/blip.htm
Well yes we are doing this just to differentiate between the computers to know who is doing the entries...
Since you guys say that tracing the IP is not very reliable are there any other methods that i can use to do the same thing
I just need to know from which computer each entry is entered.
Any suggestions would be welcome
You are making the false assumption that there is a way to know from which computer each entry is entered. Nobody has the job of ensuring that this information exists. Often, it will not exist.
The only way to make sure each computer is uniquely identified is for you to identify it. You can do this through client certificates, for instance. In general, if you want each computer to have a unique identifier, then you need to create a unique identifier, then put it on that computer. You then need the computer to send that identifier back.
There is no other unique identifier for computers.
This is probably way beyond what you're looking for but it makes for an interesting read: Remote physical device fingerprinting
This allows you to uniquely identify a remote physical device without its cooperation, across NAT or whatever else you can imagine.

Resources