1
I have always been curious about how do, say two computers, connect over the Internet.
For example, using the IP address from whatismyip service, I can only see the config page of my router, but pure p2p services like Bitcoin connect two computers directly, if they use IP address. the would have connected to my router/wireless AP. Do they really use IP or other methods? I do not need to do even port-forwarding in order to get p2p software working.
The reason why you can see your router page is because you're accessing it from your own network. Other computers treat your IP as an address to your computer. – Doktoro Reichard – 2013-12-18T15:21:06.083
https://en.bitcoin.it/wiki/Protocol_specification for a bit of info regarding how the bitcoin protocol works at the network level. At the bottom of the page it looks like there is a bitcoin dissector being written for WireShark (packet capture tool for Win/Linux/Mac) – Richie086 – 2013-12-18T22:31:24.240
Hello @DoktoroReichard I mean that when I use whatismyip service to get my external ip, I get the ip of my router. So I read about that when I get this, I will need to forward a port to the internal ip of my computer. But what I encounter is that when I use peer-to-peer client, I don't need to do that. What I understand about p2p is that nodes are connected directly to each other, so how is that done when I can't even connect to my computer from external network? – Alexander Ho – 2013-12-19T14:46:56.157
Because p2p took care of the connection between two computers that accept it. You can't "connect" to your computer from an external network because, among other things, it isn't set up to do so. An example is an HTTP server, like Apache. If you have Apache and configured a webpage, then any request made to your IP address that comes through port 8080 will be treated by Apache as an HTTP request... in a way you are now connected to your computer. Port forwarding is needed, though, if the router itself is unable to rout the communications. – Doktoro Reichard – 2013-12-19T16:41:40.393