mirror of
https://github.com/jbranchaud/til
synced 2026-01-04 23:58:01 +00:00
Add Get Your Public IP Address as a workflow til
This commit is contained in:
26
workflow/get-your-public-ip-address.md
Normal file
26
workflow/get-your-public-ip-address.md
Normal file
@@ -0,0 +1,26 @@
|
||||
# Get Your Public IP Address
|
||||
|
||||
If you're trying to figure out what your current public IP address is, there is
|
||||
a server you can ask. It is a server running at `https://ifconfig.me`.
|
||||
|
||||
You can visit that URL in your browser to find your IP address and some other
|
||||
User Agent/Request details. The site also mentions several `cURL` commands you
|
||||
can run to get these details in your terminal.
|
||||
|
||||
```bash
|
||||
$ curl ifconfig.me
|
||||
```
|
||||
|
||||
That will respond with just your public IP address. It is equivalent to curling
|
||||
`ifconfig.me/ip`.
|
||||
|
||||
There are other options as well, such as curling for a JSON response of all the
|
||||
data attributes.
|
||||
|
||||
```bash
|
||||
$ curl ifconfig.me/all.json
|
||||
```
|
||||
|
||||
See [ifconfig.me](https://ifconfig.me) for more details.
|
||||
|
||||
[source](https://www.mfitzp.com/article/use-ifconfigme-to-return-your-ip-and-host/)
|
||||
Reference in New Issue
Block a user