I have been reading up on python stuff for a time now and I cant seem to locate any information about some more tedious networking things.
I want to simply send a packet from Computer1, located roughly 1 foot in front of me, to another computer that is located roughly 200 miles from me. I would say that this conundrum uses a thing called the internet to accomplish this. All of the stuff I find is to connect to localhost or to connect to a website (which i have actually used python to do quite a bit). The problem lies with the fact that the nitty gritty details are always left out and I want those details.
Simply put: How do I setup a server/client, on computers 1 & 2, and send a packet to them via the internet. How would I go about making a simple “HELLO” and from there sending it from my computer, to my router, to my ISP and out to the vast limitless ether of the internet… but whats this!!! That computer is also on the internet! Meaning received by THAT ISP, (and how do you get that ISP clients IP?), THAT router, and THAT computer2’s ip dynamically assigned by the router.
I would say, and I could be wrong here, that its a more complex subject than most are used to… thus why it seems impossible to find anything on the internet about it… But does any one know how to open and listen on a port, on 2 separate computers, send a raw packet (TCP/UDP/whatever) and then read it on the receiving end from the internet? I will handle the client/server side of things but what about that middle road? Anyone know?
Just a note: using something as simple as whois in a terminal only needs an IP address… but with billions of devices out there, its not that simple to find one computer on the vastness of the web. I would imagine 192.168.0.222 (simple local network) only deals with your routers assigned IPs and the FULL address probably uses crap like subnets and netmasks and other junk. Or, if im lucky, simply wrapping the packet a special way and let the ISP handle it from there which may simplify this problem immensely…
Anyway, enough of my blabbering… summary:sending raw packets a distance via the internet. Example source appreciated.