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