docs(content): add myip.dog public IP tips to cheatsheets

This commit is contained in:
Fechin committed 2026-10-02 23:25:03 -04:00
1 parent 1a758e10f4
commit cae9b8ca71
5 files changed
+52

No files matched your search

+10
View File
@@ -118,6 +118,16 @@ ip route show
vi /etc/network/interfaces
```
Check this machine's public IP
```bash
# Install curl if needed
apk add --no-cache curl
curl myip.dog
```
More IP tools: [myip.dog](https://myip.dog/)
### User Management
```bash
+13
View File
@@ -861,6 +861,19 @@ if ping -c 1 google.com; then
fi
```
### Public IP
```bash
# Show this machine's public IP
curl myip.dog
# Save the IP for use in a script
public_ip=$(curl -fsS myip.dog)
printf '%s\n' "$public_ip"
```
More IP tools: [myip.dog](https://myip.dog/)
### Special variables {.row-span-2}
| Expression | Description |
+3
View File
@@ -162,6 +162,7 @@ curl -sSL https://get.rvm.io | bash
| command | description |
| :------------------------------------------------------------------------------------------ | :----------------------------- |
| `curl myip.dog` | get this machine's public `IP` |
| `curl -L -s http://ipecho.net/plain, curl -L -s http://whatismijnip.nl` | get my public `IP` |
| `curl -u $username:$password http://repo.dennyzhang.com/README.txt` | `curl` with credentials |
| `curl -v -F key1=value1 -F upload=@localfilename <URL>` | `curl` upload |
@@ -170,6 +171,8 @@ curl -sSL https://get.rvm.io | bash
| `curl -u test:test ftp://10.32.99.187/cryptopp552.zip -o cryptopp552.zip` | curl `ftp` download |
| `curl -v -u admin:admin123 --upload-file package1.zip http://mysever:8081/dir/package1.zip` | upload with credentials `curl` |
More IP tools: [myip.dog](https://myip.dog/)
### Check website response time {.col-span-4}
```shell
+10
View File
@@ -62,6 +62,16 @@ $ netstat -h
| `netstat -i` | Show network interfaces |
| `netstat -ie` | Show network interfaces extended info |
### Public IP
Check this machine's public IP
```shell script
$ curl myip.dog
```
More IP tools: [myip.dog](https://myip.dog/)
### Routing
| Option | Example |
+16
View File
@@ -59,6 +59,22 @@ Compresses and downloads from a server
$ ssh root@192.168.1.5 "tar cvzf - ~/source" > output.tgz
```
### Public IP
Check this machine's public IP
```shell script
$ curl myip.dog
```
Check a remote server's public IP (requires curl on the server)
```shell script
$ ssh user@server 'curl myip.dog'
```
More IP tools: [myip.dog](https://myip.dog/)
### SCP {.row-span-2}
Copies from remote to local