c8652e10564b0f4cd3aff6d664042a4a174d1f6b
[webi-installers/.git] / myip / README.md
1 ---
2 title: My IP
3 homepage: https://webinstall.dev/myip
4 tagline: |
5   My IP answers the question "what's my IP address?"
6 description: |
7   `myip` will contact ipify.org to tell you your IP addresses:
8
9     1. `api.ipify.org` for your IPv4 or A address
10     2. `api6.ipify.org` for your IPv6 or AAAA address
11 ---
12
13 Example output:
14
15 ```txt
16 IPv4 (A)   : 136.36.196.101
17 IPv6 (AAAA): 2605:a601:a919:9800:f8be:f2c4:9ad7:9763
18 ```
19
20 ### What is an IP address?
21
22 An IP or Internet Protocol address is basically the phone number of your
23 computer or server.
24
25 Whenever you visit a domain - such as https://google.com - the `google.com` part
26 is _resolved_ to the IP address using, quite literally, the internet's Contacts
27 list, known as DNS.
28
29 ### How to get your IP address?
30
31 Due to how complex networking can be, the most reliable way to get your IP
32 address is basically to "make a call" to another server and ask it to tell you
33 what shows up on the "called id", as it were.
34
35 _IPify_ is such a service.
36
37 You likely have an IPv4 or A address as well as an IPv6 or AAAA address.
38
39 To find out your IPv4 or A address:
40
41 ```bash
42 curl -s https://api.ipify.org
43 ```
44
45 To find out your IPv6 or AAAA address:
46
47 ```bash
48 curl -s https://api6.ipify.org
49 ```
50
51 To find out either address:
52
53 ```bash
54 curl -s https://api46.ipify.org
55 ```
56
57 You can also use the `ifconfig`, `ip`, or `ipconfig` commands to figure this
58 out, but they may give you incorrect information if the network setup is complex
59 (as is the case... most of the time - home and business networks, cloud
60 networks, etc).