I know I can do curl curlmyip.com
or something like that, but that just shows me the ip curlmyip.com is seeing.
Is there any tool I can use that tells me what's my ip on the endpoint for any TCP connection endpoint (not just curlmyip.com)?
The Internet Protocol does not have an inherit way of disclosing the address of either party
If you have control over those endpoints you could set up such as service, or simply capture an ICMP echo (ping) on the remote endpoint to see what IP it's being presented with
Another solution would be to use netcat to open a simple server and connect to it, when running with a verbose switch it will display information about the connected peer
server:~# nc -lvp 1234
Listening on [0.0.0.0] (family 0, port 1234)
Connection from [127.0.0.1] port 1234 [tcp/*] accepted (family 2, sport 42852)
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments